@@ -49,7 +49,7 @@ |
||
| 49 | 49 | * @param Item $item The item to add. |
| 50 | 50 | */ |
| 51 | 51 | public function addItem( Item $item ) { |
| 52 | - $this->items[] = $item; |
|
| 52 | + $this->items[ ] = $item; |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -318,13 +318,13 @@ |
||
| 318 | 318 | |
| 319 | 319 | if ( is_array( $groups ) ) { |
| 320 | 320 | foreach ( $groups as $group ) { |
| 321 | - $optgroup = isset( $group['name'] ) && ! empty( $group['name'] ); |
|
| 321 | + $optgroup = isset( $group[ 'name' ] ) && ! empty( $group[ 'name' ] ); |
|
| 322 | 322 | |
| 323 | 323 | if ( $optgroup ) { |
| 324 | - $html .= '<optgroup label="' . $group['name'] . '">'; |
|
| 324 | + $html .= '<optgroup label="' . $group[ 'name' ] . '">'; |
|
| 325 | 325 | } |
| 326 | 326 | |
| 327 | - foreach ( $group['options'] as $value => $label ) { |
|
| 327 | + foreach ( $group[ 'options' ] as $value => $label ) { |
|
| 328 | 328 | $html .= '<option value="' . $value . '" ' . selected( $selected_value, $value, false ) . '>' . $label . '</option>'; |
| 329 | 329 | } |
| 330 | 330 | |
@@ -228,12 +228,12 @@ |
||
| 228 | 228 | |
| 229 | 229 | $ga = explode( '.', $ga_cookie ); |
| 230 | 230 | |
| 231 | - if ( isset( $ga[2] ) && GoogleAnalyticsEcommerce::is_uuid( $ga[2] ) ) { |
|
| 231 | + if ( isset( $ga[ 2 ] ) && GoogleAnalyticsEcommerce::is_uuid( $ga[ 2 ] ) ) { |
|
| 232 | 232 | // Use UUID from cookie. |
| 233 | - $client_id = $ga[2]; |
|
| 234 | - } elseif ( isset( $ga[2], $ga[3] ) ) { |
|
| 233 | + $client_id = $ga[ 2 ]; |
|
| 234 | + } elseif ( isset( $ga[ 2 ], $ga[ 3 ] ) ) { |
|
| 235 | 235 | // Older Google Client ID. |
| 236 | - $client_id = sprintf( '%s.%s', $ga[2], $ga[3] ); |
|
| 236 | + $client_id = sprintf( '%s.%s', $ga[ 2 ], $ga[ 3 ] ); |
|
| 237 | 237 | } |
| 238 | 238 | |
| 239 | 239 | return $client_id; |
@@ -242,11 +242,11 @@ |
||
| 242 | 242 | * @return array |
| 243 | 243 | */ |
| 244 | 244 | public function exclude_subscription_comment_notes( $clauses, $query ) { |
| 245 | - $type = $query->query_vars['type']; |
|
| 245 | + $type = $query->query_vars[ 'type' ]; |
|
| 246 | 246 | |
| 247 | 247 | // Ignore subscription notes comments if it's not specifically requested. |
| 248 | 248 | if ( 'subscription_note' !== $type ) { |
| 249 | - $clauses['where'] .= " AND comment_type != 'subscription_note'"; |
|
| 249 | + $clauses[ 'where' ] .= " AND comment_type != 'subscription_note'"; |
|
| 250 | 250 | } |
| 251 | 251 | |
| 252 | 252 | return $clauses; |
@@ -641,7 +641,7 @@ |
||
| 641 | 641 | $payments = $this->get_payments(); |
| 642 | 642 | |
| 643 | 643 | if ( count( $payments ) > 0 ) { |
| 644 | - return $payments[0]; |
|
| 644 | + return $payments[ 0 ]; |
|
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | return null; |
@@ -70,11 +70,11 @@ |
||
| 70 | 70 | // Git flow |
| 71 | 71 | chdir( $git_dir ); |
| 72 | 72 | |
| 73 | - if ( isset( $argv[1] ) && 'develop' === $argv[1] ) { |
|
| 73 | + if ( isset( $argv[ 1 ] ) && 'develop' === $argv[ 1 ] ) { |
|
| 74 | 74 | `git checkout develop`; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | - if ( isset( $argv[1] ) && 'pull' === $argv[1] ) { |
|
| 77 | + if ( isset( $argv[ 1 ] ) && 'pull' === $argv[ 1 ] ) { |
|
| 78 | 78 | $command = 'git pull'; |
| 79 | 79 | |
| 80 | 80 | echo $command, PHP_EOL; |
@@ -147,15 +147,15 @@ |
||
| 147 | 147 | <?php foreach ( $fields as $i => $field ) : ?> |
| 148 | 148 | |
| 149 | 149 | <p class="pronamic-pay-form-row pronamic-pay-form-row-wide"> |
| 150 | - <label class="pronamic-pay-label" for="<?php echo esc_attr( $field['id'] ); ?>"> |
|
| 151 | - <?php echo esc_html( $field['label'] ); ?> |
|
| 150 | + <label class="pronamic-pay-label" for="<?php echo esc_attr( $field[ 'id' ] ); ?>"> |
|
| 151 | + <?php echo esc_html( $field[ 'label' ] ); ?> |
|
| 152 | 152 | <span class="pronamic-pay-required-indicator">*</span> |
| 153 | 153 | </label> |
| 154 | 154 | |
| 155 | - <?php if ( 'select' === $field['type'] ) : ?> |
|
| 155 | + <?php if ( 'select' === $field[ 'type' ] ) : ?> |
|
| 156 | 156 | |
| 157 | - <select id="<?php echo esc_attr( $field['id'] ); ?>" name="<?php echo esc_attr( $field['name'] ); ?>"> |
|
| 158 | - <?php echo Util::select_options_grouped( $field['choices'] ); ?> |
|
| 157 | + <select id="<?php echo esc_attr( $field[ 'id' ] ); ?>" name="<?php echo esc_attr( $field[ 'name' ] ); ?>"> |
|
| 158 | + <?php echo Util::select_options_grouped( $field[ 'choices' ] ); ?> |
|
| 159 | 159 | </select> |
| 160 | 160 | |
| 161 | 161 | <?php endif; ?> |
@@ -628,47 +628,47 @@ discard block |
||
| 628 | 628 | |
| 629 | 629 | <?php foreach ( $providers as $provider ) : ?> |
| 630 | 630 | |
| 631 | - <?php if ( isset( $provider['resources'] ) && ! empty( $provider['resources'] ) ) : ?> |
|
| 631 | + <?php if ( isset( $provider[ 'resources' ] ) && ! empty( $provider[ 'resources' ] ) ) : ?> |
|
| 632 | 632 | |
| 633 | 633 | <tr class="alternate"> |
| 634 | 634 | <td colspan="4"> |
| 635 | - <strong><?php echo esc_html( $provider['name'] ); ?></strong> |
|
| 636 | - <small><a href="<?php echo esc_attr( $provider['url'] ); ?>"><?php echo esc_html( $provider['url'] ); ?></a></small> |
|
| 635 | + <strong><?php echo esc_html( $provider[ 'name' ] ); ?></strong> |
|
| 636 | + <small><a href="<?php echo esc_attr( $provider[ 'url' ] ); ?>"><?php echo esc_html( $provider[ 'url' ] ); ?></a></small> |
|
| 637 | 637 | </td> |
| 638 | 638 | </tr> |
| 639 | 639 | |
| 640 | - <?php foreach ( $provider['resources'] as $resource ) : ?> |
|
| 640 | + <?php foreach ( $provider[ 'resources' ] as $resource ) : ?> |
|
| 641 | 641 | |
| 642 | 642 | <?php |
| 643 | 643 | |
| 644 | 644 | $href = null; |
| 645 | 645 | |
| 646 | - if ( isset( $resource['path'] ) ) { |
|
| 647 | - $href = plugins_url( $resource['path'], Plugin::$file ); |
|
| 646 | + if ( isset( $resource[ 'path' ] ) ) { |
|
| 647 | + $href = plugins_url( $resource[ 'path' ], Plugin::$file ); |
|
| 648 | 648 | } |
| 649 | 649 | |
| 650 | - if ( isset( $resource['url'] ) ) { |
|
| 651 | - $href = $resource['url']; |
|
| 650 | + if ( isset( $resource[ 'url' ] ) ) { |
|
| 651 | + $href = $resource[ 'url' ]; |
|
| 652 | 652 | } |
| 653 | 653 | |
| 654 | 654 | $classes = array(); |
| 655 | 655 | |
| 656 | - if ( isset( $resource['deprecated'] ) ) { |
|
| 657 | - $classes[] = 'deprecated'; |
|
| 656 | + if ( isset( $resource[ 'deprecated' ] ) ) { |
|
| 657 | + $classes[ ] = 'deprecated'; |
|
| 658 | 658 | } |
| 659 | 659 | |
| 660 | 660 | ?> |
| 661 | 661 | <tr class="<?php echo esc_attr( implode( ' ', $classes ) ); ?>"> |
| 662 | 662 | <td> |
| 663 | 663 | <a href="<?php echo esc_attr( $href ); ?>"> |
| 664 | - <?php echo esc_html( $resource['name'] ); ?> |
|
| 664 | + <?php echo esc_html( $resource[ 'name' ] ); ?> |
|
| 665 | 665 | </a> |
| 666 | 666 | </td> |
| 667 | 667 | <td> |
| 668 | 668 | <?php |
| 669 | 669 | |
| 670 | - if ( isset( $resource['date'] ) ) { |
|
| 671 | - echo esc_html( $resource['date']->format( 'd-m-Y' ) ); |
|
| 670 | + if ( isset( $resource[ 'date' ] ) ) { |
|
| 671 | + echo esc_html( $resource[ 'date' ]->format( 'd-m-Y' ) ); |
|
| 672 | 672 | } |
| 673 | 673 | |
| 674 | 674 | ?> |
@@ -676,8 +676,8 @@ discard block |
||
| 676 | 676 | <td> |
| 677 | 677 | <?php |
| 678 | 678 | |
| 679 | - if ( isset( $resource['version'] ) ) { |
|
| 680 | - echo esc_html( $resource['version'] ); |
|
| 679 | + if ( isset( $resource[ 'version' ] ) ) { |
|
| 680 | + echo esc_html( $resource[ 'version' ] ); |
|
| 681 | 681 | } |
| 682 | 682 | |
| 683 | 683 | ?> |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | // Add empty input field. |
| 92 | - $choices[] = ''; |
|
| 92 | + $choices[ ] = ''; |
|
| 93 | 93 | |
| 94 | 94 | foreach ( $choices as $i => $amount ) { |
| 95 | 95 | if ( ! empty( $amount ) ) { |