Completed
Push — develop ( 652775...251fde )
by Paul
02:25
created
src/Container.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -185,8 +185,7 @@
 block discarded – undo
185 185
 	{
186 186
 		try {
187 187
 			return $this->make( $parameter->getClass()->name );
188
-		}
189
-		catch( BindingResolutionException $e ) {
188
+		} catch( BindingResolutionException $e ) {
190 189
 			if( $parameter->isOptional() ) {
191 190
 				return $parameter->getDefaultValue();
192 191
 			}
Please login to merge, or discard this patch.
src/Helpers/Theme.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,9 @@
 block discarded – undo
72 72
 	public function pageTitle()
73 73
 	{
74 74
 		foreach( ['is_404', 'is_archive', 'is_home', 'is_page', 'is_search'] as $bool ) {
75
-			if( !$bool() )continue;
75
+			if( !$bool() ) {
76
+				continue;
77
+			}
76 78
 			$method = sprintf( 'get%sTitle', ucfirst( str_replace( 'is_', '', $bool )));
77 79
 			return $this->$method();
78 80
 		}
Please login to merge, or discard this patch.
src/Helpers/Development.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,8 +43,7 @@  discard block
 block discarded – undo
43 43
 			printf( '<div class="print__r"><pre>%s</pre></div>',
44 44
 				htmlspecialchars( print_r( func_get_arg(0), true ), ENT_QUOTES, 'UTF-8' )
45 45
 			);
46
-		}
47
-		else if( $args > 1 ) {
46
+		} else if( $args > 1 ) {
48 47
 			echo '<div class="print__r_group">';
49 48
 			foreach( func_get_args() as $value ) {
50 49
 				$this->print( $value );
@@ -56,7 +55,9 @@  discard block
 block discarded – undo
56 55
 	public function printFiltersFor( $hook = '' )
57 56
 	{
58 57
 		global $wp_filter;
59
-		if( empty( $hook ) || !isset( $wp_filter[$hook] ))return;
58
+		if( empty( $hook ) || !isset( $wp_filter[$hook] )) {
59
+			return;
60
+		}
60 61
 		$this->print( $wp_filter[ $hook ] );
61 62
 	}
62 63
 
Please login to merge, or discard this patch.
src/Helpers/Render.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,9 @@  discard block
 block discarded – undo
33 33
 	{
34 34
 		$post = get_post( $postId );
35 35
 
36
-		if( !$postId || !$post )return;
36
+		if( !$postId || !$post ) {
37
+			return;
38
+		}
37 39
 		if( !$title ) {
38 40
 			$title = $post->post_title;
39 41
 		}
@@ -71,7 +73,9 @@  discard block
 block discarded – undo
71 73
 			? $this->postmeta->get( $metaKey )
72 74
 			: $this->theme->pageTitle();
73 75
 
74
-		if( !$value )return;
76
+		if( !$value ) {
77
+			return;
78
+		}
75 79
 
76 80
 		$this->utility->printTag( $tag, wp_strip_all_tags( $value ), $attributes );
77 81
 	}
Please login to merge, or discard this patch.
src/Video.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,9 @@  discard block
 block discarded – undo
37 37
 
38 38
 	public function render()
39 39
 	{
40
-		if( !isset( $this->video->html ))return;
40
+		if( !isset( $this->video->html )) {
41
+			return;
42
+		}
41 43
 		return sprintf(
42 44
 			'<div class="video embed">%s%s</div>',
43 45
 			$this->renderScreenshot(),
@@ -61,7 +63,9 @@  discard block
 block discarded – undo
61 63
 
62 64
 	public function renderScreenshot()
63 65
 	{
64
-		if( !$this->args['image'] )return;
66
+		if( !$this->args['image'] ) {
67
+			return;
68
+		}
65 69
 		return sprintf( '<div class="video-screenshot" style="background-image: url(%s)">%s</div>',
66 70
 			$this->args['image'],
67 71
 			$this->renderPlayButton()
@@ -99,7 +103,9 @@  discard block
 block discarded – undo
99 103
 
100 104
 		foreach( $this->args as $key => $value ) {
101 105
 			$method = $this->utility->buildMethodName( $key, 'set' );
102
-			if( !method_exists( $this, $method ))continue;
106
+			if( !method_exists( $this, $method )) {
107
+				continue;
108
+			}
103 109
 			call_user_func([ $this, $method ], $value );
104 110
 		}
105 111
 		return $this->args;
Please login to merge, or discard this patch.
src/Gallery.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,9 @@  discard block
 block discarded – undo
65 65
 	{
66 66
 		$image = $this->image->get( $attachment->ID )->image;
67 67
 
68
-		if( !$image )return;
68
+		if( !$image ) {
69
+			return;
70
+		}
69 71
 		return sprintf(
70 72
 			'<figure class="gallery-image" data-w="%s" data-h="%s" data-ps=\'%s\' itemprop="associatedMedia" itemscope itemtype="http://schema.org/ImageObject">' .
71 73
 				'%s<figcaption itemprop="caption description">' .
@@ -86,7 +88,9 @@  discard block
 block discarded – undo
86 88
 	 */
87 89
 	public function renderPagination()
88 90
 	{
89
-		if( !$this->args['pagination'] )return;
91
+		if( !$this->args['pagination'] ) {
92
+			return;
93
+		}
90 94
 		return paginate_links([
91 95
 			'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'castor' ) . ' </span>',
92 96
 			'current'            => $this->gallery->query['paged'],
Please login to merge, or discard this patch.
src/Image.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,9 @@  discard block
 block discarded – undo
25 25
 	 */
26 26
 	public function get( $attachment )
27 27
 	{
28
-		if( !( $attachment = $this->normalize( $attachment )))return;
28
+		if( !( $attachment = $this->normalize( $attachment ))) {
29
+			return;
30
+		}
29 31
 		if( $thumbnail = wp_get_attachment_image_src( $attachment, 'thumbnail' )) {
30 32
 			$medium = $this->normalizeSrc( wp_get_attachment_image_src( $attachment, 'medium' ), $thumbnail );
31 33
 			$large = $this->normalizeSrc( wp_get_attachment_image_src( $attachment, 'large' ), $medium );
@@ -59,7 +61,9 @@  discard block
 block discarded – undo
59 61
 
60 62
 		$attachment = get_post( $attachmentId );
61 63
 
62
-		if( is_null( $attachment ) || $attachment->post_type != 'attachment' )return;
64
+		if( is_null( $attachment ) || $attachment->post_type != 'attachment' ) {
65
+			return;
66
+		}
63 67
 
64 68
 		return $attachment->ID;
65 69
 	}
Please login to merge, or discard this patch.
src/Helpers/PostMeta.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,9 @@
 block discarded – undo
6 6
 {
7 7
 	public function get( $metaKey, array $args = [] )
8 8
 	{
9
-		if( empty( $metaKey ))return;
9
+		if( empty( $metaKey )) {
10
+			return;
11
+		}
10 12
 
11 13
 		$args = $this->normalize( $args );
12 14
 		$metaKey = $this->buildMetaKey( $metaKey, $args['prefix'] );
Please login to merge, or discard this patch.