E574 minor #29671 [Config] remove redundant method calls (azjezz) · symfony/symfony@4b88db7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b88db7

Browse files
committed
minor #29671 [Config] remove redundant method calls (azjezz)
This PR was merged into the 4.1 branch. Discussion ---------- [Config] remove redundant method calls rebase of #29665 | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT since `4.0`, `$resource` and `$sourceResource` are type hinted as `string` so there's not need to call `->varToString(): string`, method not removed for BC as the class is not marked final and the method is `protected`. Commits ------- 2021f9e Update FileLoaderLoadException.php
2 parents 1dbb374 + 2021f9e commit 4b88db7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,17 @@ public function __construct(string $resource, string $sourceResource = null, int
4242

4343
// show tweaked trace to complete the human readable sentence
4444
if (null === $sourceResource) {
45-
$message .= sprintf('(which is loaded in resource "%s")', $this->varToString($resource));
45+
$message .= sprintf('(which is loaded in resource "%s")', $resource);
4646
} else {
47-
$message .= sprintf('(which is being imported from "%s")', $this->varToString($sourceResource));
47+
$message .= sprintf('(which is being imported from "%s")', $sourceResource);
4848
}
4949
$message .= '.';
5050

5151
// if there's no previous message, present it the default way
5252
} elseif (null === $sourceResource) {
53-
$message .= sprintf('Cannot load resource "%s".', $this->varToString($resource));
53+
$message .= sprintf('Cannot load resource "%s".', $resource);
5454
} else {
55-
$message .= sprintf('Cannot import resource "%s" from "%s".', $this->varToString($resource), $this->varToString($sourceResource));
55+
$message .= sprintf('Cannot import resource "%s" from "%s".', $resource, $sourceResource);
5656
}
5757

5858
// Is the resource located inside a bundle?

0 commit comments

Comments
 (0)
0