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 4729
4729
'Imagick::getColorspace' => ['Imagick::COLORSPACE_*'],
4730
4730
'Imagick::getCompression' => ['Imagick::COMPRESSION_*'],
4731
4731
'Imagick::getCompressionQuality' => ['int'],
4732
- 'Imagick::getConfigureOptions' => ['string'],
4732
+ 'Imagick::getConfigureOptions' => ['array< string, string> '],
4733
4733
'Imagick::getCopyright' => ['string'],
4734
4734
'Imagick::getFeatures' => ['string'],
4735
4735
'Imagick::getFilename' => ['string'],
Original file line number Diff line number Diff line change @@ -2829,6 +2829,15 @@ public function testBug5623(): void
2829
2829
$ this ->analyse ([__DIR__ . '/data/bug-5623.php ' ], []);
2830
2830
}
2831
2831
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
+
2832
2841
public function testImagickPixel (): void
2833
2842
{
2834
2843
$ 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