Conditions | 6 |
Paths | 5 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 6.0702 |
Changes | 0 |
1 | <?php |
||
38 | 8 | public function resolve(Request $request) |
|
39 | { |
||
40 | 8 | foreach ($this->resolvers as $resolver) { |
|
41 | 8 | $version = $resolver->resolve($request); |
|
42 | |||
43 | 8 | if (null !== $version && !is_string($version)) { |
|
44 | @trigger_error(sprintf('Not returning a string or null from %s::resolve() when implementing the %s is deprecated since FOSRestBundle 2.8.', get_class($resolver), VersionResolverInterface::class), E_USER_DEPRECATED); |
||
|
|||
45 | } |
||
46 | |||
47 | 8 | if (null !== $version && false !== $version) { |
|
48 | 4 | return $version; |
|
49 | } |
||
50 | } |
||
51 | |||
52 | 4 | return null; |
|
53 | } |
||
54 | |||
60 |
If you suppress an error, we recommend checking for the error condition explicitly: