@@ -4,6 +4,10 @@ discard block |
||
4 | 4 | class DataContainer extends \ArrayObject |
5 | 5 | { |
6 | 6 | |
7 | + /** |
|
8 | + * @param string $nameOrArray |
|
9 | + * @param string $value |
|
10 | + */ |
|
7 | 11 | function set($nameOrArray, $value = null) |
8 | 12 | { |
9 | 13 | if (is_array($nameOrArray)) { |
@@ -23,6 +27,9 @@ discard block |
||
23 | 27 | } |
24 | 28 | } |
25 | 29 | |
30 | + /** |
|
31 | + * @param string $name |
|
32 | + */ |
|
26 | 33 | function get($name) |
27 | 34 | { |
28 | 35 | return isset($this[$name]) |
@@ -43,8 +43,8 @@ |
||
43 | 43 | ); |
44 | 44 | if (is_array($this->getUploadRules())) { |
45 | 45 | foreach ($this->getUploadRules() as $rule) { |
46 | - if ( ! is_array($rule)) { |
|
47 | - $rule = array( $rule ); |
|
46 | + if (!is_array($rule)) { |
|
47 | + $rule = array($rule); |
|
48 | 48 | } |
49 | 49 | $name = $rule[0]; |
50 | 50 | $options = isset($rule[1]) ? $rule[1] : null; |
@@ -137,20 +137,20 @@ |
||
137 | 137 | $posA = isset($childA[Specs::POSITION]) ? $childA[Specs::POSITION] : 0; |
138 | 138 | $posB = isset($childB[Specs::POSITION]) ? $childB[Specs::POSITION] : 0; |
139 | 139 | if ($posA < $posB) { |
140 | - return - 1; |
|
140 | + return -1; |
|
141 | 141 | } |
142 | 142 | if ($posA > $posB) { |
143 | 143 | return 1; |
144 | 144 | } |
145 | 145 | if ($childA['__index'] > $childB['__index']) { |
146 | - return - 1; |
|
146 | + return -1; |
|
147 | 147 | } |
148 | 148 | if ($childA['__index'] < $childB['__index']) { |
149 | 149 | return 1; |
150 | 150 | } |
151 | 151 | |
152 | 152 | // if the priority is the same, childB is first |
153 | - return - 1; |
|
153 | + return -1; |
|
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |