| Conditions | 1 |
| Paths | 1 |
| Total Lines | 27 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | private function addCallbackHandlers( $containerBuilder ) { |
||
| 21 | |||
| 22 | $containerBuilder->registerCallback( 'Foo', function( $containerBuilder ) { |
||
|
|
|||
| 23 | return new \stdClass; |
||
| 24 | } ); |
||
| 25 | |||
| 26 | $containerBuilder->registerExpectedReturnType( 'Foo', '\stdClass' ); |
||
| 27 | |||
| 28 | $containerBuilder->registerCallback( 'FooWithArgument', function( $containerBuilder, $argument ) { |
||
| 29 | $containerBuilder->registerExpectedReturnType( 'FooWithArgument', '\stdClass' ); |
||
| 30 | |||
| 31 | $stdClass = new \stdClass; |
||
| 32 | $stdClass->argument = $argument; |
||
| 33 | |||
| 34 | return $stdClass; |
||
| 35 | } ); |
||
| 36 | |||
| 37 | $containerBuilder->registerCallback( 'FooWithNullArgument', function( $containerBuilder, $argument = null ) { |
||
| 38 | $containerBuilder->registerExpectedReturnType( 'FooWithNullArgument', '\stdClass' ); |
||
| 39 | |||
| 40 | $stdClass = new \stdClass; |
||
| 41 | $stdClass->argument = $argument; |
||
| 42 | $stdClass->argumentWithArgument = $containerBuilder->create( 'FooWithArgument', $argument ); |
||
| 43 | |||
| 44 | return $stdClass; |
||
| 45 | } ); |
||
| 46 | } |
||
| 47 | |||
| 49 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.