@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @param string|null $content Inner content to pass to the shortcode. |
| 23 | 23 | * @return string|false Rendered HTML. |
| 24 | 24 | */ |
| 25 | - function do_tag( $tag, array $atts = [], $content = null ) { |
|
| 25 | + function do_tag( $tag, array $atts = [ ], $content = null ) { |
|
| 26 | 26 | |
| 27 | 27 | global $shortcode_tags; |
| 28 | 28 | |
@@ -44,5 +44,5 @@ |
||
| 44 | 44 | * @param string|null $content Inner content to pass to the shortcode. |
| 45 | 45 | * @return string|false Rendered HTML. |
| 46 | 46 | */ |
| 47 | - public function do_tag( $tag, array $atts = [], $content = null ); |
|
| 47 | + public function do_tag( $tag, array $atts = [ ], $content = null ); |
|
| 48 | 48 | } |
@@ -53,5 +53,5 @@ |
||
| 53 | 53 | * @param string|null $content Inner content to pass to the shortcode. |
| 54 | 54 | * @return string|false Rendered HTML. |
| 55 | 55 | */ |
| 56 | - public function do_this( array $atts = [], $content = null ); |
|
| 56 | + public function do_this( array $atts = [ ], $content = null ); |
|
| 57 | 57 | } |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | protected function default_atts() { |
| 71 | 71 | |
| 72 | - $atts = []; |
|
| 72 | + $atts = [ ]; |
|
| 73 | 73 | |
| 74 | 74 | if ( ! $this->hasConfigKey( 'atts' ) ) { |
| 75 | 75 | return $atts; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | array_walk( |
| 80 | 80 | $atts_config, |
| 81 | 81 | function ( $att_properties, $att_label ) use ( &$atts ) { |
| 82 | - $atts[ $att_label ] = $att_properties['default']; |
|
| 82 | + $atts[ $att_label ] = $att_properties[ 'default' ]; |
|
| 83 | 83 | } |
| 84 | 84 | ); |
| 85 | 85 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $atts_config, |
| 107 | 107 | function ( $att_properties, $att_label ) use ( &$atts ) { |
| 108 | 108 | if ( array_key_exists( $att_label, $atts ) ) { |
| 109 | - $validate_function = $att_properties['validate']; |
|
| 109 | + $validate_function = $att_properties[ 'validate' ]; |
|
| 110 | 110 | $atts[ $att_label ] = $validate_function( $atts[ $att_label ] ); |
| 111 | 111 | } |
| 112 | 112 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * |
| 64 | 64 | * @var ShortcodeInterface[] |
| 65 | 65 | */ |
| 66 | - protected $shortcodes = []; |
|
| 66 | + protected $shortcodes = [ ]; |
|
| 67 | 67 | |
| 68 | 68 | /** |
| 69 | 69 | * DependencyManagerInterface implementation. |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @var ShortcodeUIInterface[] |
| 92 | 92 | */ |
| 93 | - protected $shortcode_uis = []; |
|
| 93 | + protected $shortcode_uis = [ ]; |
|
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | 96 | * External injector to use. |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | [ 'config' => $this->config->getSubConfig( $tag ) ] |
| 178 | 178 | ); |
| 179 | 179 | |
| 180 | - $this->shortcodes[] = $this->instantiate( |
|
| 180 | + $this->shortcodes[ ] = $this->instantiate( |
|
| 181 | 181 | ShortcodeInterface::class, |
| 182 | 182 | $shortcode_class, |
| 183 | 183 | [ |
@@ -243,7 +243,7 @@ discard block |
||
| 243 | 243 | protected function init_shortcode_ui( $tag ) { |
| 244 | 244 | $shortcode_ui_class = $this->get_shortcode_ui_class( $tag ); |
| 245 | 245 | |
| 246 | - $this->shortcode_uis[] = $this->instantiate( |
|
| 246 | + $this->shortcode_uis[ ] = $this->instantiate( |
|
| 247 | 247 | ShortcodeUIInterface::class, |
| 248 | 248 | $shortcode_ui_class, |
| 249 | 249 | [ |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | $this->init_shortcodes(); |
| 285 | 285 | |
| 286 | 286 | $context = $this->validate_context( $context ); |
| 287 | - $context['page_template'] = $this->get_page_template(); |
|
| 287 | + $context[ 'page_template' ] = $this->get_page_template(); |
|
| 288 | 288 | |
| 289 | 289 | array_walk( |
| 290 | 290 | $this->shortcodes, |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | * |
| 363 | 363 | * @return string|false Rendered HTML. |
| 364 | 364 | */ |
| 365 | - public function do_tag( $tag, array $atts = [], $content = null ) { |
|
| 365 | + public function do_tag( $tag, array $atts = [ ], $content = null ) { |
|
| 366 | 366 | return \BrightNucleus\Shortcode\do_tag( $tag, $atts, $content ); |
| 367 | 367 | } |
| 368 | 368 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | * |
| 80 | 80 | * @since 0.2.3 |
| 81 | 81 | */ |
| 82 | - protected $context = []; |
|
| 82 | + protected $context = [ ]; |
|
| 83 | 83 | |
| 84 | 84 | /** |
| 85 | 85 | * Instantiate Basic Shortcode. |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | */ |
| 236 | 236 | protected function get_dependency_handles() { |
| 237 | 237 | if ( ! $this->hasConfigKey( 'dependencies' ) ) { |
| 238 | - return []; |
|
| 238 | + return [ ]; |
|
| 239 | 239 | } |
| 240 | 240 | return (array) $this->getConfigKey( 'dependencies' ); |
| 241 | 241 | } |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | * @param string|null $content Inner content to pass to the shortcode. |
| 303 | 303 | * @return string|false Rendered HTML. |
| 304 | 304 | */ |
| 305 | - public function do_this( array $atts = [], $content = null ) { |
|
| 305 | + public function do_this( array $atts = [ ], $content = null ) { |
|
| 306 | 306 | return \BrightNucleus\Shortcode\do_tag( $this->get_tag(), $atts, $content ); |
| 307 | 307 | } |
| 308 | 308 | } |