Passed
Pull Request — master (#198)
by Glynn
09:05
created
src/Services/View/View.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 	 *
62 62
 	 * @param Renderable $engine
63 63
 	 */
64
-	public function __construct( Renderable $engine, Component_Compiler $component_compiler ) {
64
+	public function __construct(Renderable $engine, Component_Compiler $component_compiler) {
65 65
 		$this->engine             = $engine;
66 66
 		$this->component_compiler = $component_compiler;
67 67
 
68 68
 		// Populate engine with compiler.
69
-		$this->engine->set_component_compiler( $component_compiler );
69
+		$this->engine->set_component_compiler($component_compiler);
70 70
 	}
71 71
 
72 72
 	/**
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 	 * @param bool $print Print or Return the HTML
78 78
 	 * @return string|void
79 79
 	 */
80
-	public function render( string $view, iterable $view_data = array(), bool $print = self::PRINT_VIEW ) {
81
-		return $this->engine->render( $view, $view_data, $print );
80
+	public function render(string $view, iterable $view_data = array(), bool $print = self::PRINT_VIEW) {
81
+		return $this->engine->render($view, $view_data, $print);
82 82
 	}
83 83
 
84 84
 	/**
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
 	 * @param bool $print Print or Return the HTML
89 89
 	 * @return string|void
90 90
 	 */
91
-	public function component( Component $component, bool $print = self::PRINT_VIEW ) {
92
-		return $this->engine->component( $component, $print );
91
+	public function component(Component $component, bool $print = self::PRINT_VIEW) {
92
+		return $this->engine->component($component, $print);
93 93
 	}
94 94
 
95 95
 	/**
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 	 * @param bool $print Print or Return the HTML
100 100
 	 * @return string|void
101 101
 	 */
102
-	public function view_model( View_Model $view_model, bool $print = self::PRINT_VIEW ) {
103
-		return $this->engine->view_model( $view_model, $print );
102
+	public function view_model(View_Model $view_model, bool $print = self::PRINT_VIEW) {
103
+		return $this->engine->view_model($view_model, $print);
104 104
 	}
105 105
 
106 106
 	/**
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @param callable $to_buffer
110 110
 	 * @return string
111 111
 	 */
112
-	public static function print_buffer( callable $to_buffer ): string {
112
+	public static function print_buffer(callable $to_buffer): string {
113 113
 		ob_start();
114 114
 		$to_buffer();
115 115
 		$output = ob_get_contents();
Please login to merge, or discard this patch.
src/Application/App_Factory.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@
 block discarded – undo
61 61
 	}
62 62
 
63 63
 		/**
64
-	 * Gets the defined base path.
65
-	 *
66
-	 * @return string
67
-	 * @since 1.4.0
68
-	 */
64
+		 * Gets the defined base path.
65
+		 *
66
+		 * @return string
67
+		 * @since 1.4.0
68
+		 */
69 69
 	public function get_base_path(): string {
70 70
 		return $this->base_path;
71 71
 	}
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	protected array $modules = array();
64 64
 
65
-	public function __construct( ?string $base_path = null ) {
65
+	public function __construct(?string $base_path = null) {
66 66
 
67
-		if ( null === $base_path ) {
67
+		if (null === $base_path) {
68 68
 			$file_index      = 0;
69 69
 			$trace           = debug_backtrace(); //phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
70
-			$this->base_path = isset( $trace[ $file_index ]['file'] ) ? \trailingslashit( dirname( $trace[ $file_index ]['file'] ) ) : __DIR__;
70
+			$this->base_path = isset($trace[$file_index]['file']) ? \trailingslashit(dirname($trace[$file_index]['file'])) : __DIR__;
71 71
 		} else {
72
-			$this->base_path = \trailingslashit( $base_path );
72
+			$this->base_path = \trailingslashit($base_path);
73 73
 		}
74 74
 
75
-		$this->app = new App( $this->base_path );
75
+		$this->app = new App($this->base_path);
76 76
 	}
77 77
 
78 78
 		/**
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
 	 * @param string $base_view_path
93 93
 	 * @return self
94 94
 	 */
95
-	public function set_base_view_path( string $base_view_path ): self {
96
-		$this->base_view_path = \trailingslashit( $base_view_path );
95
+	public function set_base_view_path(string $base_view_path): self {
96
+		$this->base_view_path = \trailingslashit($base_view_path);
97 97
 
98 98
 		// Set the view base path on the app.
99
-		$this->app->set_view_path( $this->base_view_path );
99
+		$this->app->set_view_path($this->base_view_path);
100 100
 
101 101
 		return $this;
102 102
 	}
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 	public function get_base_view_path(): string {
111 111
 		return null !== $this->base_view_path
112 112
 			? $this->base_view_path
113
-			: \trailingslashit( $this->default_config_paths()['path']['view'] );
113
+			: \trailingslashit($this->default_config_paths()['path']['view']);
114 114
 	}
115 115
 
116 116
 	/**
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 	 * @infection-ignore-all
123 123
 	 * @return self
124 124
 	 */
125
-	public function with_wp_dice( bool $include_default_rules = false ): self {
125
+	public function with_wp_dice(bool $include_default_rules = false): self {
126 126
 		// If the view path is not set, set it to the same as base path.
127
-		if ( null === $this->base_view_path ) {
127
+		if (null === $this->base_view_path) {
128 128
 			$this->base_view_path = $this->base_path;
129 129
 		}
130
-		return $this->default_setup( $include_default_rules );
130
+		return $this->default_setup($include_default_rules);
131 131
 	}
132 132
 
133 133
 	/**
@@ -142,29 +142,29 @@  discard block
 block discarded – undo
142 142
 	 * @param bool $include_default_rules
143 143
 	 * @return self
144 144
 	 */
145
-	public function default_setup( bool $include_default_rules = true ): self {
145
+	public function default_setup(bool $include_default_rules = true): self {
146 146
 		$loader = new Hook_Loader();
147 147
 
148 148
 		// Setup DI Container
149
-		$container = PinkCrab_Dice::withDice( new Dice() );
149
+		$container = PinkCrab_Dice::withDice(new Dice());
150 150
 
151
-		if ( $include_default_rules === true ) {
152
-			$container->addRules( $this->default_di_rules() );
151
+		if ($include_default_rules === true) {
152
+			$container->addRules($this->default_di_rules());
153 153
 		}
154 154
 
155
-		$this->app->set_container( $container );
156
-		$this->app->set_loader( $loader );
155
+		$this->app->set_container($container);
156
+		$this->app->set_loader($loader);
157 157
 
158 158
 		// Set registration middleware
159
-		$module_manager = new Module_Manager( $container, new Registration_Service( $container ) );
160
-		$module_manager->push_module( Hookable_Module::class );
159
+		$module_manager = new Module_Manager($container, new Registration_Service($container));
160
+		$module_manager->push_module(Hookable_Module::class);
161 161
 
162 162
 		// Push any modules that have been added before the module manager was set.
163
-		foreach ( $this->modules as $module ) {
164
-			$module_manager->push_module( $module[0], $module[1] );
163
+		foreach ($this->modules as $module) {
164
+			$module_manager->push_module($module[0], $module[1]);
165 165
 		}
166 166
 
167
-		$this->app->set_module_manager( $module_manager );
167
+		$this->app->set_module_manager($module_manager);
168 168
 
169 169
 		return $this;
170 170
 	}
@@ -177,15 +177,15 @@  discard block
 block discarded – undo
177 177
 	 * @param ?callable(Module, ?Registration_Middleware):Module $callback
178 178
 	 * @return self
179 179
 	 */
180
-	public function module( string $module, ?callable $callback = null ): self {
180
+	public function module(string $module, ?callable $callback = null): self {
181 181
 
182 182
 		// If the Module_Manager has been set in app, add the module to app.
183
-		if ( $this->app->has_module_manager() ) {
184
-			$this->app->module( $module, $callback );
183
+		if ($this->app->has_module_manager()) {
184
+			$this->app->module($module, $callback);
185 185
 			return $this;
186 186
 		}
187 187
 
188
-		$this->modules[] = array( $module, $callback );
188
+		$this->modules[] = array($module, $callback);
189 189
 		return $this;
190 190
 	}
191 191
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 				'shared'     => true,
208 208
 			),
209 209
 			Component_Compiler::class => array(
210
-				'constructParams' => array( 'components' ),
210
+				'constructParams' => array('components'),
211 211
 			),
212 212
 		);
213 213
 	}
@@ -218,10 +218,10 @@  discard block
 block discarded – undo
218 218
 	 * @param array<string,array<string,string|object|callable|null|false|\Closure>> $rules
219 219
 	 * @return self
220 220
 	 */
221
-	public function di_rules( array $rules ): self {
221
+	public function di_rules(array $rules): self {
222 222
 		$this->app->container_config(
223
-			function ( DI_Container $container ) use ( $rules ): void {
224
-				$container->addRules( $rules );
223
+			function(DI_Container $container) use ($rules): void {
224
+				$container->addRules($rules);
225 225
 			}
226 226
 		);
227 227
 		return $this;
@@ -233,8 +233,8 @@  discard block
 block discarded – undo
233 233
 	 * @param array<class-string> $class_list Array of fully namespaced class names.
234 234
 	 * @return self
235 235
 	 */
236
-	public function registration_classes( array $class_list ): self {
237
-		$this->app->registration_classes( $class_list );
236
+	public function registration_classes(array $class_list): self {
237
+		$this->app->registration_classes($class_list);
238 238
 		return $this;
239 239
 	}
240 240
 
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 	 * @param array<string, mixed> $app_config
245 245
 	 * @return self
246 246
 	 */
247
-	public function app_config( array $app_config ): self {
248
-		$this->app->set_app_config( \array_replace_recursive( $this->default_config_paths(), $app_config ) );
247
+	public function app_config(array $app_config): self {
248
+		$this->app->set_app_config(\array_replace_recursive($this->default_config_paths(), $app_config));
249 249
 		return $this;
250 250
 	}
251 251
 
@@ -265,8 +265,8 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function boot(): App {
267 267
 		// Sets default settings if not already set.
268
-		if ( ! $this->app->has_app_config() ) {
269
-			$this->app_config( $this->default_config_paths() );
268
+		if ( ! $this->app->has_app_config()) {
269
+			$this->app_config($this->default_config_paths());
270 270
 		}
271 271
 
272 272
 		return $this->app->boot();
@@ -295,8 +295,8 @@  discard block
 block discarded – undo
295 295
 	private function default_config_paths(): array {
296 296
 		$wp_uploads = \wp_upload_dir();
297 297
 
298
-		$base_path = App_Config_Path_Helper::normalise_path( $this->base_path );
299
-		$view_path = $this->base_view_path ?? App_Config_Path_Helper::assume_view_path( $base_path );
298
+		$base_path = App_Config_Path_Helper::normalise_path($this->base_path);
299
+		$view_path = $this->base_view_path ?? App_Config_Path_Helper::assume_view_path($base_path);
300 300
 
301 301
 		return array(
302 302
 			'path' => array(
@@ -307,9 +307,9 @@  discard block
 block discarded – undo
307 307
 				'upload_current' => $wp_uploads['path'],
308 308
 			),
309 309
 			'url'  => array(
310
-				'plugin'         => App_Config_Path_Helper::assume_base_url( $base_path ),
311
-				'view'           => App_Config_Path_Helper::assume_view_url( $base_path, $view_path ),
312
-				'assets'         => App_Config_Path_Helper::assume_base_url( $base_path ) . '/assets',
310
+				'plugin'         => App_Config_Path_Helper::assume_base_url($base_path),
311
+				'view'           => App_Config_Path_Helper::assume_view_url($base_path, $view_path),
312
+				'assets'         => App_Config_Path_Helper::assume_base_url($base_path) . '/assets',
313 313
 				'upload_root'    => $wp_uploads['baseurl'],
314 314
 				'upload_current' => $wp_uploads['url'],
315 315
 			),
Please login to merge, or discard this patch.
src/Utils/App_Config_Path_Helper.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	 * @param string $path
35 35
 	 * @return string
36 36
 	 */
37
-	public static function normalise_path( string $path ): string {
38
-		return rtrim( $path, '/\\' );
37
+	public static function normalise_path(string $path): string {
38
+		return rtrim($path, '/\\');
39 39
 	}
40 40
 
41 41
 	/**
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 	 * @param string $base_path
45 45
 	 * @return string
46 46
 	 */
47
-	public static function assume_view_path( string $base_path ): string {
47
+	public static function assume_view_path(string $base_path): string {
48 48
 		// Remove any trailing slash.
49
-		$base_path = self::normalise_path( $base_path );
49
+		$base_path = self::normalise_path($base_path);
50 50
 		return $base_path . \DIRECTORY_SEPARATOR . 'views';
51 51
 	}
52 52
 
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 	 * @param string $base_path
57 57
 	 * @return string
58 58
 	 */
59
-	public static function assume_base_url( string $base_path ): string {
59
+	public static function assume_base_url(string $base_path): string {
60 60
 		// Remove any trailing slash.
61
-		$base_path = self::normalise_path( $base_path );
62
-		return plugins_url( basename( $base_path ) );
61
+		$base_path = self::normalise_path($base_path);
62
+		return plugins_url(basename($base_path));
63 63
 	}
64 64
 
65 65
 	/**
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
 	 * @param string $view_path
70 70
 	 * @return string
71 71
 	 */
72
-	public static function assume_view_url( string $base_path, string $view_path ): string {
72
+	public static function assume_view_url(string $base_path, string $view_path): string {
73 73
 
74
-		$base_path = self::normalise_path( $base_path );
75
-		$view_path = self::normalise_path( $view_path );
74
+		$base_path = self::normalise_path($base_path);
75
+		$view_path = self::normalise_path($view_path);
76 76
 
77 77
 		// Remove any trailing slash.
78
-		$diff = ltrim( str_replace( $base_path, '', $view_path ), '/\\' );
78
+		$diff = ltrim(str_replace($base_path, '', $view_path), '/\\');
79 79
 
80 80
 		// Return the base url with the diff.
81
-		return self::assume_base_url( $base_path ) . '/' . $diff;
81
+		return self::assume_base_url($base_path) . '/' . $diff;
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
src/Application/App_Validation.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	/** @var App */
44 44
 	private App $app;
45 45
 
46
-	public function __construct( App $app ) {
46
+	public function __construct(App $app) {
47 47
 		$this->app = $app;
48 48
 	}
49 49
 
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	public function validate(): bool {
56 56
 		$this->already_booted();
57 57
 		$this->validate_properties_set();
58
-		return count( $this->errors ) === 0;
58
+		return count($this->errors) === 0;
59 59
 	}
60 60
 
61 61
 	/**
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 	 * @return void
66 66
 	 */
67 67
 	private function validate_properties_set(): void {
68
-		foreach ( $this->required_properties as $property => $is_static ) {
69
-			$property_reflection = new ReflectionProperty( $this->app, $property );
70
-			$property_reflection->setAccessible( true );
71
-			if ( empty( $property_reflection->getValue( $this->app ) ) ) {
72
-				$this->errors[] = \sprintf( self::ERROR_MESSAGE_TEMPLATE, $property );
68
+		foreach ($this->required_properties as $property => $is_static) {
69
+			$property_reflection = new ReflectionProperty($this->app, $property);
70
+			$property_reflection->setAccessible(true);
71
+			if (empty($property_reflection->getValue($this->app))) {
72
+				$this->errors[] = \sprintf(self::ERROR_MESSAGE_TEMPLATE, $property);
73 73
 			}
74 74
 		}
75 75
 	}
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @return void
81 81
 	 */
82 82
 	private function already_booted(): void {
83
-		if ( $this->app->is_booted() === true ) {
83
+		if ($this->app->is_booted() === true) {
84 84
 			$this->errors[] = self::ERROR_MESSAGE_APP_BOOTED;
85 85
 		}
86 86
 	}
Please login to merge, or discard this patch.
src/Exceptions/App_Initialization_Exception.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 */
37 37
 	public static function requires_di_container(): App_Initialization_Exception {
38 38
 		$message = 'The Application must be populated with a DI_Container before booting.';
39
-		return new App_Initialization_Exception( $message, 1 );
39
+		return new App_Initialization_Exception($message, 1);
40 40
 	}
41 41
 
42 42
 	/**
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 */
47 47
 	public static function di_container_exists(): App_Initialization_Exception {
48 48
 		$message = 'App already contains a DI Container, can not redeclare.';
49
-		return new App_Initialization_Exception( $message, 2 );
49
+		return new App_Initialization_Exception($message, 2);
50 50
 	}
51 51
 
52 52
 	/**
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 	 */
57 57
 	public static function requires_module_manager(): App_Initialization_Exception {
58 58
 		$message = 'App has not defined Registration Service, this must be set before use.';
59
-		return new App_Initialization_Exception( $message, 3 );
59
+		return new App_Initialization_Exception($message, 3);
60 60
 	}
61 61
 
62 62
 	/**
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
 	 * @param string $service The service which has been called without initialising the app.
66 66
 	 * @return App_Initialization_Exception
67 67
 	 */
68
-	public static function app_not_initialized( string $service ): App_Initialization_Exception {
68
+	public static function app_not_initialized(string $service): App_Initialization_Exception {
69 69
 		$message = "App must be initialised before calling {$service}";
70
-		return new App_Initialization_Exception( $message, 4 );
70
+		return new App_Initialization_Exception($message, 4);
71 71
 	}
72 72
 
73 73
 	/**
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 */
78 78
 	public static function app_config_exists(): App_Initialization_Exception {
79 79
 		$message = 'Can not redeclare App_Config as its already set to the application';
80
-		return new App_Initialization_Exception( $message, 5 );
80
+		return new App_Initialization_Exception($message, 5);
81 81
 	}
82 82
 
83 83
 	/**
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public static function registration_exists(): App_Initialization_Exception {
89 89
 		$message = 'Can not redeclare Registration_Service as its already set to the application';
90
-		return new App_Initialization_Exception( $message, 7 );
90
+		return new App_Initialization_Exception($message, 7);
91 91
 	}
92 92
 
93 93
 	/**
@@ -96,12 +96,12 @@  discard block
 block discarded – undo
96 96
 	 * @param array<int,string> $errors
97 97
 	 * @return App_Initialization_Exception
98 98
 	 */
99
-	public static function failed_boot_validation( array $errors ): App_Initialization_Exception {
99
+	public static function failed_boot_validation(array $errors): App_Initialization_Exception {
100 100
 		$message = sprintf(
101 101
 			'App failed boot validation : %s',
102
-			join( ', ', $errors )
102
+			join(', ', $errors)
103 103
 		);
104
-		return new App_Initialization_Exception( $message, 6 );
104
+		return new App_Initialization_Exception($message, 6);
105 105
 	}
106 106
 
107 107
 	/**
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	public static function loader_exists(): App_Initialization_Exception {
113 113
 		$message = 'Can not redeclare Loader as its already set to the application';
114
-		return new App_Initialization_Exception( $message, 8 );
114
+		return new App_Initialization_Exception($message, 8);
115 115
 	}
116 116
 
117 117
 	/**
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 	 */
122 122
 	public static function module_manager_exists(): App_Initialization_Exception {
123 123
 		$message = 'Can not redeclare Module_Manager as its already set to the application';
124
-		return new App_Initialization_Exception( $message, 10 );
124
+		return new App_Initialization_Exception($message, 10);
125 125
 	}
126 126
 
127 127
 }
Please login to merge, or discard this patch.
src/Interfaces/Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 * @pram DI_Container $di_container
47 47
 	 * @return void
48 48
 	 */
49
-	public function pre_boot( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void;
49
+	public function pre_boot(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void;
50 50
 
51 51
 
52 52
 	/**
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @pram DI_Container $di_container
58 58
 	 * @return void
59 59
 	 */
60
-	public function pre_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void;
60
+	public function pre_register(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void;
61 61
 
62 62
 	/**
63 63
 	 * Callback fired after registration is completed.
@@ -67,5 +67,5 @@  discard block
 block discarded – undo
67 67
 	 * @pram DI_Container $di_container
68 68
 	 * @return void
69 69
 	 */
70
-	public function post_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void;
70
+	public function post_register(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void;
71 71
 }
Please login to merge, or discard this patch.
src/Interfaces/DI_Container.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @param array<string, mixed> $rule
37 37
 	 * @return DI_Container
38 38
 	 */
39
-	public function addRule( string $name, array $rule ): DI_Container;
39
+	public function addRule(string $name, array $rule): DI_Container;
40 40
 
41 41
 	/**
42 42
 	 * Add multiple rules
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 * @param array<string, array<mixed>> $rules
45 45
 	 * @return DI_Container
46 46
 	 */
47
-	public function addRules( array $rules ): DI_Container;
47
+	public function addRules(array $rules): DI_Container;
48 48
 
49 49
 	/**
50 50
 	 * Create an instance of a class, with optional parameters.
@@ -53,5 +53,5 @@  discard block
 block discarded – undo
53 53
 	 * @param array<mixed> $args
54 54
 	 * @return object|null
55 55
 	 */
56
-	public function create( string $name, array $args = array() ): ?object;
56
+	public function create(string $name, array $args = array()): ?object;
57 57
 }
Please login to merge, or discard this patch.
src/Services/View/View_Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
 	private array $data = array();
43 43
 
44 44
 	/** @param array<string, mixed> $data */
45
-	public function __construct( string $template, array $data = array() ) {
45
+	public function __construct(string $template, array $data = array()) {
46 46
 		$this->template = $template;
47 47
 		$this->data     = $data;
48 48
 	}
Please login to merge, or discard this patch.
src/Services/Registration/Modules/Hookable_Module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 * @pram DI_Container $di_container
52 52
 	 * @return void
53 53
 	 */
54
-	public function pre_boot( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {
54
+	public function pre_boot(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void {
55 55
 	}
56 56
 
57 57
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 	 * @pram DI_Container $di_container
64 64
 	 * @return void
65 65
 	 */
66
-	public function pre_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {
66
+	public function pre_register(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void {
67 67
 	}
68 68
 
69 69
 	/**
@@ -74,6 +74,6 @@  discard block
 block discarded – undo
74 74
 	 * @pram DI_Container $di_container
75 75
 	 * @return void
76 76
 	 */
77
-	public function post_register( App_Config $config, Hook_Loader $loader, DI_Container $di_container ): void {
77
+	public function post_register(App_Config $config, Hook_Loader $loader, DI_Container $di_container): void {
78 78
 	}
79 79
 }
Please login to merge, or discard this patch.