| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 2 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | function jetpack_require_lib( $slug ) { |
||
| 33 | if ( defined( 'ABSPATH' ) && ! defined( 'WP_CONTENT_DIR' ) ) { |
||
| 34 | define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down |
||
| 35 | } |
||
| 36 | |||
| 37 | require_lib_from_dir( $slug, WP_CONTENT_DIR . '/lib' ); |
||
| 38 | } |
||
| 39 | |||
| 43 |
This check looks for functions that have already been defined in the same file.
Some Codebases, like WordPress, make a practice of defining functions multiple times. This may lead to problems with the detection of function parameters and types. If you really need to do this, you can mark the duplicate definition with the
@ignoreannotation.See also the PhpDoc documentation for @ignore.