@@ -1,6 +1,6 @@ discard block  | 
                                                    ||
| 1 | 1 | <?php  | 
                                                        
| 2 | 2 | |
| 3 | -declare( strict_types=1 );  | 
                                                        |
| 3 | +declare(strict_types=1);  | 
                                                        |
| 4 | 4 | |
| 5 | 5 | /**  | 
                                                        
| 6 | 6 | * The BladeOne Module for Perique.  | 
                                                        
@@ -52,7 +52,7 @@ discard block  | 
                                                    ||
| 52 | 52 | * @param string $template_path  | 
                                                        
| 53 | 53 | * @return self  | 
                                                        
| 54 | 54 | */  | 
                                                        
| 55 | -	public function template_path( string $template_path ): self { | 
                                                        |
| 55 | +	public function template_path(string $template_path): self { | 
                                                        |
| 56 | 56 | $this->template_path = $template_path;  | 
                                                        
| 57 | 57 | return $this;  | 
                                                        
| 58 | 58 | }  | 
                                                        
@@ -63,7 +63,7 @@ discard block  | 
                                                    ||
| 63 | 63 | * @param string $compiled_path  | 
                                                        
| 64 | 64 | * @return self  | 
                                                        
| 65 | 65 | */  | 
                                                        
| 66 | -	public function compiled_path( string $compiled_path ): self { | 
                                                        |
| 66 | +	public function compiled_path(string $compiled_path): self { | 
                                                        |
| 67 | 67 | $this->compiled_path = $compiled_path;  | 
                                                        
| 68 | 68 | return $this;  | 
                                                        
| 69 | 69 | }  | 
                                                        
@@ -74,7 +74,7 @@ discard block  | 
                                                    ||
| 74 | 74 | * @param int $mode  | 
                                                        
| 75 | 75 | * @return self  | 
                                                        
| 76 | 76 | */  | 
                                                        
| 77 | -	public function mode( int $mode ): self { | 
                                                        |
| 77 | +	public function mode(int $mode): self { | 
                                                        |
| 78 | 78 | $this->mode = $mode;  | 
                                                        
| 79 | 79 | return $this;  | 
                                                        
| 80 | 80 | }  | 
                                                        
@@ -85,7 +85,7 @@ discard block  | 
                                                    ||
| 85 | 85 | * @param \Closure(BladeOne_Engine):BladeOne_Engine $config  | 
                                                        
| 86 | 86 | * @return self  | 
                                                        
| 87 | 87 | */  | 
                                                        
| 88 | -	public function config( \Closure $config ): self { | 
                                                        |
| 88 | +	public function config(\Closure $config): self { | 
                                                        |
| 89 | 89 | $this->config = $config;  | 
                                                        
| 90 | 90 | return $this;  | 
                                                        
| 91 | 91 | }  | 
                                                        
@@ -99,19 +99,19 @@ discard block  | 
                                                    ||
| 99 | 99 | * @pram DI_Container $di_container  | 
                                                        
| 100 | 100 | * @return void  | 
                                                        
| 101 | 101 | */  | 
                                                        
| 102 | -	public function pre_boot( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 102 | +	public function pre_boot(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 103 | 103 | |
| 104 | 104 | $wp_upload_dir = wp_upload_dir();  | 
                                                        
| 105 | - $compiled_path = $this->compiled_path ?? sprintf( '%1$s%2$sblade-cache', $wp_upload_dir['basedir'], \DIRECTORY_SEPARATOR ); // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed  | 
                                                        |
| 105 | +		$compiled_path = $this->compiled_path ?? sprintf('%1$s%2$sblade-cache', $wp_upload_dir['basedir'], \DIRECTORY_SEPARATOR); // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 106 | 106 | $instance = new PinkCrab_BladeOne(  | 
                                                        
| 107 | - $this->template_path ?? $config->path( 'view' ),  | 
                                                        |
| 107 | +			$this->template_path ?? $config->path('view'), | 
                                                        |
| 108 | 108 | $compiled_path,  | 
                                                        
| 109 | 109 | $this->mode  | 
                                                        
| 110 | 110 | );  | 
                                                        
| 111 | 111 | |
| 112 | 112 | // Create the compilled path if it does not exist.  | 
                                                        
| 113 | -		if ( ! \file_exists( $compiled_path ) ) { | 
                                                        |
| 114 | - mkdir( $compiled_path );  | 
                                                        |
| 113 | +		if ( ! \file_exists($compiled_path)) { | 
                                                        |
| 114 | + mkdir($compiled_path);  | 
                                                        |
| 115 | 115 | }  | 
                                                        
| 116 | 116 | |
| 117 | 117 | $di_container->addRule(  | 
                                                        
@@ -121,7 +121,7 @@ discard block  | 
                                                    ||
| 121 | 121 | $instance,  | 
                                                        
| 122 | 122 | ),  | 
                                                        
| 123 | 123 | 'call' => array(  | 
                                                        
| 124 | - array( 'allow_pipe', array() ),  | 
                                                        |
| 124 | +					array('allow_pipe', array()), | 
                                                        |
| 125 | 125 | ),  | 
                                                        
| 126 | 126 | )  | 
                                                        
| 127 | 127 | );  | 
                                                        
@@ -153,15 +153,15 @@ discard block  | 
                                                    ||
| 153 | 153 | * @pram DI_Container $di_container  | 
                                                        
| 154 | 154 | * @return void  | 
                                                        
| 155 | 155 | */  | 
                                                        
| 156 | -	public function pre_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 156 | +	public function pre_register(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void { // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 157 | 157 | |
| 158 | 158 | // Pass the config to the provider, if set.  | 
                                                        
| 159 | -		if ( ! is_null( $this->config ) ) { | 
                                                        |
| 160 | - $provider = $di_container->create( Renderable::class );  | 
                                                        |
| 159 | +		if ( ! is_null($this->config)) { | 
                                                        |
| 160 | + $provider = $di_container->create(Renderable::class);  | 
                                                        |
| 161 | 161 | |
| 162 | 162 | // if we have an instance of BladeOne_Engine, pass the config.  | 
                                                        
| 163 | -			if ( $provider instanceof BladeOne_Engine ) { | 
                                                        |
| 164 | - \call_user_func( $this->config, $provider );  | 
                                                        |
| 163 | +			if ($provider instanceof BladeOne_Engine) { | 
                                                        |
| 164 | + \call_user_func($this->config, $provider);  | 
                                                        |
| 165 | 165 | }  | 
                                                        
| 166 | 166 | }  | 
                                                        
| 167 | 167 | }  | 
                                                        
@@ -170,7 +170,7 @@ discard block  | 
                                                    ||
| 170 | 170 | |
| 171 | 171 | |
| 172 | 172 | /** @inheritDoc */  | 
                                                        
| 173 | -	public function post_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {} // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 173 | +	public function post_register(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void {} // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter.FoundInImplementedInterfaceBeforeLastUsed | 
                                                        |
| 174 | 174 | |
| 175 | 175 | /** @inheritDoc */  | 
                                                        
| 176 | 176 |  	public function get_middleware(): ?string { |