@@ -2263,8 +2263,8 @@ discard block |
||
2263 | 2263 | 'preg_number_unicode', |
2264 | 2264 | ); |
2265 | 2265 | foreach ( $targets as $target ) { |
2266 | - foreach ( $this->tests[ $target ] as $key => $value ) { |
|
2267 | - $this->tests[ $target ][ $key ] = str_replace( '##PREG_DECIMAL_POINT##', $preg_point, $value ); |
|
2266 | + foreach ( $this->tests[$target] as $key => $value ) { |
|
2267 | + $this->tests[$target][$key] = str_replace( '##PREG_DECIMAL_POINT##', $preg_point, $value ); |
|
2268 | 2268 | } |
2269 | 2269 | } |
2270 | 2270 | unset( $preg_point ); |
@@ -2329,7 +2329,7 @@ discard block |
||
2329 | 2329 | |
2330 | 2330 | if ( ( PHP_VERSION_ID >= 50004 && PHP_VERSION_ID <= 50005 ) || phpversion() === '4.3.11' ) { |
2331 | 2331 | $key = array_search( 'f8', $this->test_data_keys, true ); |
2332 | - unset( $this->test_data_keys[ $key ], $this->test_data['f8'] ); |
|
2332 | + unset( $this->test_data_keys[$key], $this->test_data['f8'] ); |
|
2333 | 2333 | } |
2334 | 2334 | } |
2335 | 2335 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | ); |
206 | 206 | |
207 | 207 | // Group some more messages and make error message links work. |
208 | - $preg_search = array( |
|
208 | + $preg_search = array( |
|
209 | 209 | '`^(bc(?:add|sub|mul|div|mod|comp)|str(?:case|natcase|nat)?cmp|strcoll|similar_text|levenshtein)\(\) expects parameter ([12]) to be string, (?:array|object|resource) given$`', |
210 | 210 | '`^fmod\(\) expects parameter ([12]) to be (double|float), (?:string|array|object|resource) given$`', |
211 | 211 | '`^(is_(?:nan|(?:in)?finite))\(\) expects parameter ([12]) to be (double|float), (?:string|array|object|resource) given$`', |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | foreach ( $search as $k => $s ) { |
228 | 228 | if ( strpos( $error_str, $s ) === 0 ) { |
229 | - $error_str = $replace[ $k ]; |
|
229 | + $error_str = $replace[$k]; |
|
230 | 230 | break; |
231 | 231 | } |
232 | 232 | } |
@@ -340,7 +340,7 @@ |
||
340 | 340 | * @param string $haystack |
341 | 341 | * @param string $needle |
342 | 342 | * |
343 | - * @return int|false |
|
343 | + * @return integer|null |
|
344 | 344 | */ |
345 | 345 | function stripos( $haystack, $needle ) { |
346 | 346 | $haystack = strtolower( $haystack ); |
@@ -130,7 +130,7 @@ |
||
130 | 130 | 'si' => 'is_array', // Testing is_callable. |
131 | 131 | ); |
132 | 132 | |
133 | -$extra_variables['boolean_tests'] = array( |
|
133 | +$extra_variables['boolean_tests'] = array( |
|
134 | 134 | 'sq' => 'on', // Testing filter_var() boolean. |
135 | 135 | 'sr' => 'off', // Testing filter_var() boolean. |
136 | 136 | 'ss' => 'yes', // Testing filter_var() boolean. |
@@ -87,11 +87,13 @@ |
||
87 | 87 | ?> |
88 | 88 | <body> |
89 | 89 | <?php |
90 | -else : |
|
90 | +else { |
|
91 | + : |
|
91 | 92 | ?> |
92 | 93 | <body class="static-archive"> |
93 | 94 | <?php |
94 | 95 | endif; |
96 | +} |
|
95 | 97 | ?> |
96 | 98 | |
97 | 99 | <div class="head"> |
@@ -229,8 +229,8 @@ discard block |
||
229 | 229 | * @return string |
230 | 230 | */ |
231 | 231 | function get_tab_title( $tab ) { |
232 | - if ( isset( $this->tests[ $tab ]['title'] ) && is_string( $this->tests[ $tab ]['title'] ) && $this->tests[ $tab ]['title'] !== '' ) { |
|
233 | - return $this->tests[ $tab ]['title']; |
|
232 | + if ( isset( $this->tests[$tab]['title'] ) && is_string( $this->tests[$tab]['title'] ) && $this->tests[$tab]['title'] !== '' ) { |
|
233 | + return $this->tests[$tab]['title']; |
|
234 | 234 | } |
235 | 235 | else { |
236 | 236 | return ''; |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | */ |
260 | 260 | function get_test_group( $test_group = null ) { |
261 | 261 | $key = key( $this->tests ); // Get first item in array. |
262 | - if ( isset( $test_group, $this->tests[ $test_group ] ) ) { |
|
262 | + if ( isset( $test_group, $this->tests[$test_group] ) ) { |
|
263 | 263 | $key = $test_group; |
264 | 264 | } |
265 | 265 | return $key; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | */ |
332 | 332 | function print_table( $test ) { |
333 | 333 | |
334 | - if ( isset( $this->tests[ $test ] ) ) { |
|
334 | + if ( isset( $this->tests[$test] ) ) { |
|
335 | 335 | $GLOBALS['encountered_errors'] = array(); |
336 | 336 | |
337 | 337 | echo ' |
@@ -344,9 +344,9 @@ discard block |
||
344 | 344 | $last_key = null; |
345 | 345 | |
346 | 346 | foreach ( $this->test_data_keys as $key1 ) { |
347 | - $value1 = $this->test_data[ $key1 ]; |
|
347 | + $value1 = $this->test_data[$key1]; |
|
348 | 348 | $legend = ''; |
349 | - if ( isset( $this->test_legend[ $key1 ] ) ) { |
|
349 | + if ( isset( $this->test_legend[$key1] ) ) { |
|
350 | 350 | $legend = '<sup class="fright"><a href="#var-legend-' . $key1 . '">†' . $key1 . '</a></sup>'; |
351 | 351 | } |
352 | 352 | |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | // Top labels. |
425 | 425 | foreach ( $this->test_data_keys as $i => $key ) { |
426 | 426 | |
427 | - $value = $this->test_data[ $key ]; |
|
427 | + $value = $this->test_data[$key]; |
|
428 | 428 | $class = $this->get_table_header_cell_class( $i, $key ); |
429 | 429 | |
430 | 430 | $html .= ' |
@@ -470,15 +470,15 @@ discard block |
||
470 | 470 | */ |
471 | 471 | function get_table_header_group_label( $test ) { |
472 | 472 | $tooltip = ''; |
473 | - if ( isset( $this->tests[ $test ]['tooltip'] ) && $this->tests[ $test ]['tooltip'] !== '' ) { |
|
474 | - $tooltip = ' title="' . $this->tests[ $test ]['tooltip'] . '"'; |
|
473 | + if ( isset( $this->tests[$test]['tooltip'] ) && $this->tests[$test]['tooltip'] !== '' ) { |
|
474 | + $tooltip = ' title="' . $this->tests[$test]['tooltip'] . '"'; |
|
475 | 475 | } |
476 | 476 | |
477 | - if ( isset( $this->tests[ $test ]['url'] ) && $this->tests[ $test ]['url'] !== '' ) { |
|
478 | - $group_label = '<a href="' . $this->tests[ $test ]['url'] . '" target="_blank"' . $tooltip . '><strong>' . $this->tests[ $test ]['title'] . '</strong></a>'; |
|
477 | + if ( isset( $this->tests[$test]['url'] ) && $this->tests[$test]['url'] !== '' ) { |
|
478 | + $group_label = '<a href="' . $this->tests[$test]['url'] . '" target="_blank"' . $tooltip . '><strong>' . $this->tests[$test]['title'] . '</strong></a>'; |
|
479 | 479 | } |
480 | 480 | else { |
481 | - $group_label = '<a href="' . $this->tests[ $test ]['url'] . '" target="_blank"' . $tooltip . '><strong>' . $this->tests[ $test ]['title'] . '</strong></a>'; |
|
481 | + $group_label = '<a href="' . $this->tests[$test]['url'] . '" target="_blank"' . $tooltip . '><strong>' . $this->tests[$test]['title'] . '</strong></a>'; |
|
482 | 482 | } |
483 | 483 | |
484 | 484 | return $group_label; |
@@ -494,8 +494,8 @@ discard block |
||
494 | 494 | */ |
495 | 495 | function get_table_header_group_notes( $test ) { |
496 | 496 | $notes = ''; |
497 | - if ( isset( $this->tests[ $test ]['notes'] ) && ( is_array( $this->tests[ $test ]['notes'] ) && count( $this->tests[ $test ]['notes'] ) > 0 ) ) { |
|
498 | - foreach ( $this->tests[ $test ]['notes'] as $key => $note ) { |
|
497 | + if ( isset( $this->tests[$test]['notes'] ) && ( is_array( $this->tests[$test]['notes'] ) && count( $this->tests[$test]['notes'] ) > 0 ) ) { |
|
498 | + foreach ( $this->tests[$test]['notes'] as $key => $note ) { |
|
499 | 499 | $notes .= ' <sup><a href="#' . $test . '-note' . ( $key + 1 ) . '">‡' . ( $key + 1 ) . '</a></sup>'; |
500 | 500 | } |
501 | 501 | } |
@@ -513,7 +513,7 @@ discard block |
||
513 | 513 | */ |
514 | 514 | function get_table_header_cell_class( $index, $key ) { |
515 | 515 | $class = ''; |
516 | - if ( ! isset( $this->test_data_keys[ ( $index + 1 ) ] ) || substr( $key, 0, 1 ) !== substr( $this->test_data_keys[ ( $index + 1 ) ], 0, 1 ) ) { |
|
516 | + if ( ! isset( $this->test_data_keys[( $index + 1 )] ) || substr( $key, 0, 1 ) !== substr( $this->test_data_keys[( $index + 1 )], 0, 1 ) ) { |
|
517 | 517 | $class = ' class="end"'; |
518 | 518 | } |
519 | 519 | |
@@ -559,13 +559,13 @@ discard block |
||
559 | 559 | foreach ( $this->test_data_keys as $i => $key2 ) { |
560 | 560 | $GLOBALS['has_error'] = array(); |
561 | 561 | |
562 | - $value2 = $this->test_data[ $key2 ]; |
|
562 | + $value2 = $this->test_data[$key2]; |
|
563 | 563 | $class = $this->get_table_cell_class( $key1, $key2, $i ); |
564 | 564 | |
565 | 565 | echo ' |
566 | 566 | <td' . $class . '>'; |
567 | 567 | |
568 | - $this->tests[ $test ]['test']( $value1, $value2 ); |
|
568 | + $this->tests[$test]['test']( $value1, $value2 ); |
|
569 | 569 | $this->print_row_cell_error_refs(); |
570 | 570 | |
571 | 571 | echo ' </td>'; |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | */ |
588 | 588 | function get_table_cell_class( $key1, $key2, $index ) { |
589 | 589 | $class = array( 'value1-' . $key1, 'value2-' . $key2 ); |
590 | - if ( ! isset( $this->test_data_keys[ ( $index + 1 ) ] ) || substr( $key2, 0, 1 ) !== substr( $this->test_data_keys[ ( $index + 1 ) ], 0, 1 ) ) { |
|
590 | + if ( ! isset( $this->test_data_keys[( $index + 1 )] ) || substr( $key2, 0, 1 ) !== substr( $this->test_data_keys[( $index + 1 )], 0, 1 ) ) { |
|
591 | 591 | $class[] = 'end'; |
592 | 592 | } |
593 | 593 | |
@@ -603,8 +603,8 @@ discard block |
||
603 | 603 | * @param string $test The current subsection. |
604 | 604 | */ |
605 | 605 | function print_other_footnotes( $test ) { |
606 | - if ( isset( $this->tests[ $test ]['notes'] ) && ( is_array( $this->tests[ $test ]['notes'] ) && count( $this->tests[ $test ]['notes'] ) > 0 ) ) { |
|
607 | - foreach ( $this->tests[ $test ]['notes'] as $key => $note ) { |
|
606 | + if ( isset( $this->tests[$test]['notes'] ) && ( is_array( $this->tests[$test]['notes'] ) && count( $this->tests[$test]['notes'] ) > 0 ) ) { |
|
607 | + foreach ( $this->tests[$test]['notes'] as $key => $note ) { |
|
608 | 608 | printf( |
609 | 609 | ' |
610 | 610 | <div id="%1$s-note%2$s" class="note-appendix"> |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | foreach ( $this->tests as $key => $array ) { |
109 | 109 | // The cheatsheets are still compatible with PHP < 5.3, so there is no way round this. |
110 | 110 | // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.create_functionDeprecated,Generic.PHP.DeprecatedFunctions.Deprecated,WordPress.PHP.RestrictedPHPFunctions.create_function_create_function,WordPress.PHP.NoSilencedErrors.Discouraged |
111 | - $this->tests[ $key ]['test'] = @create_function( $array['arg'], $array['function'] ); |
|
111 | + $this->tests[$key]['test'] = @create_function( $array['arg'], $array['function'] ); |
|
112 | 112 | } |
113 | 113 | } |
114 | 114 | |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | function merge_tests( $overload_tests ) { |
130 | 130 | |
131 | 131 | foreach ( $overload_tests as $key => $array ) { |
132 | - if ( isset( $this->tests[ $key ], $this->tests[ $key ]['function'], $array['function'] ) ) { |
|
133 | - $this->tests[ $key ]['function'] = $array['function']; |
|
132 | + if ( isset( $this->tests[$key], $this->tests[$key]['function'], $array['function'] ) ) { |
|
133 | + $this->tests[$key]['function'] = $array['function']; |
|
134 | 134 | } |
135 | 135 | } |
136 | 136 | } |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | * @return string |
145 | 145 | */ |
146 | 146 | function get_tab_title( $tab ) { |
147 | - if ( isset( $this->test_groups[ $tab ]['title'] ) && is_string( $this->test_groups[ $tab ]['title'] ) && $this->test_groups[ $tab ]['title'] !== '' ) { |
|
148 | - return $this->test_groups[ $tab ]['title']; |
|
147 | + if ( isset( $this->test_groups[$tab]['title'] ) && is_string( $this->test_groups[$tab]['title'] ) && $this->test_groups[$tab]['title'] !== '' ) { |
|
148 | + return $this->test_groups[$tab]['title']; |
|
149 | 149 | } |
150 | 150 | else { |
151 | 151 | return ''; |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | */ |
193 | 193 | function get_test_group( $test_group = null ) { |
194 | 194 | $key = key( $this->test_groups ); // Set the first test group as the default if no test group given. |
195 | - if ( isset( $test_group, $this->test_groups[ $test_group ] ) ) { |
|
195 | + if ( isset( $test_group, $this->test_groups[$test_group] ) ) { |
|
196 | 196 | $key = $test_group; |
197 | 197 | } |
198 | 198 | return $key; |
@@ -228,8 +228,8 @@ discard block |
||
228 | 228 | $this->test_legend = $legend_array; |
229 | 229 | |
230 | 230 | // Merge test group specific variables into the test array. |
231 | - if ( isset( $extra_variables[ $test_group ] ) && $extra_variables[ $test_group ] !== array() ) { |
|
232 | - $this->test_data = array_merge( $this->test_data, $extra_variables[ $test_group ] ); |
|
231 | + if ( isset( $extra_variables[$test_group] ) && $extra_variables[$test_group] !== array() ) { |
|
232 | + $this->test_data = array_merge( $this->test_data, $extra_variables[$test_group] ); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | $keys = array_keys( $this->test_data ); |
@@ -302,11 +302,11 @@ discard block |
||
302 | 302 | ); |
303 | 303 | |
304 | 304 | foreach ( $clean_this as $key => $function ) { |
305 | - if ( isset( $GLOBALS['test_array'], $GLOBALS['test_array'][ $key ] ) && is_resource( $GLOBALS['test_array'][ $key ] ) ) { |
|
306 | - $function( $GLOBALS['test_array'][ $key ] ); |
|
305 | + if ( isset( $GLOBALS['test_array'], $GLOBALS['test_array'][$key] ) && is_resource( $GLOBALS['test_array'][$key] ) ) { |
|
306 | + $function( $GLOBALS['test_array'][$key] ); |
|
307 | 307 | } |
308 | - if ( isset( $this->test_data, $this->test_data[ $key ] ) && is_resource( $this->test_data[ $key ] ) ) { |
|
309 | - $function( $this->test_data[ $key ] ); |
|
308 | + if ( isset( $this->test_data, $this->test_data[$key] ) && is_resource( $this->test_data[$key] ) ) { |
|
309 | + $function( $this->test_data[$key] ); |
|
310 | 310 | } |
311 | 311 | } |
312 | 312 | } |
@@ -369,15 +369,15 @@ discard block |
||
369 | 369 | */ |
370 | 370 | function print_table( $test_group ) { |
371 | 371 | |
372 | - if ( isset( $this->test_groups[ $test_group ] ) ) { |
|
372 | + if ( isset( $this->test_groups[$test_group] ) ) { |
|
373 | 373 | $GLOBALS['encountered_errors'] = array(); |
374 | 374 | |
375 | 375 | echo ' |
376 | 376 | <div id="', $test_group, '">'; |
377 | 377 | |
378 | - if ( isset( $this->test_groups[ $test_group ]['urls'] ) && ( is_array( $this->test_groups[ $test_group ]['urls'] ) && count( $this->test_groups[ $test_group ]['urls'] ) > 0 ) ) { |
|
378 | + if ( isset( $this->test_groups[$test_group]['urls'] ) && ( is_array( $this->test_groups[$test_group]['urls'] ) && count( $this->test_groups[$test_group]['urls'] ) > 0 ) ) { |
|
379 | 379 | echo '<p>References:</p><ul>'; |
380 | - foreach ( $this->test_groups[ $test_group ]['urls'] as $url ) { |
|
380 | + foreach ( $this->test_groups[$test_group]['urls'] as $url ) { |
|
381 | 381 | printf( '<li><a href="%1$s" target="_blank">%1$s</a></li>', $url ); |
382 | 382 | } |
383 | 383 | unset( $url ); |
@@ -390,9 +390,9 @@ discard block |
||
390 | 390 | $last_key = null; |
391 | 391 | |
392 | 392 | foreach ( $this->test_data_keys as $key ) { |
393 | - $value = $this->test_data[ $key ]; |
|
393 | + $value = $this->test_data[$key]; |
|
394 | 394 | $legend = ''; |
395 | - if ( isset( $this->test_legend[ $key ] ) ) { |
|
395 | + if ( isset( $this->test_legend[$key] ) ) { |
|
396 | 396 | $legend = '<sup class="fright"><a href="#var-legend-' . $key . '">†' . $key . '</a></sup>'; |
397 | 397 | } |
398 | 398 | |
@@ -403,7 +403,7 @@ discard block |
||
403 | 403 | $class[] = 'new-var-type'; |
404 | 404 | $last_key = $type; |
405 | 405 | } |
406 | - if ( isset( $this->test_groups[ $test_group ]['target'] ) && $this->test_groups[ $test_group ]['target'] === $type ) { |
|
406 | + if ( isset( $this->test_groups[$test_group]['target'] ) && $this->test_groups[$test_group]['target'] === $type ) { |
|
407 | 407 | $class[] = 'target'; |
408 | 408 | } |
409 | 409 | |
@@ -465,15 +465,15 @@ discard block |
||
465 | 465 | <tr> |
466 | 466 | ' . $group_label; |
467 | 467 | |
468 | - foreach ( $this->test_groups[ $test_group ]['tests'] as $test ) { |
|
468 | + foreach ( $this->test_groups[$test_group]['tests'] as $test ) { |
|
469 | 469 | $class = $this->get_table_header_cell_class( $test_group, $test ); |
470 | - $tooltip = ( isset( $this->tests[ $test ]['tooltip'] ) ? ' title="' . htmlspecialchars( $this->tests[ $test ]['tooltip'], ENT_QUOTES, 'UTF-8' ) . '"' : '' ); |
|
470 | + $tooltip = ( isset( $this->tests[$test]['tooltip'] ) ? ' title="' . htmlspecialchars( $this->tests[$test]['tooltip'], ENT_QUOTES, 'UTF-8' ) . '"' : '' ); |
|
471 | 471 | |
472 | 472 | $html .= ' |
473 | 473 | <th' . $class . '>' . |
474 | - ( ( isset( $this->tests[ $test ]['url'] ) && $this->tests[ $test ]['url'] !== '' ) ? '<a href="' . $this->tests[ $test ]['url'] . '" target="_blank"' . $tooltip . '>' : '' ) . |
|
475 | - $this->tests[ $test ]['title'] . |
|
476 | - ( ( isset( $this->tests[ $test ]['url'] ) && $this->tests[ $test ]['url'] !== '' ) ? '</a>' : '' ); |
|
474 | + ( ( isset( $this->tests[$test]['url'] ) && $this->tests[$test]['url'] !== '' ) ? '<a href="' . $this->tests[$test]['url'] . '" target="_blank"' . $tooltip . '>' : '' ) . |
|
475 | + $this->tests[$test]['title'] . |
|
476 | + ( ( isset( $this->tests[$test]['url'] ) && $this->tests[$test]['url'] !== '' ) ? '</a>' : '' ); |
|
477 | 477 | |
478 | 478 | |
479 | 479 | $html .= $this->get_table_header_note_indicators( $test, $test_group ); |
@@ -498,11 +498,11 @@ discard block |
||
498 | 498 | * @return string |
499 | 499 | */ |
500 | 500 | function get_table_header_group_label( $test_group ) { |
501 | - if ( isset( $this->test_groups[ $test_group ]['book_url'] ) && $this->test_groups[ $test_group ]['book_url'] !== '' ) { |
|
502 | - $group_label = '<th class="label-col"><a href="' . $this->test_groups[ $test_group ]['book_url'] . '" target="_blank">' . $this->test_groups[ $test_group ]['title'] . '</a></th>'; |
|
501 | + if ( isset( $this->test_groups[$test_group]['book_url'] ) && $this->test_groups[$test_group]['book_url'] !== '' ) { |
|
502 | + $group_label = '<th class="label-col"><a href="' . $this->test_groups[$test_group]['book_url'] . '" target="_blank">' . $this->test_groups[$test_group]['title'] . '</a></th>'; |
|
503 | 503 | } |
504 | 504 | else { |
505 | - $group_label = '<th class="label-col">' . $this->test_groups[ $test_group ]['title'] . '</th>'; |
|
505 | + $group_label = '<th class="label-col">' . $this->test_groups[$test_group]['title'] . '</th>'; |
|
506 | 506 | } |
507 | 507 | |
508 | 508 | return $group_label; |
@@ -520,12 +520,12 @@ discard block |
||
520 | 520 | function get_table_header_note_indicators( $test, $test_group ) { |
521 | 521 | $notes = ''; |
522 | 522 | |
523 | - if ( isset( $this->tests[ $test ]['notes'] ) && ( is_array( $this->tests[ $test ]['notes'] ) && count( $this->tests[ $test ]['notes'] ) > 0 ) ) { |
|
523 | + if ( isset( $this->tests[$test]['notes'] ) && ( is_array( $this->tests[$test]['notes'] ) && count( $this->tests[$test]['notes'] ) > 0 ) ) { |
|
524 | 524 | |
525 | - $this->table_notes = array_merge( $this->table_notes, $this->tests[ $test ]['notes'] ); |
|
525 | + $this->table_notes = array_merge( $this->table_notes, $this->tests[$test]['notes'] ); |
|
526 | 526 | $this->table_notes = array_unique( $this->table_notes ); |
527 | 527 | |
528 | - foreach ( $this->tests[ $test ]['notes'] as $note ) { |
|
528 | + foreach ( $this->tests[$test]['notes'] as $note ) { |
|
529 | 529 | $note_id = array_search( $note, $this->table_notes, true ); |
530 | 530 | if ( $note_id !== false ) { |
531 | 531 | $notes .= ' <sup><a href="#' . $test_group . '-note' . ( $note_id + 1 ) . '">‡' . ( $note_id + 1 ) . '</a></sup>'; |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | $class = array(); |
549 | 549 | |
550 | 550 | foreach ( $this->table_header_class_map as $group_key => $classname ) { |
551 | - if ( isset( $this->test_groups[ $test_group ][ $group_key ] ) && in_array( $test, $this->test_groups[ $test_group ][ $group_key ], true ) ) { |
|
551 | + if ( isset( $this->test_groups[$test_group][$group_key] ) && in_array( $test, $this->test_groups[$test_group][$group_key], true ) ) { |
|
552 | 552 | $class[] = $classname; |
553 | 553 | } |
554 | 554 | } |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | */ |
586 | 586 | function print_row_cells( $value, $test_group ) { |
587 | 587 | |
588 | - foreach ( $this->test_groups[ $test_group ]['tests'] as $key => $test ) { |
|
588 | + foreach ( $this->test_groups[$test_group]['tests'] as $key => $test ) { |
|
589 | 589 | $GLOBALS['has_error'] = array(); |
590 | 590 | |
591 | 591 | $class = $this->get_table_row_cell_class( $test_group, $test ); |
@@ -594,7 +594,7 @@ discard block |
||
594 | 594 | <td' . $class . '>'; |
595 | 595 | |
596 | 596 | $val = $this->generate_value( $value ); |
597 | - $this->tests[ $test ]['test']( $val ); |
|
597 | + $this->tests[$test]['test']( $val ); |
|
598 | 598 | $this->print_row_cell_error_refs(); |
599 | 599 | |
600 | 600 | echo ' </td>'; |
@@ -615,13 +615,13 @@ discard block |
||
615 | 615 | */ |
616 | 616 | function get_table_row_cell_class( $test_group, $test ) { |
617 | 617 | $class = array( $test ); |
618 | - if ( in_array( $test, $this->test_groups[ $test_group ]['best'], true ) ) { |
|
618 | + if ( in_array( $test, $this->test_groups[$test_group]['best'], true ) ) { |
|
619 | 619 | $class[] = 'best'; |
620 | 620 | } |
621 | - else if ( in_array( $test, $this->test_groups[ $test_group ]['good'], true ) ) { |
|
621 | + else if ( in_array( $test, $this->test_groups[$test_group]['good'], true ) ) { |
|
622 | 622 | $class[] = 'good'; |
623 | 623 | } |
624 | - if ( in_array( $test, $this->test_groups[ $test_group ]['break_at'], true ) ) { |
|
624 | + if ( in_array( $test, $this->test_groups[$test_group]['break_at'], true ) ) { |
|
625 | 625 | $class[] = 'end'; |
626 | 626 | } |
627 | 627 |