Test Failed
Push — master ( a95317...fac2f0 )
by Paul
03:50
created
autoload.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,13 @@
 block discarded – undo
15 15
 	];
16 16
 	foreach( $namespaces as $prefix => $base_dir ) {
17 17
 		$len = strlen( $prefix );
18
-		if( strncmp( $prefix, $className, $len ) !== 0 )continue;
18
+		if( strncmp( $prefix, $className, $len ) !== 0 ) {
19
+			continue;
20
+		}
19 21
 		$file = $base_dir.str_replace( '\\', '/', substr( $className, $len )).'.php';
20
-		if( !file_exists( $file ))continue;
22
+		if( !file_exists( $file )) {
23
+			continue;
24
+		}
21 25
 		require $file;
22 26
 		break;
23 27
 	}
Please login to merge, or discard this patch.
site-reviews.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_v1' )) {
22 22
 	require_once __DIR__.'/activate.php';
23 23
 }
24
-if( GL_Plugin_Check_v1::shouldDeactivate( __FILE__, array( 'wordpress' => '4.7.0' )))return;
24
+if( GL_Plugin_Check_v1::shouldDeactivate( __FILE__, array( 'wordpress' => '4.7.0' ))) {
25
+	return;
26
+}
25 27
 
26 28
 require_once __DIR__.'/autoload.php';
27 29
 require_once __DIR__.'/helpers.php';
Please login to merge, or discard this patch.
plugin/Handlers/EnqueueAdminAssets.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@  discard block
 block discarded – undo
27 27
 			[],
28 28
 			glsr()->version
29 29
 		);
