Conditions | 7 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | public function isSameBranch(array $item, $branch) |
||
26 | { |
||
27 | $branch = urldecode($branch); |
||
28 | |||
29 | $itemBranch = $this->detailsResolver->resolveBranch($item); |
||
30 | |||
31 | if (!$itemBranch && !$branch) { |
||
32 | return true; |
||
33 | } |
||
34 | |||
35 | if (!$itemBranch && in_array($branch, $this->mainBranches, true)) { |
||
36 | return true; |
||
37 | } |
||
38 | |||
39 | if ($itemBranch === $branch && isset($item['branch'])) { |
||
40 | return true; |
||
41 | } |
||
42 | |||
43 | return false; |
||
44 | } |
||
46 |