@@ -28,11 +28,11 @@ |
||
28 | 28 | protected function _validate() |
29 | 29 | { |
30 | 30 | // subvalues cannot be arrays |
31 | - if($this->isSubvalue) { |
|
31 | + if ($this->isSubvalue) { |
|
32 | 32 | return $this->value; |
33 | 33 | } |
34 | 34 | |
35 | - if(is_array($this->value)) { |
|
35 | + if (is_array($this->value)) { |
|
36 | 36 | return $this->value; |
37 | 37 | } |
38 | 38 |
@@ -33,22 +33,22 @@ |
||
33 | 33 | |
34 | 34 | // if we are validating a subvalue, it means we are |
35 | 35 | // validating a single value in the existing list. |
36 | - if($this->isSubvalue) |
|
36 | + if ($this->isSubvalue) |
|
37 | 37 | { |
38 | - if(in_array($this->value, $allowed)) { |
|
38 | + if (in_array($this->value, $allowed)) { |
|
39 | 39 | return $this->value; |
40 | 40 | } |
41 | 41 | |
42 | 42 | return null; |
43 | 43 | } |
44 | 44 | |
45 | - if(!is_array($this->value)) { |
|
45 | + if (!is_array($this->value)) { |
|
46 | 46 | return array(); |
47 | 47 | } |
48 | 48 | |
49 | 49 | $keep = array(); |
50 | - foreach($this->value as $item) { |
|
51 | - if(in_array($item, $allowed)) { |
|
50 | + foreach ($this->value as $item) { |
|
51 | + if (in_array($item, $allowed)) { |
|
52 | 52 | $keep[] = $item; |
53 | 53 | } |
54 | 54 | } |