| Conditions | 5 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function getRequiredDependencies() { |
||
| 24 | $deps = []; |
||
| 25 | if ( isset( $this->contents['require'] ) ) { |
||
| 26 | foreach ( $this->contents['require'] as $package => $version ) { |
||
| 27 | if ( $package !== "php" && strpos( $package, 'ext-' ) !== 0 ) { |
||
| 28 | $deps[$package] = self::normalizeVersion( $version ); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | return $deps; |
||
| 34 | } |
||
| 35 | |||
| 52 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: