Conditions | 6 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | public function validate($manifest) |
||
16 | { |
||
17 | $errors = array(); |
||
18 | |||
19 | if (isset($manifest['config']['sort-packages']) && $manifest['config']['sort-packages']) { |
||
20 | foreach (array('require', 'require-dev', 'conflict', 'replace', 'provide', 'suggest') as $linksSection) { |
||
21 | if (array_key_exists($linksSection, $manifest) && !$this->packagesAreSorted($manifest[$linksSection])) { |
||
22 | array_push($errors, 'Links under '.$linksSection.' section are not sorted.'); |
||
23 | } |
||
24 | } |
||
25 | } |
||
26 | |||
27 | return $errors; |
||
28 | } |
||
29 | |||
53 |