Skip to content

Commit b689f6b

Browse files
committed
Tweak the code to avoid fabbot false positives
1 parent bfda15f commit b689f6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Compiler/AbstractRecursivePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected function getConstructor(Definition $definition, $required)
126126
throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
127127
}
128128
} catch (\ReflectionException $e) {
129-
throw new RuntimeException(sprintf('Invalid service "%s": %s.', $this->currentId, lcfirst(rtrim($e->getMessage(), '.'))));
129+
throw new RuntimeException(sprintf('Invalid service "%s": '.lcfirst($e->getMessage()), $this->currentId));
130130
}
131131
if (!$r = $r->getConstructor()) {
132132
if ($required) {

Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ protected function loadFile($file)
660660
try {
661661
$configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
662662
} catch (ParseException $e) {
663-
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: %s.', $file, $e->getMessage()), 0, $e);
663+
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: '.$e->getMessage(), $file), 0, $e);
664664
} finally {
665665
restore_error_handler();
666666
}

0 commit comments

Comments
 (0)