Passed
Push — master ( 57dde7...525778 )
by Paul
04:33
created
plugin/Modules/Html/Partials/Pagination.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 		$this->args = $this->normalize( $args );
22 22
 		if( $this->args['total'] < 2 )return;
23 23
 		$links = $this->buildLinksForDeprecatedThemes();
24
-		if( empty( $links )) {
24
+		if( empty($links) ) {
25 25
 			$links = $this->buildLinks();
26 26
 		}
27 27
 		$links = apply_filters( 'site-reviews/reviews/navigation_links', $links, $this->args );
28
-		if( empty( $links ))return;
28
+		if( empty($links) )return;
29 29
 		return $this->buildTemplate( $links );
30 30
 	}
31 31
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 			'total' => $this->args['total'],
45 45
 		];
46 46
 		if( is_front_page() ) {
47
-			unset( $paginateArgs['format'] );
47
+			unset($paginateArgs['format']);
48 48
 		}
49 49
 		return paginate_links( $paginateArgs );
50 50
 	}
@@ -55,17 +55,17 @@  discard block
 block discarded – undo
55 55
 	protected function buildLinksForDeprecatedThemes()
56 56
 	{
57 57
 		$theme = wp_get_theme()->get( 'TextDomain' );
58
-		if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] ))return;
58
+		if( !in_array( $theme, ['twentyten', 'twentyeleven', 'twentytwelve', 'twentythirteen'] ) )return;
59 59
 		$links = '';
60 60
 		if( $this->args['paged'] > 1 ) {
61
-			$links.= sprintf( '<div class="nav-previous"><a href="%s"><span class="meta-nav">&larr;</span> %s</a></div>',
61
+			$links .= sprintf( '<div class="nav-previous"><a href="%s"><span class="meta-nav">&larr;</span> %s</a></div>',
62 62
 				$this->buildUrlForDeprecatedThemes(-1),
63 63
 				__( 'Previous', 'site-reviews' )
64 64
 			);
65 65
 		}
66 66
 		if( $this->args['paged'] < $this->args['total'] ) {
67
-			$links.= sprintf( '<div class="nav-next"><a href="%s">%s <span class="meta-nav">&rarr;</span></a></div>',
68
-				$this->buildUrlForDeprecatedThemes(1),
67
+			$links .= sprintf( '<div class="nav-next"><a href="%s">%s <span class="meta-nav">&rarr;</span></a></div>',
68
+				$this->buildUrlForDeprecatedThemes( 1 ),
69 69
 				__( 'Next', 'site-reviews' )
70 70
 			);
71 71
 		}
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 		$class = 'glsr-navigation navigation pagination';
83 83
 		$screenReaderTemplate = '<h2 class="screen-reader-text">%2$s</h2>';
84 84
 		$innerTemplate = $screenReaderTemplate.'<div class="nav-links">%3$s</div>';
85
-		if( in_array( $theme, ['twentyten', 'twentyeleven', 'twentytwelve'] )) {
85
+		if( in_array( $theme, ['twentyten', 'twentyeleven', 'twentytwelve'] ) ) {
86 86
 			$innerTemplate = '%3$s';
87 87
 		}
88 88
 		else if( $theme == 'twentyfourteen' ) {
@@ -115,6 +115,6 @@  discard block
 block discarded – undo
115 115
 		return wp_parse_args( $args, [
116 116
 			'paged' => glsr( QueryBuilder::class )->getPaged(),
117 117
 			'total' => 1,
118
-		]);
118
+		] );
119 119
 	}
120 120
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,13 +19,17 @@  discard block
 block discarded – undo
19 19
 	public function build( array $args = [] )
20 20
 	{
21 21
 		$this->args = $this->normalize( $args );
22
-		if( $this->args['total'] < 2 )return;
22
+		if( $this->args['total'] < 2 ) {
23
+			return;
24
+		}
23 25
 		$links = $this->buildLinksForDeprecatedThemes();
24 26
 		if( empty( $links )) {
25 27
 			$links = $this->buildLinks();
26 28
 		}
27 29
 		$links = apply_filters( 'site-reviews/reviews/navigation_links', $links, $this->args );
28
-		if( empty( $links ))return;
30
+		if( empty( $links )) {
31
+			return;
32
+		}
29 33
 		return $this->buildTemplate( $links );
30 34
 	}
31 35
 
@@ -55,7 +59,9 @@  discard block
 block discarded – undo
55 59
 	protected function buildLinksForDeprecatedThemes()
56 60
 	{
57 61
 		$theme = wp_get_theme()->get( 'TextDomain' );
58
-		if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] ))return;
62
+		if( !in_array( $theme, ['twentyten','twentyeleven','twentytwelve','twentythirteen'] )) {
63
+			return;
64
+		}
59 65
 		$links = '';
60 66
 		if( $this->args['paged'] > 1 ) {
61 67
 			$links.= sprintf( '<div class="nav-previous"><a href="%s"><span class="meta-nav">&larr;</span> %s</a></div>',
Please login to merge, or discard this patch.