| @@ 168-179 (lines=12) @@ | ||
| 165 | ||
| 166 | try { |
|
| 167 | switch ( $op ) { |
|
| 168 | case 'AND': |
|
| 169 | foreach ( $params as $i => $p ) { |
|
| 170 | if ( !is_array( $p ) ) { |
|
| 171 | throw new MWException( |
|
| 172 | "Expected array, found " . gettype( $p ) . " at index $i" |
|
| 173 | ); |
|
| 174 | } |
|
| 175 | if ( !$this->isHiddenRecurse( $alldata, $p ) ) { |
|
| 176 | return false; |
|
| 177 | } |
|
| 178 | } |
|
| 179 | return true; |
|
| 180 | ||
| 181 | case 'OR': |
|
| 182 | foreach ( $params as $p ) { |
|
| @@ 181-192 (lines=12) @@ | ||
| 178 | } |
|
| 179 | return true; |
|
| 180 | ||
| 181 | case 'OR': |
|
| 182 | foreach ( $params as $p ) { |
|
| 183 | if ( !is_array( $p ) ) { |
|
| 184 | throw new MWException( |
|
| 185 | "Expected array, found " . gettype( $p ) . " at index $i" |
|
| 186 | ); |
|
| 187 | } |
|
| 188 | if ( $this->isHiddenRecurse( $alldata, $p ) ) { |
|
| 189 | return true; |
|
| 190 | } |
|
| 191 | } |
|
| 192 | return false; |
|
| 193 | ||
| 194 | case 'NAND': |
|
| 195 | foreach ( $params as $i => $p ) { |
|
| @@ 194-205 (lines=12) @@ | ||
| 191 | } |
|
| 192 | return false; |
|
| 193 | ||
| 194 | case 'NAND': |
|
| 195 | foreach ( $params as $i => $p ) { |
|
| 196 | if ( !is_array( $p ) ) { |
|
| 197 | throw new MWException( |
|
| 198 | "Expected array, found " . gettype( $p ) . " at index $i" |
|
| 199 | ); |
|
| 200 | } |
|
| 201 | if ( !$this->isHiddenRecurse( $alldata, $p ) ) { |
|
| 202 | return true; |
|
| 203 | } |
|
| 204 | } |
|
| 205 | return false; |
|
| 206 | ||
| 207 | case 'NOR': |
|
| 208 | foreach ( $params as $p ) { |
|
| @@ 207-218 (lines=12) @@ | ||
| 204 | } |
|
| 205 | return false; |
|
| 206 | ||
| 207 | case 'NOR': |
|
| 208 | foreach ( $params as $p ) { |
|
| 209 | if ( !is_array( $p ) ) { |
|
| 210 | throw new MWException( |
|
| 211 | "Expected array, found " . gettype( $p ) . " at index $i" |
|
| 212 | ); |
|
| 213 | } |
|
| 214 | if ( $this->isHiddenRecurse( $alldata, $p ) ) { |
|
| 215 | return false; |
|
| 216 | } |
|
| 217 | } |
|
| 218 | return true; |
|
| 219 | ||
| 220 | case 'NOT': |
|
| 221 | if ( count( $params ) !== 1 ) { |
|