Passed
Push — master ( fa9b37...f0273c )
by Paul
11:22 queued 05:25
created
src/PostType/PostType.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,9 @@
 block discarded – undo
44 44
 	 */
45 45
 	public function init()
46 46
 	{
47
-		if( empty( $this->app->config->post_types ))return;
47
+		if( empty( $this->app->config->post_types )) {
48
+			return;
49
+		}
48 50
 
49 51
 		$this->setColumns();
50 52
 		$this->normalize();
Please login to merge, or discard this patch.
src/PostType/Archive.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -129,7 +129,9 @@  discard block
 block discarded – undo
129 129
 	 */
130 130
 	public function registerFeaturedImageMetaBox()
131 131
 	{
132
-		if( !current_user_can( 'upload_files' ))return;
132
+		if( !current_user_can( 'upload_files' )) {
133
+			return;
134
+		}
133 135
 		add_meta_box( 'postimagediv', __( 'Featured Image', 'pollux' ), [$this, 'renderFeaturedImageMetaBox'], null, 'side', 'low' );
134 136
 	}
135 137
 
@@ -205,7 +207,9 @@  discard block
 block discarded – undo
205 207
 	public function renderPage()
206 208
 	{
207 209
 		$type = $this->getPostType();
208
-		if( empty( $type ))return;
210
+		if( empty( $type )) {
211
+			return;
212
+		}
209 213
 		$labels = get_post_type_labels( get_post_type_object( $type ));
210 214
 		$this->app->render( 'archive/index', [
211 215
 			'columns' => get_current_screen()->get_columns(),
Please login to merge, or discard this patch.
uninstall.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,9 @@
 block discarded – undo
3 3
 defined( 'WP_UNINSTALL_PLUGIN' ) || die;
4 4
 
5 5
 require_once __DIR__.'/pollux.php';
6
-if( !(new GL_Plugin_Check_v3( __FILE__ ))->isValid() )return;
6
+if( !(new GL_Plugin_Check_v3( __FILE__ ))->isValid() ) {
7
+	return;
8
+}
7 9
 
8 10
 delete_option( GeminiLabs\Pollux\Config\Config::id() );
9 11
 delete_option( GeminiLabs\Pollux\PostType\Archive::id() );
Please login to merge, or discard this patch.
pollux.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,9 @@
 block discarded – undo
21 21
 if( !class_exists( 'GL_Plugin_Check_v3' )) {
22 22
 	require_once __DIR__.'/activate.php';
23 23
 }
24
-if( !(new GL_Plugin_Check_v3( __FILE__ ))->canProceed() )return;
24
+if( !(new GL_Plugin_Check_v3( __FILE__ ))->canProceed() ) {
25
+	return;
26
+}
25 27
 require_once __DIR__.'/autoload.php';
26 28
 require_once __DIR__.'/helpers.php';
27 29
 require_once __DIR__.'/thirdparty.php';
Please login to merge, or discard this patch.
autoload.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,7 @@  discard block
 block discarded – undo
5 5
 /**
6 6
  * PSR-4 autoloader
7 7
  */
8
-spl_autoload_register( function( $class )
9
-{
8
+spl_autoload_register( function( $class ) {
10 9
 	$namespaces = [
11 10
 		'GeminiLabs\\Pollux\\' => __DIR__ . '/src/',
12 11
 		'GeminiLabs\\Pollux\\Tests\\' => __DIR__ . '/tests/',
@@ -14,9 +13,13 @@  discard block
 block discarded – undo
14 13
 	];
15 14
 	foreach( $namespaces as $prefix => $base_dir ) {
16 15
 		$len = strlen( $prefix );
17
-		if( strncmp( $prefix, $class, $len ) !== 0 )continue;
16
+		if( strncmp( $prefix, $class, $len ) !== 0 ) {
17
+			continue;
18
+		}
18 19
 		$file = $base_dir . str_replace( '\\', '/', substr( $class, $len ) ) . '.php';
19
-		if( !file_exists( $file ) )continue;
20
+		if( !file_exists( $file ) ) {
21
+			continue;
22
+		}
20 23
 		require $file;
21 24
 		break;
22 25
 	}
Please login to merge, or discard this patch.
src/PostType/DisablePosts.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,9 @@  discard block
 block discarded – undo
23 23
 	 */
24 24
 	public function init()
25 25
 	{
26
-		if( !$this->app->config->disable_posts )return;
26
+		if( !$this->app->config->disable_posts ) {
27
+			return;
28
+		}
27 29
 
28 30
 		remove_action( 'welcome_panel', 'wp_welcome_panel' );
29 31
 
@@ -46,7 +48,9 @@  discard block
 block discarded – undo
46 48
 	{
47 49
 		if( !in_array( Helper::getCurrentScreen()->pagenow, [
48 50
 			'edit.php', 'edit-tags.php', 'post-new.php',
49
-		]))return;
51
+		])) {
52
+			return;
53
+		}
50 54
 
51 55
 		if( !filter_input_array( INPUT_GET, [
52 56
 			'post_type' => FILTER_DEFAULT,
@@ -98,11 +102,15 @@  discard block
 block discarded – undo
98 102
 	 */
99 103
 	public function modifyDashboardWidgets()
100 104
 	{
101
-		if( !is_blog_admin() || !current_user_can( 'edit_posts' ))return;
105
+		if( !is_blog_admin() || !current_user_can( 'edit_posts' )) {
106
+			return;
107
+		}
102 108
 
103 109
 		global $wp_meta_boxes;
104 110
 		$widgets = &$wp_meta_boxes['dashboard']['normal']['core'];
105
-		if( !isset( $widgets['dashboard_right_now']['callback'] ))return;
111
+		if( !isset( $widgets['dashboard_right_now']['callback'] )) {
112
+			return;
113
+		}
106 114
 		$widgets['dashboard_right_now']['callback'] = function() {
107 115
 			ob_start();
108 116
 			wp_dashboard_right_now();
Please login to merge, or discard this patch.
src/MetaBox/Condition.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,9 @@  discard block
 block discarded – undo
68 68
 	protected function isAbsoluteConditionValid( $method, array $values )
69 69
 	{
70 70
 		foreach( $values as $value ) {
71
-			if( $this->$method( $value ))continue;
71
+			if( $this->$method( $value )) {
72
+				continue;
73
+			}
72 74
 			return false;
73 75
 		}
74 76
 		return true;
@@ -98,7 +100,9 @@  discard block
 block discarded – undo
98 100
 	protected function isLooseConditionValid( $method, array $values )
99 101
 	{
100 102
 		foreach( $values as $value ) {
101
-			if( !$this->$method( $value ))continue;
103
+			if( !$this->$method( $value )) {
104
+				continue;
105
+			}
102 106
 			return true;
103 107
 		}
104 108
 		return false;
Please login to merge, or discard this patch.
src/Settings/Settings.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,9 @@  discard block
 block discarded – undo
38 38
 	 */
39 39
 	public function init()
40 40
 	{
41
-		if( !$this->canProceed() )return;
41
+		if( !$this->canProceed() ) {
42
+			return;
43
+		}
42 44
 
43 45
 		$this->normalize( $this->app->config->{static::ID} );
44 46
 
@@ -124,7 +126,9 @@  discard block
 block discarded – undo
124 126
 	 */
125 127
 	public function register()
126 128
 	{
127
-		if( Helper::getCurrentScreen()->id != $this->hook )return;
129
+		if( Helper::getCurrentScreen()->id != $this->hook ) {
130
+			return;
131
+		}
128 132
 		if( $this->app->gatekeeper->hasDependency( self::DEPENDENCY )) {
129 133
 			foreach( parent::register() as $metabox ) {
130 134
 				new RWMetaBox( $metabox, static::ID, $this );
@@ -169,7 +173,9 @@  discard block
 block discarded – undo
169 173
 	 */
170 174
 	public function renderFooterScript()
171 175
 	{
172
-		if( Helper::getCurrentScreen()->id != $this->hook )return;
176
+		if( Helper::getCurrentScreen()->id != $this->hook ) {
177
+			return;
178
+		}
173 179
 		$this->app->render( 'settings/script', [
174 180
 			'confirm' => __( 'Are you sure want to do this?', 'pollux' ),
175 181
 			'hook' => $this->hook,
@@ -217,7 +223,9 @@  discard block
 block discarded – undo
217 223
 	{
218 224
 		if( filter_input( INPUT_GET, 'page' ) !== static::id()
219 225
 			|| filter_input( INPUT_GET, 'action' ) !== 'reset'
220
-		)return;
226
+		) {
227
+			return;
228
+		}
221 229
 		if( wp_verify_nonce( filter_input( INPUT_GET, '_wpnonce' ), $this->hook )) {
222 230
 			update_option( static::id(), $this->getDefaults() );
223 231
 			add_settings_error( static::id(), 'reset', __( 'Reset successful.', 'pollux' ), 'updated' );
Please login to merge, or discard this patch.
src/Taxonomy/Taxonomy.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@  discard block
 block discarded – undo
35 35
 	 */
36 36
 	public function init()
37 37
 	{
38
-		if( empty( $this->app->config->taxonomies ))return;
38
+		if( empty( $this->app->config->taxonomies )) {
39
+			return;
40
+		}
39 41
 
40 42
 		$this->normalize();
41 43
 
@@ -50,10 +52,14 @@  discard block
 block discarded – undo
50 52
 	 */
51 53
 	public function filterByTaxonomy( WP_Query $query )
52 54
 	{
53
-		if( !is_admin() || Helper::getCurrentScreen()->base != 'edit' )return;
55
+		if( !is_admin() || Helper::getCurrentScreen()->base != 'edit' ) {
56
+			return;
57
+		}
54 58
 		$vars = &$query->query_vars;
55 59
 		foreach( array_keys( $this->taxonomies ) as $taxonomy ) {
56
-			if( !isset( $vars[$taxonomy] ))return;
60
+			if( !isset( $vars[$taxonomy] )) {
61
+				return;
62
+			}
57 63
 			if( $term = get_term_by( 'id', $vars[$taxonomy], $taxonomy )) {
58 64
 				$vars[$taxonomy] = $term->slug;
59 65
 			}
@@ -69,7 +75,9 @@  discard block
 block discarded – undo
69 75
 	{
70 76
 		global $wp_query;
71 77
 		foreach( $this->taxonomies as $taxonomy => $args ) {
72
-			if( !in_array( get_current_screen()->post_type, $args['post_types'] ))continue;
78
+			if( !in_array( get_current_screen()->post_type, $args['post_types'] )) {
79
+				continue;
80
+			}
73 81
 			$selected = isset( $wp_query->query[$taxonomy] )
74 82
 				? $wp_query->query[$taxonomy]
75 83
 				: false;
Please login to merge, or discard this patch.