Conditions | 6 |
Paths | 12 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function getHeader( $headerName, $regex = null ) |
||
20 | { |
||
21 | $headers = $this->getHeaders(); |
||
|
|||
22 | |||
23 | $value = null; |
||
24 | |||
25 | foreach ( $headers as $header ) { |
||
26 | if ( $header->key === $headerName ) { |
||
27 | $value = $header->value; |
||
28 | if ( ! is_null( $regex ) ) { |
||
29 | preg_match_all( $regex, $header->value, $value ); |
||
30 | } |
||
31 | break; |
||
32 | } |
||
33 | } |
||
34 | |||
35 | if ( is_array( $value ) ) { |
||
36 | return isset( $value[ 1 ] ) ? $value[ 1 ] : null; |
||
37 | } |
||
38 | |||
39 | return $value; |
||
40 | } |
||
42 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.