Completed
Push — develop ( 509eab...41e75c )
by Paul
04:07
created
src/AliasLoader.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,8 @@
 block discarded – undo
31 31
 	}
32 32
 
33 33
 	private function __clone()
34
-	{}
34
+	{
35
+}
35 36
 
36 37
 	/**
37 38
 	 * Get or create the singleton alias loader instance.
Please login to merge, or discard this patch.
src/MetaBox/PostMetaManager.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@
 block discarded – undo
12 12
 	 */
13 13
 	public function get( $metaKey, array $args = [] )
14 14
 	{
15
-		if( empty( $metaKey ))return;
15
+		if( empty( $metaKey )) {
16
+			return;
17
+		}
16 18
 
17 19
 		$args = $this->normalize( $args );
18 20
 		$metaKey = $this->buildMetaKey( $metaKey, $args['prefix'] );
Please login to merge, or discard this patch.
helpers.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 if( !function_exists( 'pollux_app' )) {
4
-	function pollux_app() {
4
+	function pollux_app()
5
+	{
5 6
 		return GeminiLabs\Pollux\Application::getInstance();
6 7
 	}
7 8
 }
Please login to merge, or discard this patch.
src/Config/Config.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@  discard block
 block discarded – undo
37 37
 	 */
38 38
 	public function init()
39 39
 	{
40
-		if( $this->app->config->disable_config )return;
40
+		if( $this->app->config->disable_config ) {
41
+			return;
42
+		}
41 43
 
42 44
 		add_action( 'admin_menu',     [$this, 'registerPage'] );
43 45
 		add_action( 'admin_menu',     [$this, 'registerSetting'] );
@@ -107,7 +109,9 @@  discard block
 block discarded – undo
107 109
 	{
108 110
 		if( filter_input( INPUT_GET, 'page' ) !== $this->app->id
109 111
 			|| filter_input( INPUT_GET, 'action' ) !== 'reset'
110
-		)return;
112
+		) {
113
+			return;
114
+		}
111 115
 		if( wp_verify_nonce( filter_input( INPUT_GET, '_wpnonce' ), static::id() )) {
112 116
 			delete_option( static::id() );
113 117
 			$this->app->make( ConfigManager::class )->compile( true );
Please login to merge, or discard this patch.
src/Controller.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@  discard block
 block discarded – undo
40 40
 	 */
41 41
 	public function filterWordPressFooter( $text )
42 42
 	{
43
-		if( $this->app->config->remove_wordpress_footer )return;
43
+		if( $this->app->config->remove_wordpress_footer ) {
44
+			return;
45
+		}
44 46
 		return $text;
45 47
 	}
46 48
 
@@ -79,7 +81,9 @@  discard block
 block discarded – undo
79 81
 	 */
80 82
 	public function removeDashboardWidgets()
81 83
 	{
82
-		if( !$this->app->config->remove_dashboard_widgets )return;
84
+		if( !$this->app->config->remove_dashboard_widgets ) {
85
+			return;
86
+		}
83 87
 		$widgets = apply_filters( 'pollux/dashoard/widgets', [
84 88
 			'dashboard_primary',
85 89
 			'dashboard_quick_press',
@@ -95,7 +99,9 @@  discard block
 block discarded – undo
95 99
 	 */
96 100
 	public function removeWordPressMenu()
97 101
 	{
98
-		if( !$this->app->config->remove_wordpress_menu )return;
102
+		if( !$this->app->config->remove_wordpress_menu ) {
103
+			return;
104
+		}
99 105
 		global $wp_admin_bar;
100 106
 		$wp_admin_bar->remove_menu( 'wp-logo' );
101 107
 	}
@@ -122,7 +128,9 @@  discard block
 block discarded – undo
122 128
 	 */
123 129
 	protected function registerCodemirrorAssets( WP_Screen $screen )
124 130
 	{
125
-		if( $screen->id != 'settings_page_pollux' || $screen->pagenow != 'options-general.php' )return;
131
+		if( $screen->id != 'settings_page_pollux' || $screen->pagenow != 'options-general.php' ) {
132
+			return;
133
+		}
126 134
 		wp_enqueue_style( 'pollux/codemirror.css',
127 135
 			$this->app->url( 'assets/codemirror.css' ),
128 136
 			[],
Please login to merge, or discard this patch.
activate.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,9 @@
 block discarded – undo
77 77
 	 */
78 78
 	public function deactivate( $plugin )
79 79
 	{
80
-		if( $this->isValid() )return;
80
+		if( $this->isValid() ) {
81
+			return;
82
+		}
81 83
 		$pluginSlug = plugin_basename( $this->file );
82 84
 		if( $plugin == $pluginSlug ) {
83 85
 			$this->redirect(); //exit
Please login to merge, or discard this patch.
src/MetaBox/Instruction.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@
 block discarded – undo
62 62
 	 */
63 63
 	protected function initInstructions()
64 64
 	{
65
-		if( !$this->showInstructions() )return;
65
+		if( !$this->showInstructions() ) {
66
+			return;
67
+		}
66 68
 		return [
67 69
 			'infodiv' => [
68 70
 				'context' => 'side',
Please login to merge, or discard this patch.
src/MetaBox/MetaBox.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,9 @@  discard block
 block discarded – undo
32 32
 	 */
33 33
 	public function init()
34 34
 	{
35
-		if( empty( $this->app->config->{static::ID} ))return;
35
+		if( empty( $this->app->config->{static::ID} )) {
36
+			return;
37
+		}
36 38
 
37 39
 		$this->normalize( $this->app->config->{static::ID}, [
38 40
 			'post_types' => [],
@@ -263,7 +265,9 @@  discard block
 block discarded – undo
263 265
 	protected function normalizeValidation( array $validation, array $data, $parentId )
264 266
 	{
265 267
 		foreach( ['messages', 'rules'] as $key ) {
266
-			if( empty( $validation[$key] ))continue;
268
+			if( empty( $validation[$key] )) {
269
+				continue;
270
+			}
267 271
 			foreach( $validation[$key] as $id => $value ) {
268 272
 				$validation[$key][$this->normalizeFieldName( $id, ['slug' => $id], $parentId )] = $value;
269 273
 				unset( $validation[$key][$id] );
@@ -280,7 +284,9 @@  discard block
 block discarded – undo
280 284
 		$fields = &$metabox['fields'];
281 285
 		$depends = array_column( $fields, 'depends' );
282 286
 		array_walk( $depends, function( $value, $index ) use( &$fields, $metabox ) {
283
-			if( empty( $value ))return;
287
+			if( empty( $value )) {
288
+				return;
289
+			}
284 290
 			$dependency = array_search( $value, array_column( $fields, 'id' ));
285 291
 			$fields[$index]['attributes']['data-depends'] = $value;
286 292
 			if( !$this->getMetaValue( $fields[$dependency]['slug'], '', $metabox['slug'] )) {
Please login to merge, or discard this patch.
src/Notice.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,9 @@
 block discarded – undo
147 147
 	protected function buildMessage( array $messages )
148 148
 	{
149 149
 		foreach( $messages as $key => &$message ) {
150
-			if( !is_wp_error( $message ))continue;
150
+			if( !is_wp_error( $message )) {
151
+				continue;
152
+			}
151 153
 			$message = $message->get_error_message();
152 154
 		}
153 155
 		return wpautop( implode( PHP_EOL . PHP_EOL, $messages ));
Please login to merge, or discard this patch.