| Conditions | 6 |
| Paths | 5 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 42 |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | public function merge($bindings, $replace) |
||
| 56 | { |
||
| 57 | foreach($bindings as $key => $binding) { |
||
| 58 | if(isset($this->bindings[$key]) && !$replace) { |
||
| 59 | continue; |
||
| 60 | } |
||
| 61 | if(is_array($binding)) { |
||
| 62 | $this->bindings[$key] = ['binding' => $binding[0]]; |
||
| 63 | if(isset($binding['singleton'])) { |
||
| 64 | $this->bindings[$key]['singleton'] = $binding['singleton']; |
||
| 65 | } |
||
| 66 | } else { |
||
| 67 | $this->bindings[$key] = ['binding' => $binding]; |
||
| 68 | } |
||
| 69 | } |
||
| 70 | } |
||
| 71 | |||
| 73 |