-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v3' of github.com:spatie/image into v3
- Loading branch information
Showing
18 changed files
with
285 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: PHPStan | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
- 'phpstan.neon.dist' | ||
- '.github/workflows/phpstan.yml' | ||
|
||
jobs: | ||
phpstan: | ||
name: phpstan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '8.2' | ||
coverage: none | ||
tools: phpstan | ||
|
||
- name: Install composer dependencies | ||
uses: ramsey/composer-install@v2 | ||
|
||
- name: Run PHPStan | ||
run: ./vendor/bin/phpstan --error-format=github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#1 \\$value of method Spatie\\\\Image\\\\Drivers\\\\Color\\:\\:initFromObject\\(\\) expects ImagickPixel, object given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Color.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:exif\\(\\) return type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:pngCompression\\(\\) should return int\\<\\-1, 9\\> but returns int\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$data of function imagecreatefromstring expects string, string\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$dst_image of function imagecopyresampled expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of function imagealphablending expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of function imagecolorallocatealpha expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of function imagecolorsforindex expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of function imagecolortransparent expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of function imagefill expects GdImage, GdImage\\|false given\\.$#" | ||
count: 2 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of function imagesavealpha expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$image of method Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:setImage\\(\\) expects GdImage, GdImage\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$stream of function fclose expects resource, resource\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$stream of function fread expects resource, resource\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$string of function base64_encode expects string, string\\|false given\\.$#" | ||
count: 2 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$width of method Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:manualCrop\\(\\) expects int, int\\|null given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$color of function imagecolorsforindex expects int, int\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$color of function imagecolortransparent expects int\\|null, int\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$height of method Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:manualCrop\\(\\) expects int, int\\|null given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$length of function fread expects int\\<0, max\\>, int\\<0, max\\>\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#4 \\$color of function imagefill expects int, int\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#6 \\$color of function imagefilledrectangle expects int, int\\|false given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Property Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:\\$exif type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Property Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:\\$image \\(GdImage\\) does not accept GdImage\\|false\\.$#" | ||
count: 2 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Property Spatie\\\\Image\\\\Drivers\\\\Gd\\\\GdDriver\\:\\:\\$image \\(GdImage\\) does not accept mixed\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Unreachable statement \\- code above always terminates\\.$#" | ||
count: 1 | ||
path: src/Drivers/Gd/GdDriver.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\Image\\\\Drivers\\\\ImageDriver\\:\\:exif\\(\\) return type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Drivers/ImageDriver.php | ||
|
||
- | ||
message: "#^Method Spatie\\\\Image\\\\Drivers\\\\Imagick\\\\ImagickDriver\\:\\:exif\\(\\) return type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Drivers/Imagick/ImagickDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$width of method Spatie\\\\Image\\\\Drivers\\\\Imagick\\\\ImagickDriver\\:\\:manualCrop\\(\\) expects int, int\\|null given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Imagick/ImagickDriver.php | ||
|
||
- | ||
message: "#^Parameter \\#2 \\$height of method Spatie\\\\Image\\\\Drivers\\\\Imagick\\\\ImagickDriver\\:\\:manualCrop\\(\\) expects int, int\\|null given\\.$#" | ||
count: 1 | ||
path: src/Drivers/Imagick/ImagickDriver.php | ||
|
||
- | ||
message: "#^Property Spatie\\\\Image\\\\Drivers\\\\Imagick\\\\ImagickDriver\\:\\:\\$exif type has no value type specified in iterable type array\\.$#" | ||
count: 1 | ||
path: src/Drivers/Imagick/ImagickDriver.php | ||
|
||
- | ||
message: "#^Property Spatie\\\\Image\\\\Drivers\\\\Imagick\\\\ImagickDriver\\:\\:\\$image \\(Imagick\\) does not accept mixed\\.$#" | ||
count: 1 | ||
path: src/Drivers/Imagick/ImagickDriver.php | ||
|
||
- | ||
message: "#^Match expression does not handle remaining value\\: Spatie\\\\Image\\\\Enums\\\\Fit\\:\\:Crop$#" | ||
count: 1 | ||
path: src/Enums/Fit.php | ||
|
||
- | ||
message: "#^Part \\$color \\(mixed\\) of encapsed string cannot be cast to string\\.$#" | ||
count: 1 | ||
path: src/Exceptions/InvalidColor.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
includes: | ||
- phpstan-baseline.neon | ||
|
||
parameters: | ||
level: 9 | ||
paths: | ||
- src/ | ||
|
||
ignoreErrors: | ||
- '#Unsafe usage of new static#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.