diff --git a/src/Image.php b/src/Image.php index ecfa512..796928d 100644 --- a/src/Image.php +++ b/src/Image.php @@ -692,6 +692,8 @@ private function callEnum( * @param string $filename The file to test. * * @return string|null The name of the load operation, or null. + * + * @psalm-taint-sink file $filename */ public static function findLoad(string $filename): ?string { @@ -711,6 +713,8 @@ public static function findLoad(string $filename): ?string * @throws Exception * * @return Image A new Image. + * + * @psalm-taint-sink file $name */ public static function newFromFile( string $name, @@ -955,6 +959,8 @@ public static function newFromSource(Source $source, string $string_options = '' * @throws Exception * * @return void + * + * @psalm-taint-sink file $name */ public function writeToFile(string $name, array $options = []): void { diff --git a/src/Source.php b/src/Source.php index 2e8febd..d450ed7 100644 --- a/src/Source.php +++ b/src/Source.php @@ -49,6 +49,8 @@ public static function newFromDescriptor(int $descriptor): self * * You can pass this source to (for example) @see Image::newFromSource() * @throws Exception + * + * @psalm-taint-sink file $filename */ public static function newFromFile(string $filename): self { diff --git a/src/Target.php b/src/Target.php index acf231d..54f918f 100644 --- a/src/Target.php +++ b/src/Target.php @@ -48,6 +48,8 @@ public static function newToDescriptor(int $descriptor): self * * You can pass this target to (for example) @see Image::writeToTarget() * @throws Exception + * + * @psalm-taint-sink file $filename */ public static function newToFile(string $filename): self {