| Conditions | 6 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function validate($file) |
||
| 23 | { |
||
| 24 | $errors = array(); |
||
| 25 | $json = new JsonFile($file); |
||
| 26 | $this->manifest = $json->read(); |
||
|
|
|||
| 27 | |||
| 28 | if (isset($this->manifest['config']['sort-packages']) && $this->manifest['config']['sort-packages']) { |
||
| 29 | foreach (array('require', 'require-dev', 'conflict', 'replace', 'provide', 'suggest') as $linksSection) { |
||
| 30 | if (array_key_exists($linksSection, $this->manifest) && !$this->packagesAreSorted($this->manifest[$linksSection])) { |
||
| 31 | array_push($errors, 'Links under '.$linksSection.' section are not sorted correctly.'); |
||
| 32 | } |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | return $errors; |
||
| 37 | } |
||
| 38 | |||
| 55 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..