File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
tests/PHPStan/Rules/Methods Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 47294729'Imagick::getColorspace' => ['Imagick::COLORSPACE_*'],
47304730'Imagick::getCompression' => ['Imagick::COMPRESSION_*'],
47314731'Imagick::getCompressionQuality' => ['int'],
4732- 'Imagick::getConfigureOptions' => ['string'],
4732+ 'Imagick::getConfigureOptions' => ['array< string, string> '],
47334733'Imagick::getCopyright' => ['string'],
47344734'Imagick::getFeatures' => ['string'],
47354735'Imagick::getFilename' => ['string'],
Original file line number Diff line number Diff line change @@ -2829,6 +2829,15 @@ public function testBug5623(): void
28292829 $ this ->analyse ([__DIR__ . '/data/bug-5623.php ' ], []);
28302830 }
28312831
2832+ public function testImagick (): void
2833+ {
2834+ $ this ->checkThisOnly = false ;
2835+ $ this ->checkNullables = false ;
2836+ $ this ->checkUnionTypes = true ;
2837+ $ this ->checkExplicitMixed = false ;
2838+ $ this ->analyse ([__DIR__ . '/data/imagick.php ' ], []);
2839+ }
2840+
28322841 public function testImagickPixel (): void
28332842 {
28342843 $ this ->checkThisOnly = false ;
Original file line number Diff line number Diff line change 1+ <?php declare (strict_types = 1 );
2+
3+ namespace PHPStan \Rules \Methods \data ;
4+
5+ use Imagick ;
6+
7+ class ImagickText
8+ {
9+ public function isLcmsInstalled (): bool
10+ {
11+ return str_contains (Imagick::getConfigureOptions ()['DELEGATES ' ], 'lcms ' );
12+ }
13+ }
You can’t perform that action at this time.
0 commit comments