@@ -314,7 +314,7 @@ |
||
314 | 314 | * method. |
315 | 315 | * @param array $args Arguments passed to the constructor or |
316 | 316 | * factory method. |
317 | - * @return object Object that implements the interface. |
|
317 | + * @return callable Object that implements the interface. |
|
318 | 318 | * @throws FailedToInstantiateObject If no valid object could be |
319 | 319 | * instantiated. |
320 | 320 | */ |
@@ -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 |