Skip to content

Commit 3a2906c

Browse files
committed
minor symfony#40287 [Config] Switched to non-null defaults in exception constructors (derrabus)
This PR was merged into the 5.2 branch. Discussion ---------- [Config] Switched to non-null defaults in exception constructors | Q | A | ------------- | --- | Branch? | 5.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A Follow-up to symfony#40271 on the 5.2 branch. Commits ------- 2e865ac Switched to non-null defaults in exception constructors
2 parents 5028aaf + 2e865ac commit 3a2906c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Symfony/Component/Config/Exception/LoaderLoadException.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
class LoaderLoadException extends \Exception
2020
{
2121
/**
22-
* @param string $resource The resource that could not be imported
23-
* @param string $sourceResource The original resource importing the new resource
24-
* @param int $code The error code
25-
* @param \Throwable $previous A previous exception
26-
* @param string $type The type of resource
22+
* @param string $resource The resource that could not be imported
23+
* @param string|null $sourceResource The original resource importing the new resource
24+
* @param int|null $code The error code
25+
* @param \Throwable|null $previous A previous exception
26+
* @param string|null $type The type of resource
2727
*/
28-
public function __construct(string $resource, string $sourceResource = null, int $code = null, \Throwable $previous = null, string $type = null)
28+
public function __construct(string $resource, string $sourceResource = null, ?int $code = 0, \Throwable $previous = null, string $type = null)
2929
{
3030
$message = '';
3131
if ($previous) {

0 commit comments

Comments
 (0)