Skip to content

Commit

Permalink
Fix PHPStan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
meritoo committed Nov 16, 2024
1 parent f4fd74f commit f3d5964
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Common & useful classes, resources, extensions. Based on Symfony framework.
2. Pluralization in
translations [using the ICU MessageFormat](https://symfony.com/doc/current/reference/formats/message_format.html#pluralization)
3. Update the `meritoo/common-library` package to `^1.3`
4. Fix PHPStan errors

# 0.3.1

Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist → phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ parameters:
paths:
- src
- tests
excludes_analyse:
excludePaths:
- %rootDir%/../../../tests/Resources/var/*
4 changes: 2 additions & 2 deletions src/Bundle/Descriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static function fromArray(array $data): Descriptor
$childBundleDescriptor = static::fromArray($childData);
}

return new static(
return new self(
$name,
$configurationRootName,
$rootNamespace,
Expand All @@ -201,7 +201,7 @@ public static function fromBundle(Bundle $bundle): Descriptor
// Default values, not provided by bundle directly
$configurationRootName = '';

return new static($name, $configurationRootName, $rootNamespace, $path);
return new self($name, $configurationRootName, $rootNamespace, $path);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Bundle/Descriptors.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Descriptors extends BaseCollection
*/
public static function fromArray(array $data): Descriptors
{
$result = new static();
$result = new self();

if (!empty($data)) {
$descriptors = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ public static function create(): CannotRedirectToEmptyRefererUrlException

$message = sprintf($template, RequestServiceInterface::class, 'storeRefererUrl');

return new static($message);
return new self($message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ class EmptyVersionFilePathException extends RuntimeException
*/
public static function create(): EmptyVersionFilePathException
{
return new static('Path of a file, who contains version of the application, is empty. Is there everything ok?');
return new self('Path of a file, who contains version of the application, is empty. Is there everything ok?');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ public static function create(string $filePath): UnreadableVersionFileException
$template = 'File %s, who contains version of the application, is not readable. Does the file exist?';
$message = sprintf($template, $filePath);

return new static($message);
return new self($message);
}
}

0 comments on commit f3d5964

Please sign in to comment.