Passed
Push — master ( 3384db...78f140 )
by Paul
04:58
created
plugin/Database/DefaultsManager.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,9 @@
 block discarded – undo
38 38
 	protected function normalize( array $settings )
39 39
 	{
40 40
 		array_walk( $settings, function( &$setting ) {
41
-			if( isset( $setting['default'] ))return;
41
+			if( isset( $setting['default'] )) {
42
+				return;
43
+			}
42 44
 			$setting['default'] = null;
43 45
 		});
44 46
 		return $settings;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 		$settings = include glsr()->path( 'config/settings.php' );
16 16
 		$settings = apply_filters( 'site-reviews/addon/settings', $settings );
17 17
 		$settings = $this->normalize( $settings );
18
-		$defaults = array_combine( array_keys( $settings ), array_column( $settings, 'default' ));
18
+		$defaults = array_combine( array_keys( $settings ), array_column( $settings, 'default' ) );
19 19
 		return glsr( Helper::class )->convertDotNotationArray( $defaults );
20 20
 	}
21 21
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	protected function normalize( array $settings )
39 39
 	{
40 40
 		array_walk( $settings, function( &$setting ) {
41
-			if( isset( $setting['default'] ))return;
41
+			if( isset($setting['default']) )return;
42 42
 			$setting['default'] = null;
43 43
 		});
44 44
 		return $settings;
Please login to merge, or discard this patch.
plugin/Database/Cache.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 class Cache
8 8
 {
9 9
 	/**
10
- 	 * @return array
10
+	 * @return array
11 11
 	 */
12 12
 	public function getCloudflareIps()
13 13
 	{
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@
 block discarded – undo
17 17
 			$ipAddresses = array_fill_keys( ['v4', 'v6'], [] );
18 18
 			foreach( array_keys( $ipAddresses ) as $version ) {
19 19
 				$response = wp_remote_get( 'https://www.cloudflare.com/ips-'.$version );
20
-				if( is_wp_error( $response )) {
20
+				if( is_wp_error( $response ) ) {
21 21
 					glsr_log()->error( $response->get_error_message() );
22 22
 					continue;
23 23
 				}
24
-				$ipAddresses[$version] = array_filter( explode( PHP_EOL, wp_remote_retrieve_body( $response )));
24
+				$ipAddresses[$version] = array_filter( explode( PHP_EOL, wp_remote_retrieve_body( $response ) ) );
25 25
 			}
26 26
 			wp_cache_set( Application::ID, $ipAddresses, '_cloudflare_ips' );
27 27
 		}
Please login to merge, or discard this patch.
helpers.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  */
7 7
 function glsr( $alias = null ) {
8 8
 	$app = \GeminiLabs\SiteReviews\Application::load();
9
-	return empty( $alias )
9
+	return empty($alias)
10 10
 		? $app
11 11
 		: $app->make( $alias );
12 12
 }
@@ -16,10 +16,10 @@  discard block
 block discarded – undo
16 16
  * @return \WP_Screen|object
17 17
  */
18 18
 function glsr_current_screen() {
19
-	if( function_exists( 'get_current_screen' )) {
19
+	if( function_exists( 'get_current_screen' ) ) {
20 20
 		$screen = get_current_screen();
21 21
 	}
22
-	return empty( $screen )
22
+	return empty($screen)
23 23
 		? (object)array_fill_keys( ['base', 'id', 'post_type'], null )
24 24
 		: $screen;
25 25
 }
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
  */
55 55
 function glsr_log() {
56 56
 	$args = func_get_args();
57
-	$context = isset( $args[1] )
57
+	$context = isset($args[1])
58 58
 		? $args[1]
59 59
 		: [];
60 60
 	$logger = glsr( 'Modules\Logger' );
61
-	return empty( $args )
61
+	return empty($args)
62 62
 		? $logger
63 63
 		: $logger->log( 'debug', $args[0], $context );
64 64
 }
Please login to merge, or discard this patch.
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@  discard block
 block discarded – undo
4 4
 /**
5 5
  * @return mixed
6 6
  */
7
-function glsr( $alias = null ) {
7
+function glsr( $alias = null )
8
+{
8 9
 	$app = \GeminiLabs\SiteReviews\Application::load();
9 10
 	return empty( $alias )
10 11
 		? $app
@@ -15,7 +16,8 @@  discard block
 block discarded – undo
15 16
  * get_current_screen() is unreliable because it is not defined on all admin pages
16 17
  * @return \WP_Screen|object
17 18
  */
18
-function glsr_current_screen() {
19
+function glsr_current_screen()
20
+{
19 21
 	if( function_exists( 'get_current_screen' )) {
20 22
 		$screen = get_current_screen();
21 23
 	}
@@ -27,7 +29,8 @@  discard block
 block discarded – undo
27 29
 /**
28 30
  * @return \GeminiLabs\SiteReviews\Database
29 31
  */
30
-function glsr_db() {
32
+function glsr_db()
33
+{
31 34
 	return glsr( 'Database' );
32 35
 }
33 36
 
@@ -35,7 +38,8 @@  discard block
 block discarded – undo
35 38
  * @param mixed ...$vars
36 39
  * @return void
37 40
  */
38
-function glsr_debug( ...$vars ) {
41
+function glsr_debug( ...$vars )
42
+{
39 43
 	if( count( $vars ) == 1 ) {
40 44
 		$value = htmlspecialchars( print_r( $vars[0], true ), ENT_QUOTES, 'UTF-8' );
41 45
 		printf( '<div class="glsr-debug"><pre>%s</pre></div>', $value );
@@ -52,7 +56,8 @@  discard block
 block discarded – undo
52 56
 /**
53 57
  * @return \GeminiLabs\SiteReviews\Modules\Logger
54 58
  */
55
-function glsr_log() {
59
+function glsr_log()
60
+{
56 61
 	$args = func_get_args();
57 62
 	$context = isset( $args[1] )
58 63
 		? $args[1]
@@ -68,7 +73,8 @@  discard block
 block discarded – undo
68 73
  * @return void
69 74
  * @callback register_taxonomy() "meta_box_cb"
70 75
  */
71
-function glsr_categories_meta_box( $post, $box ) {
76
+function glsr_categories_meta_box( $post, $box )
77
+{
72 78
 	glsr( 'Controllers\EditorController' )->renderTaxonomyMetabox( $post, $box );
73 79
 }
74 80
 
@@ -77,14 +83,16 @@  discard block
 block discarded – undo
77 83
  * @param mixed $fallback
78 84
  * @return string|array
79 85
  */
80
-function glsr_get_option( $option_path = '', $fallback = '' ) {
86
+function glsr_get_option( $option_path = '', $fallback = '' )
87
+{
81 88
 	return glsr( 'Database\OptionManager' )->get( 'settings.'.$option_path, $fallback );
82 89
 }
83 90
 
84 91
 /**
85 92
  * @return array
86 93
  */
87
-function glsr_get_options() {
94
+function glsr_get_options()
95
+{
88 96
 	return glsr( 'Database\OptionManager' )->get( 'settings' );
89 97
 }
90 98
 
Please login to merge, or discard this patch.
views/email/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php defined( 'WPINC' ) || die;
2 2
 
3
-include trailingslashit(__DIR__).'header.php';
4
-include trailingslashit(__DIR__).'body.php';
5
-include trailingslashit(__DIR__).'footer.php';
3
+include trailingslashit( __DIR__ ).'header.php';
4
+include trailingslashit( __DIR__ ).'body.php';
5
+include trailingslashit( __DIR__ ).'footer.php';
Please login to merge, or discard this patch.
views/email/header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 <html>
5 5
 <head>
6 6
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7
-    <title><?= wp_specialchars_decode( (string) get_option( 'blogname', '' ), ENT_QUOTES ); ?></title>
7
+    <title><?= wp_specialchars_decode( (string)get_option( 'blogname', '' ), ENT_QUOTES ); ?></title>
8 8
 </head>
9 9
 <body>
Please login to merge, or discard this patch.
views/pages/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,17 +7,17 @@
 block discarded – undo
7 7
 <?php
8 8
 
9 9
 	$html->renderNotices();
10
-	$html->renderPartial( 'tabs' , [
10
+	$html->renderPartial( 'tabs', [
11 11
 		'page' => $page,
12 12
 		'tab' => $currentTab,
13 13
 		'tabs' => $tabs,
14
-	]);
15
-	$html->renderPartial( 'sections' , [
14
+	] );
15
+	$html->renderPartial( 'sections', [
16 16
 		'page' => $page,
17 17
 		'section' => $currentSection,
18 18
 		'tab' => $currentTab,
19 19
 		'tabs' => $tabs,
20
-	]);
20
+	] );
21 21
 	$file = $currentSection ? $currentTab.'/'.$currentSection : $currentTab;
22 22
 	$file = trailingslashit( __DIR__ ).$page.'/'.$file.'.php';
23 23
 	$file = apply_filters( 'site-reviews/addon/views/file', $file, $view, $data );
Please login to merge, or discard this patch.
views/pages/addons/addons.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
8 8
 	'link' => 'https://niftyplugins.com/addons/site-reviews-tripadvisor/',
9 9
 	'name' => 'tripadvisor',
10 10
 	'title' => 'Tripadvisor Reviews',
11
-]);
11
+] );
12 12
 glsr( 'Modules\Html' )->renderTemplate( 'addons/addon', [
13 13
 	'description' => __( 'Sync your Yelp reviews and display them on your site.', 'site-reviews' ),
14 14
 	'link' => 'https://niftyplugins.com/addons/site-reviews-yelp/',
15 15
 	'name' => 'yelp',
16 16
 	'title' => 'Yelp Reviews',
17
-]);
17
+] );
18 18
 ?>
19 19
 </div>
Please login to merge, or discard this patch.
views/translations/plural.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 		<p>{{ data.s1 }}</p>
4 4
 		<p>{{ data.p1 }}</p>
5 5
 		<p class="row-actions">
6
-			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' );?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
6
+			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' ); ?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
7 7
 		</p>
8 8
 		<button type="button" class="toggle-row">
9 9
 			<span class="screen-reader-text"><?= __( 'Show custom translation', 'site-reviews' ); ?></span>
Please login to merge, or discard this patch.
views/translations/single.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 	<td class="glsr-string-td1 column-primary">
3 3
 		<p>{{ data.s1 }}</p>
4 4
 		<p class="row-actions">
5
-			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' );?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
5
+			<span class="delete"><a href="#{{ data.index }}" class="delete" aria-label="<?= __( 'Delete translation string', 'site-reviews' ); ?>"><?= __( 'Delete', 'site-reviews' ); ?></a></span>
6 6
 		</p>
7 7
 		<button type="button" class="toggle-row">
8 8
 			<span class="screen-reader-text"><?= __( 'Show custom translation', 'site-reviews' ); ?></span>
Please login to merge, or discard this patch.