@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $atts_config = $this->getConfigKey( 'atts' ); |
| 79 | 79 | array_walk( $atts_config, |
| 80 | 80 | function ( $att_properties, $att_label ) use ( &$atts ) { |
| 81 | - $atts[ $att_label ] = $att_properties['default']; |
|
| 81 | + $atts[ $att_label ] = $att_properties[ 'default' ]; |
|
| 82 | 82 | } |
| 83 | 83 | ); |
| 84 | 84 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | array_walk( $atts_config, |
| 105 | 105 | function ( $att_properties, $att_label ) use ( &$atts ) { |
| 106 | 106 | if ( array_key_exists( $att_label, $atts ) ) { |
| 107 | - $validate_function = $att_properties['validate']; |
|
| 107 | + $validate_function = $att_properties[ 'validate' ]; |
|
| 108 | 108 | $atts[ $att_label ] = $validate_function( $atts[ $att_label ] ); |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * |
| 60 | 60 | * @var ShortcodeInterface[] |
| 61 | 61 | */ |
| 62 | - protected $shortcodes = []; |
|
| 62 | + protected $shortcodes = [ ]; |
|
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | 65 | * DependencyManagerInterface implementation. |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * |
| 78 | 78 | * @var ShortcodeUIInterface[] |
| 79 | 79 | */ |
| 80 | - protected $shortcode_uis = []; |
|
| 80 | + protected $shortcode_uis = [ ]; |
|
| 81 | 81 | |
| 82 | 82 | /** |
| 83 | 83 | * Instantiate a ShortcodeManager object. |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | [ $this->config->getSubConfig( $tag ) ] |
| 133 | 133 | ); |
| 134 | 134 | |
| 135 | - $this->shortcodes[] = $this->instantiate( |
|
| 135 | + $this->shortcodes[ ] = $this->instantiate( |
|
| 136 | 136 | ShortcodeInterface::class, |
| 137 | 137 | $shortcode_class, |
| 138 | 138 | [ |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | protected function init_shortcode_ui( $tag ) { |
| 193 | 193 | $shortcode_ui_class = $this->get_shortcode_ui_class( $tag ); |
| 194 | 194 | |
| 195 | - $this->shortcode_uis[] = $this->instantiate( |
|
| 195 | + $this->shortcode_uis[ ] = $this->instantiate( |
|
| 196 | 196 | ShortcodeUIInterface::class, |
| 197 | 197 | $shortcode_ui_class, |
| 198 | 198 | [ |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | */ |
| 229 | 229 | public function register( $context = null ) { |
| 230 | 230 | $context = $this->validate_context( $context ); |
| 231 | - $context['page_template'] = $this->get_page_template(); |
|
| 231 | + $context[ 'page_template' ] = $this->get_page_template(); |
|
| 232 | 232 | |
| 233 | 233 | array_walk( $this->shortcodes, |
| 234 | 234 | function ( ShortcodeInterface $shortcode ) use ( $context ) { |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | * @param null $content Inner content to pass to the shortcode. |
| 300 | 300 | * @return string|false Rendered HTML. |
| 301 | 301 | */ |
| 302 | - public function do_tag( $tag, array $atts = [], $content = null ) { |
|
| 302 | + public function do_tag( $tag, array $atts = [ ], $content = null ) { |
|
| 303 | 303 | \BrightNucleus\Shortcode\do_tag( $tag, $atts, $content ); |
| 304 | 304 | } |
| 305 | 305 | |