| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 1 | public static function flip() { |
|
| 17 | 1 | $arguments = func_get_args(); |
|
| 18 | 1 | $first_null = array_search( null, $arguments, true ); |
|
| 19 | |||
| 20 | 1 | if ( $first_null === false ) { |
|
| 21 | 1 | return $arguments; |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | $arguments = array_values( array_merge( |
|
| 25 | 1 | array_slice( $arguments, $first_null ), |
|
| 26 | 1 | array_slice( $arguments, 0, $first_null ) |
|
| 27 | ) ); |
||
| 28 | |||
| 29 | 1 | return $arguments; |
|
| 30 | } |
||
| 31 | } |
||
| 32 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.