Skip to content

Commit 5a55360

Browse files
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_null_value
1 parent 0ce3a62 commit 5a55360

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Diff for: Exception/FileNotFoundException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
class FileNotFoundException extends IOException
2121
{
22-
public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null)
22+
public function __construct(?string $message = null, int $code = 0, ?\Throwable $previous = null, ?string $path = null)
2323
{
2424
if (null === $message) {
2525
if (null === $path) {

Diff for: Exception/IOException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class IOException extends \RuntimeException implements IOExceptionInterface
2222
{
2323
private $path;
2424

25-
public function __construct(string $message, int $code = 0, \Throwable $previous = null, string $path = null)
25+
public function __construct(string $message, int $code = 0, ?\Throwable $previous = null, ?string $path = null)
2626
{
2727
$this->path = $path;
2828

Diff for: Filesystem.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function exists($files)
132132
*
133133
* @throws IOException When touch fails
134134
*/
135-
public function touch($files, int $time = null, int $atime = null)
135+
public function touch($files, ?int $time = null, ?int $atime = null)
136136
{
137137
foreach ($this->toIterable($files) as $file) {
138138
if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) {
@@ -534,7 +534,7 @@ public function makePathRelative(string $endPath, string $startPath)
534534
*
535535
* @throws IOException When file type is unknown
536536
*/
537-
public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = [])
537+
public function mirror(string $originDir, string $targetDir, ?\Traversable $iterator = null, array $options = [])
538538
{
539539
$targetDir = rtrim($targetDir, '/\\');
540540
$originDir = rtrim($originDir, '/\\');

Diff for: Path.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public static function getRoot(string $path): string
257257
* @param string|null $extension if specified, only that extension is cut
258258
* off (may contain leading dot)
259259
*/
260-
public static function getFilenameWithoutExtension(string $path, string $extension = null): string
260+
public static function getFilenameWithoutExtension(string $path, ?string $extension = null): string
261261
{
262262
if ('' === $path) {
263263
return '';

0 commit comments

Comments
 (0)