Skip to content

Commit

Permalink
Apply php-cs-fixer fix --rules nullable_type_declaration_for_default_…
Browse files Browse the repository at this point in the history
…null_value
  • Loading branch information
nicolas-grekas committed Jan 23, 2024
1 parent 0ce3a62 commit 5a55360
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Exception/FileNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
class FileNotFoundException extends IOException
{
public function __construct(string $message = null, int $code = 0, \Throwable $previous = null, string $path = null)
public function __construct(?string $message = null, int $code = 0, ?\Throwable $previous = null, ?string $path = null)
{
if (null === $message) {
if (null === $path) {
Expand Down
2 changes: 1 addition & 1 deletion Exception/IOException.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class IOException extends \RuntimeException implements IOExceptionInterface
{
private $path;

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

Expand Down
4 changes: 2 additions & 2 deletions Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function exists($files)
*
* @throws IOException When touch fails
*/
public function touch($files, int $time = null, int $atime = null)
public function touch($files, ?int $time = null, ?int $atime = null)
{
foreach ($this->toIterable($files) as $file) {
if (!($time ? self::box('touch', $file, $time, $atime) : self::box('touch', $file))) {
Expand Down Expand Up @@ -534,7 +534,7 @@ public function makePathRelative(string $endPath, string $startPath)
*
* @throws IOException When file type is unknown
*/
public function mirror(string $originDir, string $targetDir, \Traversable $iterator = null, array $options = [])
public function mirror(string $originDir, string $targetDir, ?\Traversable $iterator = null, array $options = [])
{
$targetDir = rtrim($targetDir, '/\\');
$originDir = rtrim($originDir, '/\\');
Expand Down
2 changes: 1 addition & 1 deletion Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public static function getRoot(string $path): string
* @param string|null $extension if specified, only that extension is cut
* off (may contain leading dot)
*/
public static function getFilenameWithoutExtension(string $path, string $extension = null): string
public static function getFilenameWithoutExtension(string $path, ?string $extension = null): string
{
if ('' === $path) {
return '';
Expand Down

0 comments on commit 5a55360

Please sign in to comment.