Skip to content

Commit e0013d7

Browse files
committed
Fixup
1 parent 703568e commit e0013d7

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

‎.github/workflows/main.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ jobs:
4444
TOKEN: ${{ secrets.TOKEN }}
4545
DEST: ${{ secrets.DEST }}
4646
run: |
47-
vendor/bin/psalm --no-cache
47+
vendor/bin/psalm --no-cache --shepherd
4848
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
4949
vendor/bin/php-cs-fixer --diff --dry-run -v fix

‎psalm.xml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
>
1212
<projectFiles>
1313
<directory name="src" />
14-
<directory name="tests" />
1514
<ignoreFiles>
1615
<directory name="vendor" />
1716
</ignoreFiles>

‎src/FileId.php‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ public static function fromBotAPI(string $fileId): self
159159
$local_id = Tools::unpackInt($read(4));
160160
}
161161

162-
/** @psalm-suppress MixedArgument */
163-
$photosize_source = PhotoSizeSourceType::from($subVersion >= 4 ? \unpack('V', $read(4))[1] : 0);
162+
/** @var int */
163+
$arg = $subVersion >= 4 ? \unpack('V', $read(4))[1] : 0;
164+
$photosize_source = PhotoSizeSourceType::from($arg);
164165
switch ($photosize_source) {
165166
case PhotoSizeSourceType::LEGACY:
166167
$photoSizeSource = new PhotoSizeSourceLegacy(Tools::unpackLong($read(8)));

‎src/Tools.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class Tools
1919
*/
2020
public static function unpackLong(string $field): int
2121
{
22-
/** @psalm-suppress MixedReturnStatement */
22+
/** @var int */
2323
return \unpack('q', BIG_ENDIAN ? \strrev($field) : $field)[1];
2424
}
2525
/**
@@ -30,7 +30,7 @@ public static function unpackLong(string $field): int
3030
*/
3131
public static function unpackInt(string $field): int
3232
{
33-
/** @psalm-suppress MixedReturnStatement */
33+
/** @var int */
3434
return \unpack('l', $field)[1];
3535
}
3636
/**

0 commit comments

Comments
 (0)