Conditions | 4 |
Paths | 3 |
Total Lines | 23 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
47 | public function setOrganization($organization) |
||
48 | { |
||
49 | |||
50 | // Default |
||
51 | $this->organization = []; |
||
52 | |||
53 | if (null === $organization) { |
||
54 | return $this; |
||
55 | } |
||
56 | |||
57 | // String = members |
||
58 | if (is_string($organization) || is_numeric($organization)) { |
||
59 | $this->organization['member'] = $organization; |
||
60 | return $this; |
||
61 | } |
||
62 | |||
63 | $this->organization = ArrayHelper::merge( |
||
64 | $this->organization, |
||
65 | ArrayHelper::toArray($organization) |
||
66 | ); |
||
67 | |||
68 | return $this; |
||
69 | } |
||
70 | |||
80 |