| Conditions | 6 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | function wfJsonI18nSkinForeground( $cache, $code, &$cachedData ) { |
||
|
|
|||
| 16 | $codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] ); |
||
| 17 | foreach ( $codeSequence as $csCode ) { |
||
| 18 | $fileName = dirname( __FILE__ ) . "/i18n/$csCode.json"; |
||
| 19 | if ( is_readable( $fileName ) ) { |
||
| 20 | $data = FormatJson::decode( file_get_contents( $fileName ), true ); |
||
| 21 | foreach ( array_keys( $data ) as $key ) { |
||
| 22 | if ( $key === '' || $key[0] === '@' ) { |
||
| 23 | unset( $data[$key] ); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | $cachedData['messages'] = array_merge( $data, $cachedData['messages'] ); |
||
| 27 | } |
||
| 28 | |||
| 29 | $cachedData['deps'][] = new FileDependency( $fileName ); |
||
| 30 | } |
||
| 31 | return true; |
||
| 32 | } |
||
| 33 | |||
| 35 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.