| Conditions | 5 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 17 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 49 | 8 | private function replaceEmbeddedLinksWith( $source, $value ) { |
|
| 50 | 8 | $value = preg_replace_callback( |
|
| 51 | 8 | '/\[\[(.*)\]\]/xu', |
|
| 52 | function( array $matches ) use( $source ) { |
||
| 53 | 2 | $caption = false; |
|
| 54 | 2 | $value = ''; |
|
| 55 | |||
| 56 | 2 | if ( array_key_exists( 1, $matches ) ) { |
|
| 57 | 2 | $parts = explode( '|', $matches[1] ); |
|
| 58 | 2 | $value = array_key_exists( 0, $parts ) ? $parts[0] : ''; |
|
| 59 | 2 | $caption = array_key_exists( 1, $parts ) ? $parts[1] : false; |
|
| 60 | 2 | } |
|
| 61 | |||
| 62 | 2 | if ( $caption === false ) { |
|
| 63 | 1 | $caption = $value; |
|
| 64 | 1 | } |
|
| 65 | |||
| 66 | 2 | return '[[' . $source . ':' . $value . '|' . $caption . ']]'; |
|
| 67 | 8 | }, |
|
| 68 | $value |
||
| 69 | 8 | ); |
|
| 70 | |||
| 71 | 8 | return $value; |
|
| 72 | } |
||
| 73 | |||
| 75 |
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.