Skip to content

Commit 3cbe191

Browse files
derrabusnicolas-grekas
authored andcommitted
Fix inconsistent return points.
1 parent d7d3f62 commit 3cbe191

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Command/DebugAutowiringCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
145145
}
146146

147147
$io->newLine();
148+
149+
return null;
148150
}
149151

150152
private function getFileLink(string $class): string

Templating/Helper/StopwatchHelper.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ public function getName()
3939

4040
public function __call($method, $arguments = [])
4141
{
42-
if (null !== $this->stopwatch) {
43-
if (method_exists($this->stopwatch, $method)) {
44-
return $this->stopwatch->{$method}(...$arguments);
45-
}
42+
if (null === $this->stopwatch) {
43+
return null;
44+
}
4645

47-
throw new \BadMethodCallException(sprintf('Method "%s" of Stopwatch does not exist', $method));
46+
if (method_exists($this->stopwatch, $method)) {
47+
return $this->stopwatch->{$method}(...$arguments);
4848
}
49+
50+
throw new \BadMethodCallException(sprintf('Method "%s" of Stopwatch does not exist', $method));
4951
}
5052
}

0 commit comments

Comments
 (0)