| Conditions | 11 |
| Paths | 192 |
| Total Lines | 282 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | <?php |
||
| 330 | function display_page( $title, $message, $back_button = false, $recovery_form = false ) { |
||
| 331 | |||
| 332 | if ( ! headers_sent() ) { |
||
| 333 | nocache_headers(); |
||
| 334 | header( 'Content-Type: text/html; charset=utf-8' ); |
||
| 335 | } |
||
| 336 | |||
| 337 | $text_direction = 'ltr'; |
||
| 338 | if ( is_rtl() ) { |
||
| 339 | $text_direction = 'rtl'; |
||
| 340 | } |
||
| 341 | ?> |
||
| 342 | <!DOCTYPE html> |
||
| 343 | <html xmlns="http://www.w3.org/1999/xhtml" <?php if ( function_exists( 'language_attributes' ) && function_exists( 'is_rtl' ) ) { |
||
| 344 | language_attributes(); |
||
| 345 | } else { |
||
| 346 | echo "dir='$text_direction'"; |
||
| 347 | } ?>> |
||
| 348 | <head> |
||
| 349 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
||
| 350 | <meta name="viewport" content="width=device-width"> |
||
| 351 | <?php |
||
| 352 | if ( function_exists( 'wp_no_robots' ) ) { |
||
| 353 | wp_no_robots(); |
||
| 354 | } |
||
| 355 | ?> |
||
| 356 | <title><?php echo $title ?></title> |
||
| 357 | <style type="text/css"> |
||
| 358 | html { |
||
| 359 | background: #f6f6f6; |
||
| 360 | } |
||
| 361 | |||
| 362 | body { |
||
| 363 | color: #2e4453; |
||
| 364 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; |
||
| 365 | margin: 2em auto; |
||
| 366 | padding: 1em 2em; |
||
| 367 | max-width: 460px; |
||
| 368 | text-align: left; |
||
| 369 | } |
||
| 370 | body.is-rtl { |
||
| 371 | text-align: right; |
||
| 372 | } |
||
| 373 | h1 { |
||
| 374 | clear: both; |
||
| 375 | color: #3d596d; |
||
| 376 | font-size: 24px; |
||
| 377 | margin:0 0 24px 0; |
||
| 378 | padding: 0; |
||
| 379 | font-weight: 400; |
||
| 380 | } |
||
| 381 | |||
| 382 | #error-message { |
||
| 383 | box-sizing: border-box; |
||
| 384 | background: white; |
||
| 385 | box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #e9eff3; |
||
| 386 | padding: 24px; |
||
| 387 | } |
||
| 388 | |||
| 389 | #error-message img { |
||
| 390 | margin: 0 auto; |
||
| 391 | display: block; |
||
| 392 | } |
||
| 393 | |||
| 394 | #error-page { |
||
| 395 | margin-top: 50px; |
||
| 396 | } |
||
| 397 | |||
| 398 | #error-page p { |
||
| 399 | font-size: 14px; |
||
| 400 | line-height: 1.5; |
||
| 401 | margin: 24px 0 0; |
||
| 402 | } |
||
| 403 | |||
| 404 | #error-page code { |
||
| 405 | font-family: Consolas, Monaco, monospace; |
||
| 406 | } |
||
| 407 | |||
| 408 | ul li { |
||
| 409 | margin-bottom: 10px; |
||
| 410 | font-size: 14px; |
||
| 411 | } |
||
| 412 | |||
| 413 | a { |
||
| 414 | color: #00aadc; |
||
| 415 | } |
||
| 416 | |||
| 417 | label { |
||
| 418 | font-weight: bold; |
||
| 419 | font-size:16px; |
||
| 420 | } |
||
| 421 | |||
| 422 | a:hover, |
||
| 423 | a:active { |
||
| 424 | color: #0085be; |
||
| 425 | } |
||
| 426 | |||
| 427 | a:focus { |
||
| 428 | color: #124964; |
||
| 429 | -webkit-box-shadow: 0 0 0 1px #5b9dd9, |
||
| 430 | 0 0 2px 1px rgba(30, 140, 190, .8); |
||
| 431 | box-shadow: 0 0 0 1px #5b9dd9, |
||
| 432 | 0 0 2px 1px rgba(30, 140, 190, .8); |
||
| 433 | outline: none; |
||
| 434 | } |
||
| 435 | |||
| 436 | .button { |
||
| 437 | background: #00aadc; |
||
| 438 | color: white; |
||
| 439 | border-color: #008ab3; |
||
| 440 | border-style: solid; |
||
| 441 | border-width: 1px 1px 2px; |
||
| 442 | cursor: pointer; |
||
| 443 | display: inline-block; |
||
| 444 | margin: 0; |
||
| 445 | margin-right: 0px; |
||
| 446 | outline: 0; |
||
| 447 | overflow: hidden; |
||
| 448 | font-weight: 500; |
||
| 449 | text-overflow: ellipsis; |
||
| 450 | text-decoration: none; |
||
| 451 | vertical-align: top; |
||
| 452 | box-sizing: border-box; |
||
| 453 | font-size: 14px; |
||
| 454 | line-height: 21px; |
||
| 455 | border-radius: 4px; |
||
| 456 | padding: 7px 14px 9px; |
||
| 457 | -webkit-appearance: none; |
||
| 458 | -moz-appearance: none; |
||
| 459 | appearance: none; |
||
| 460 | font-size: 14px; |
||
| 461 | width: 100%; |
||
| 462 | } |
||
| 463 | |||
| 464 | .button:hover, |
||
| 465 | .button:focus { |
||
| 466 | border-color: #005082; |
||
| 467 | outline: none; |
||
| 468 | } |
||
| 469 | |||
| 470 | .button:focus { |
||
| 471 | border-color: #005082; |
||
| 472 | -webkit-box-shadow: 0 0 3px rgba(0, 115, 170, .8); |
||
| 473 | box-shadow: 0 0 3px rgba(0, 115, 170, .8); |
||
| 474 | outline: none; |
||
| 475 | } |
||
| 476 | .button::-moz-focus-inner { |
||
| 477 | border: 0; |
||
| 478 | } |
||
| 479 | |||
| 480 | .button:active { |
||
| 481 | border-width: 2px 1px 1px; |
||
| 482 | } |
||
| 483 | .gridicon { |
||
| 484 | fill: currentColor; |
||
| 485 | vertical-align: middle; |
||
| 486 | } |
||
| 487 | #error-footer { |
||
| 488 | padding: 16px; |
||
| 489 | } |
||
| 490 | #error-footer a { |
||
| 491 | text-decoration: none; |
||
| 492 | line-height:20px; |
||
| 493 | font-size: 14px; |
||
| 494 | color: #4f748e; |
||
| 495 | } |
||
| 496 | #error-footer a:hover { |
||
| 497 | color: #2e4453; |
||
| 498 | } |
||
| 499 | #error-footer .gridicon{ |
||
| 500 | width: 16px; |
||
| 501 | } |
||
| 502 | #error-footer .gridicons-help { |
||
| 503 | width: 24px; |
||
| 504 | margin-right:8px; |
||
| 505 | } |
||
| 506 | |||
| 507 | .is-rtl #error-footer .gridicons-help { |
||
| 508 | margin-left:8px; |
||
| 509 | } |
||
| 510 | |||
| 511 | .error { |
||
| 512 | background: #d94f4f; |
||
| 513 | color:#FFF; |
||
| 514 | display: block; |
||
| 515 | border-radius: 3px; |
||
| 516 | line-height: 1.5; |
||
| 517 | padding: 16px; |
||
| 518 | padding-left: 42px; |
||
| 519 | } |
||
| 520 | .is-rtl .error { |
||
| 521 | padding-right: 42px; |
||
| 522 | } |
||
| 523 | .error .gridicon { |
||
| 524 | float: left; |
||
| 525 | margin-left: -32px; |
||
| 526 | } |
||
| 527 | |||
| 528 | .is-rtl .error .gridicon { |
||
| 529 | float: right; |
||
| 530 | margin-right: -32px; |
||
| 531 | } |
||
| 532 | |||
| 533 | .text-input { |
||
| 534 | margin: 0; |
||
| 535 | padding: 7px 14px; |
||
| 536 | width: 100%; |
||
| 537 | color: #2e4453; |
||
| 538 | font-size: 16px; |
||
| 539 | line-height: 1.5; |
||
| 540 | border: 1px solid #c8d7e1; |
||
| 541 | background-color: white; |
||
| 542 | transition: all .15s ease-in-out; |
||
| 543 | box-sizing: border-box; |
||
| 544 | margin: 8px 0 16px; |
||
| 545 | } |
||
| 546 | #image { |
||
| 547 | display: block; |
||
| 548 | width: 200px; |
||
| 549 | margin: 0 auto; |
||
| 550 | } |
||
| 551 | <?php |
||
| 552 | $rtl_class = ''; |
||
| 553 | if ( 'rtl' == $text_direction ) { |
||
| 554 | $rtl_class = 'class="is-rtl"'; |
||
| 555 | echo 'body { font-family: Tahoma, Arial; }'; |
||
| 556 | } |
||
| 557 | ?> |
||
| 558 | </style> |
||
| 559 | </head> |
||
| 560 | <body id="error-page" <?php echo $rtl_class; ?>> |
||
| 561 | <h1 id="error-title"><?php echo esc_html( $title ); ?></h1> |
||
| 562 | <div id="error-message"> |
||
| 563 | <svg id="image" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 250 134"> |
||
| 564 | <path fill="#E9EFF4" d="M205.2,129.8c3.7-0.7,7.4-0.9,11.1-1.1l5.5-0.1l5.5,0c3.7,0,7.4,0.1,11.1,0.2c3.7,0.1,7.4,0.3,11.1,0.8 c0.3,0,0.5,0.3,0.5,0.6c0,0.2-0.2,0.4-0.5,0.5c-3.7,0.5-7.4,0.6-11.1,0.8c-3.7,0.1-7.4,0.2-11.1,0.2l-5.5,0l-5.5-0.1 c-3.7-0.1-7.4-0.4-11.1-1.1c-0.1,0-0.2-0.2-0.2-0.3C205,129.9,205.1,129.8,205.2,129.8"/> |
||
| 565 | <path fill="#E9EFF4" d="M0.2,130.9c3-0.7,5.9-0.9,8.9-1.1l4.4-0.1l4.4,0c3,0,5.9,0.1,8.9,0.2c3,0.1,5.9,0.3,8.9,0.8 c0.3,0,0.5,0.3,0.4,0.6c0,0.2-0.2,0.4-0.4,0.4c-3,0.5-5.9,0.6-8.9,0.8c-3,0.1-5.9,0.2-8.9,0.2l-4.4,0l-4.4-0.1 c-3-0.1-5.9-0.4-8.9-1.1c-0.1,0-0.2-0.2-0.2-0.3C0,131,0.1,130.9,0.2,130.9"/> |
||
| 566 | <path fill="#C8D7E2" d="M101.6,130.1H70.1V52.5c0-8.5,6.9-15.3,15.3-15.3h16.1V130.1z"/> |
||
| 567 | <path fill="#0DA9DD" d="M191.5,130.1h-73.8v-5.4c0-8.9,7.2-16.1,16.1-16.1h57.7V130.1z"/> |
||
| 568 | <path fill="#C7E9F5" d="M55.2,25.6l-0.1,9.8L55,57l-0.1,21.6c0,0.2,0.2,0.4,0.4,0.4c0.2,0,0.4-0.2,0.4-0.4L56.6,57l0.8-21.6 c0.1-3.3,0.2-6.5,0.3-9.8H55.2z"/> |
||
| 569 | <path fill="#C7E9F5" d="M203.1,25.6l0.1,18.1c0.2,28.8,0.4,57.6,1.2,86.3c0,0.4,0.4,0.8,0.8,0.8c0.4,0,0.8-0.3,0.8-0.8 c0.8-28.8,1-57.6,1.2-86.3l0.1-18.1H203.1z"/> |
||
| 570 | <path fill="#7FD3F2" d="M55.3,25.6v-8.2v-6.8c0-5.9,4-10.7,9-10.7h134c5,0,9,4.8,9,10.7v14.9H55.3z"/> |
||
| 571 | <path fill="#005083" d="M210.7,25.6c-13.3,1.1-26.7,1-40,1l-40,0.2l-40-0.2c-13.3-0.1-26.7,0-40-1V25c13.3-1.1,26.7-1,40-1l40-0.2 l40,0.2c13.3,0.1,26.7,0,40,1V25.6z"/> |
||
| 572 | <polygon fill="#C7E9F5" points="168.7,95.6 117.7,95.6 117.7,44.6 "/> |
||
| 573 | <path fill="#C8D7E2" d="M191.5,56.5c0,11-8.9,19.9-19.9,19.9c-11,0-19.9-8.9-19.9-19.9c0-11,8.9-19.9,19.9-19.9 C182.6,36.6,191.5,45.5,191.5,56.5"/> |
||
| 574 | <path fill="#FFFFFF" d="M213.2,95.5c-3.3-5.1-3.2-16.7-3.2-28.4h-32.3c0,0-5.2,25.5,4.6,33c7.5-0.1,29.9-0.6,29.9-0.6"/> |
||
| 575 | <path fill="#C8D7E2" d="M213.5,95.3l-0.1-0.1l-0.3-0.5c-0.2-0.4-0.3-0.7-0.5-1.1c-0.3-0.8-0.5-1.6-0.7-2.4c-0.1-0.5-0.2-1.1-0.3-1.6 c-0.4,0-0.8,0-1.2,0c0.5,2.1,1.1,4.3,2.4,6.1l0.2,0.2c0.2,0,0.4-0.1,0.5-0.3C213.6,95.5,213.6,95.4,213.5,95.3L213.5,95.3z"/> |
||
| 576 | <path fill="#C8D7E2" d="M212.5,98.6c-0.1,0-0.2,0-0.3,0l-0.1,0H212l-0.3,0l-0.6,0l-1.3,0l-2.5,0l-5,0l-19.5,0.2 c-1.9-1.7-3.1-4.1-3.8-6.5c-0.8-2.6-1.1-5.4-1.2-8.2c-0.2-5.2,0.3-10.4,1.1-15.6l5.7-0.1c0-0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0L42.7,97l-4.8,0 c-0.8,0-1.7,0-2.2,0c-0.6,0.1-1.1,0.3-1.6,0.7c-0.5,0.4-0.8,0.9-1,1.4c-0.2,0.6-0.2,1.1-0.2,2l0,4.8l-0.1,9.6l0,9.6l0,2.4 c0,0.6,0.2,1.3,0.5,1.8c0.6,1.1,1.9,1.8,3.1,1.8l19.2-0.1l9.6-0.1l4.8,0c0.8,0,1.7,0,2.2-0.1c0.6-0.1,1.2-0.4,1.6-0.8 c0.5-0.4,0.8-0.9,1-1.5c0.2-0.6,0.2-1.1,0.2-2l0-4.8L74.8,112.3z"/> |
||
| 585 | <path fill="#86A6BD" d="M48.1,121.4l2.9-6.2c0.3-0.6,0.2-1.3-0.3-1.8c-1-1-1.5-2.5-1.2-4c0.3-1.7,1.7-3.1,3.4-3.4 c2.9-0.6,5.4,1.6,5.4,4.4c0,1.2-0.5,2.3-1.3,3.1c-0.5,0.5-0.6,1.2-0.3,1.8l2.9,6.2c0.1,0.2-0.1,0.5-0.3,0.5H48.4 C48.1,121.9,48,121.6,48.1,121.4"/> |
||
| 586 | </svg> |
||
| 587 | |||
| 588 | <?php echo $message; ?> |
||
| 589 | <?php if ( $recovery_form ) { |
||
| 590 | echo $this->get_html_recovery_form(); |
||
| 591 | } ?> |
||
| 592 | </div> |
||
| 593 | <div id="error-footer"> |
||
| 594 | <?php if ( $back_button && ! $recovery_form ) { |
||
| 595 | if ( 'rtl' == $text_direction ) { |
||
| 596 | $back_button_icon = '<svg class="gridicon gridicons-arrow-right" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8-8-8z"/></g></svg>'; |
||
| 597 | } else { |
||
| 598 | $back_button_icon = '<svg class="gridicon gridicons-arrow-left" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></g></svg>'; |
||
| 599 | } |
||
| 600 | ?> |
||
| 601 | <a href='javascript:history.back()'><?php printf( __( '%s Back' ), $back_button_icon ); ?></a> |
||
| 602 | <?php } else { |
||
| 603 | $help_icon = '<svg class="gridicon gridicons-help" height="24" width="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm1 16h-2v-2h2v2zm0-4.14V15h-2v-2c0-.552.448-1 1-1 1.103 0 2-.897 2-2s-.897-2-2-2-2 .897-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 1.862-1.278 3.413-3 3.86z"/></g></svg>';?> |
||
| 604 | <a href="<?php echo esc_url( self::HELP_URL ); ?>" rel="noopener noreferrer" target="_blank"><?php printf( __( '%s Get help unlocking your site' ), $help_icon );?></a> |
||
| 605 | <?php } ?> |
||
| 606 | </div> |
||
| 607 | </body> |
||
| 608 | </html> |
||
| 609 | <?php |
||
| 610 | die(); |
||
| 611 | } |
||
| 612 | } |
||
| 613 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignorePhpDoc annotation to the duplicate definition and it will be ignored.