@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * |
| 61 | 61 | * @var array |
| 62 | 62 | */ |
| 63 | - protected $_context_ = []; |
|
| 63 | + protected $_context_ = [ ]; |
|
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | 66 | * Instantiate a View object. |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | * @return string Rendered HTML. |
| 86 | 86 | * @throws FailedToLoadView If the View URI could not be loaded. |
| 87 | 87 | */ |
| 88 | - public function render( array $context = [] ) { |
|
| 88 | + public function render( array $context = [ ] ) { |
|
| 89 | 89 | |
| 90 | 90 | // Add context to the current instance to make it available within the |
| 91 | 91 | // rendered view. |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | public function render_partial( $uri, array $context = null ) { |
| 141 | 141 | $view = new static( $uri ); |
| 142 | 142 | |
| 143 | - return $view->render( $context ?: $this->_context_ ); |
|
| 143 | + return $view->render( $context ? : $this->_context_ ); |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | * @return string Rendered HTML. |
| 56 | 56 | * @throws FailedToLoadView If the View URI could not be loaded. |
| 57 | 57 | */ |
| 58 | - public function render( array $context = [] ) { |
|
| 58 | + public function render( array $context = [ ] ) { |
|
| 59 | 59 | return wp_kses_post( $this->view->render( $context ) ); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | * @return string Rendered HTML. |
| 34 | 34 | * @throws FailedToLoadView If the View URI could not be loaded. |
| 35 | 35 | */ |
| 36 | - public function render( array $context = [] ); |
|
| 36 | + public function render( array $context = [ ] ); |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Render a partial view. |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | public function register() { |
| 41 | 41 | $this->register_assets(); |
| 42 | 42 | |
| 43 | - add_action( 'init', function () { |
|
| 43 | + add_action( 'init', function() { |
|
| 44 | 44 | add_shortcode( $this->get_tag(), [ $this, 'process_shortcode' ] ); |
| 45 | 45 | } ); |
| 46 | 46 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return string Rendered HTML. |
| 72 | 72 | */ |
| 73 | - public function render( array $context = [] ) { |
|
| 73 | + public function render( array $context = [ ] ) { |
|
| 74 | 74 | try { |
| 75 | 75 | $this->enqueue_assets(); |
| 76 | 76 | $view = new PostEscapedView( new TemplatedView( $this->get_view_uri() ) ); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * @return array Context to pass onto view. |
| 111 | 111 | */ |
| 112 | 112 | protected function get_context( array $atts ) { |
| 113 | - return []; |
|
| 113 | + return [ ]; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | /** |