@@ -76,7 +76,7 @@ class Command
7676 */
7777 protected $ version ;
7878
79- public function __construct (string $ magickBinaryPath = null )
79+ public function __construct (? string $ magickBinaryPath = null )
8080 {
8181 $ magickBinaryPath = self ::findMagickBinaryPath ($ magickBinaryPath );
8282
@@ -102,7 +102,7 @@ public function __construct(string $magickBinaryPath = null)
102102 $ this ->magickBinaryPath = $ magickBinaryPath ;
103103 }
104104
105- public static function create (string $ magickBinaryPath = null ): self
105+ public static function create (? string $ magickBinaryPath = null ): self
106106 {
107107 return new self ($ magickBinaryPath );
108108 }
@@ -148,7 +148,7 @@ private static function cleanPath(string $path, bool $rtrim = false): string
148148 *
149149 * @see https://imagemagick.org/script/command-line-tools.php
150150 */
151- public function getExecutable (string $ binary = null ): array
151+ public function getExecutable (? string $ binary = null ): array
152152 {
153153 if (!\in_array ($ binary , static ::ALLOWED_EXECUTABLES , true )) {
154154 throw new \InvalidArgumentException (\sprintf (
@@ -165,7 +165,7 @@ public function getExecutable(string $binary = null): array
165165 /**
166166 * Entirely reset all current command statements, and start a whole new command.
167167 */
168- public function newCommand (string $ binary = null ): self
168+ public function newCommand (? string $ binary = null ): self
169169 {
170170 $ this ->env = [];
171171 $ this ->command = $ binary ? $ this ->getExecutable ($ binary ) : [];
@@ -185,7 +185,7 @@ public function convert(string $sourceFile, bool $checkIfFileExists = true): sel
185185 /**
186186 * @see https://imagemagick.org/script/mogrify.php
187187 */
188- public function mogrify (string $ sourceFile = null ): self
188+ public function mogrify (? string $ sourceFile = null ): self
189189 {
190190 $ this ->newCommand ('mogrify ' );
191191 if ($ sourceFile ) {
@@ -382,7 +382,6 @@ public function size($geometry): self
382382 /**
383383 * Create a colored canvas.
384384 *
385- *
386385 * @see http://www.imagemagick.org/Usage/canvas/
387386 */
388387 public function xc (string $ canvasColor = 'none ' ): self
@@ -432,7 +431,7 @@ public function extent($geometry): self
432431 }
433432
434433 /**
435- * @param string $gravity
434+ * @param string|Gravity $gravity
436435 *
437436 * @see https://www.imagemagick.org/script/command-line-options.php#gravity
438437 */
0 commit comments