30
-		if( !$this->isCurrentScreen() )return;
30
+		if( !$this->isCurrentScreen() ) {
31
+			return;
32
+		}
31 33
 		wp_enqueue_script(
32 34
 			Application::ID,
33 35
 			glsr()->url( 'assets/scripts/'.Application::ID.'-admin.js' ),
@@ -86,7 +88,9 @@  discard block
 block discarded – undo
86 88
 	{
87 89
 		$variables = [];
88 90
 		foreach( glsr()->mceShortcodes as $tag => $args ) {
89
-			if( empty( $args['required'] ))continue;
91
+			if( empty( $args['required'] )) {
92
+				continue;
93
+			}
90 94
 			$variables[$tag] = $args['required'];
91 95
 		}
92 96
 		return $variables;
Please login to merge, or discard this patch.
plugin/Handlers/RegisterPostType.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,9 @@
 block discarded – undo
11 11
 	 */
12 12
 	public function handle( Command $command )
13 13
 	{
14
-		if( in_array( $command->postType, get_post_types( ['_builtin' => true] )))return;
14
+		if( in_array( $command->postType, get_post_types( ['_builtin' => true] ))) {
15
+			return;
16
+		}
15 17
 		register_post_type( $command->postType, $command->args );
16 18
 		glsr()->postTypeColumns = wp_parse_args( glsr()->postTypeColumns, [
17 19
 			$command->postType => $command->columns,
Please login to merge, or discard this patch.
plugin/Handlers/RegisterTaxonomy.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,9 @@
 block discarded – undo
57 57
 		global $wp_query;
58 58
 		if( !is_object_in_taxonomy( get_current_screen()->post_type, Application::TAXONOMY )
59 59
 			|| apply_filters( 'site-reviews/disable/filter/category', false )
60
-		)return;
60
+		) {
61
+			return;
62
+		}
61 63
 		printf( '<label class="screen-reader-text" for="%s">%s</label>', Application::TAXONOMY, __( 'Filter by category', 'site-reviews' ));
62 64
 		$selected = isset( $wp_query->query[Application::TAXONOMY] )
63 65
 			? $wp_query->query[Application::TAXONOMY]
Please login to merge, or discard this patch.
plugin/Handlers/RegisterPointers.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,9 @@  discard block
 block discarded – undo
17 17
 		wp_localize_script( Application::ID, 'site_reviews_pointers', [
18 18
 			'pointers' => $pointers,
19 19
 		]);
20
-		if( empty( $pointers ))return;
20
+		if( empty( $pointers )) {
21
+			return;
22
+		}
21 23
 		wp_enqueue_style( 'wp-pointer' );
22 24
 		wp_enqueue_script( 'wp-pointer' );
23 25
 	}
@@ -31,8 +33,12 @@  discard block
 block discarded – undo
31 33
 		$dismissedPointers = explode( ',', (string)$dismissedPointers );
32 34
 		$generatedPointers = [];
33 35
 		foreach( $pointers as $pointer ) {
34
-			if( $pointer['screen'] != glsr_current_screen()->id )continue;
35
-			if( in_array( $pointer['id'], $dismissedPointers ))continue;
36
+			if( $pointer['screen'] != glsr_current_screen()->id ) {
37
+				continue;
38
+			}
39
+			if( in_array( $pointer['id'], $dismissedPointers )) {
40
+				continue;
41
+			}
36 42
 			$generatedPointers[] = $this->generatePointer( $pointer );
37 43
 		}
38 44
 		return $generatedPointers;
Please login to merge, or discard this patch.
plugin/Controllers/MainController.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,9 @@
 block discarded – undo
19 19
 	 */
20 20
 	public function registerPostType()
21 21
 	{
22
-		if( !glsr()->hasPermission() )return;
22
+		if( !glsr()->hasPermission() ) {
23
+			return;
24
+		}
23 25
 		$command = new RegisterPostType([
24 26
 			'capabilities'=> ['create_posts' => 'create_'.Application::POST_TYPE],
25 27
 			'columns' => [
Please login to merge, or discard this patch.
plugin/Controllers/AdminController.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,7 +109,9 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function renderReviewEditor( WP_Post $post )
111 111
 	{
112
-		if( !$this->isReviewEditable( $post ) )return;
112
+		if( !$this->isReviewEditable( $post ) ) {
113
+			return;
114
+		}
113 115
 		glsr()->render( 'editor/review', [
114 116
 			'post' => $post,
115 117
 		]);
@@ -121,7 +123,9 @@  discard block
 block discarded – undo
121 123
 	 */
122 124
 	public function renderReviewNotice( WP_Post $post )
123 125
 	{
124
-		if( !$this->isReviewEditable( $post ) )return;
126
+		if( !$this->isReviewEditable( $post ) ) {
127
+			return;
128
+		}
125 129
 		glsr( Notice::class )->addWarning( __( 'This review is read-only.', 'site-reviews' ));
126 130
 		glsr()->render( 'editor/notice' );
127 131
 	}
@@ -132,13 +136,19 @@  discard block
 block discarded – undo
132 136
 	 */
133 137
 	public function renderTinymceButton()
134 138
 	{
135
-		if( glsr_current_screen()->base != 'post' )return;
139
+		if( glsr_current_screen()->base != 'post' ) {
140
+			return;
141
+		}
136 142
 		$shortcodes = [];
137 143
 		foreach( glsr()->mceShortcodes as $shortcode => $values ) {
138
-			if( !apply_filters( sanitize_title( $shortcode ).'_condition', true ))continue;
144
+			if( !apply_filters( sanitize_title( $shortcode ).'_condition', true )) {
145
+				continue;
146
+			}
139 147
 			$shortcodes[$shortcode] = $values;
140 148
 		}
141
-		if( empty( $shortcodes ))return;
149
+		if( empty( $shortcodes )) {
150
+			return;
151
+		}
142 152
 		glsr()->render( 'editor/tinymce', [
143 153
 			'shortcodes' => $shortcodes,
144 154
 		]);
Please login to merge, or discard this patch.
plugin/Controllers/MenuController.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,9 @@  discard block
 block discarded – undo
20 20
 	{
21 21
 		global $menu, $typenow;
22 22
 		foreach( $menu as $key => $value ) {
23
-			if( !isset( $value[2] ) || $value[2] != 'edit.php?post_type='.Application::POST_TYPE )continue;
23
+			if( !isset( $value[2] ) || $value[2] != 'edit.php?post_type='.Application::POST_TYPE ) {
24
+				continue;
25
+			}
24 26
 			$postCount = wp_count_posts( Application::POST_TYPE );
25 27
 			$pendingCount = glsr( Builder::class )->span( number_format_i18n( $postCount->pending ), [
26 28
 				'class' => 'pending-count',
@@ -52,7 +54,9 @@  discard block
 block discarded – undo
52 54
 		foreach( $pages as $slug => $title ) {
53 55
 			$method = glsr( Helper::class )->buildMethodName( 'render-'.$slug.'-menu' );
54 56
 			$callback = apply_filters( 'site-reviews/addon/submenu/callback', [$this, $method], $slug );
55
-			if( !is_callable( $callback ))continue;
57
+			if( !is_callable( $callback )) {
58
+				continue;
59
+			}
56 60
 			add_submenu_page( 'edit.php?post_type='.Application::POST_TYPE, $title, $title, Application::CAPABILITY, $slug, $callback );
57 61
 		}
58 62
 	}
Please login to merge, or discard this patch.