Passed
Push — master ( ccb079...7906b4 )
by Paul
04:39
created
views/partials/styles/materialize/field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <p class="glsr-field {{ class }}">
4 4
     {{ label }}
Please login to merge, or discard this patch.
views/partials/styles/twentynineteen/field.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <p class="glsr-field {{ class }}">
4 4
     {{ label }}
Please login to merge, or discard this patch.
views/pages/settings/licenses.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <table class="form-table">
4 4
     <tbody>
Please login to merge, or discard this patch.
views/pages/settings/general.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <table class="form-table">
4 4
     <tbody>
Please login to merge, or discard this patch.
views/pages/settings/reviews.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <table class="form-table">
4 4
     <tbody>
Please login to merge, or discard this patch.
templates/reviews-form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-form-wrap">
4 4
     <form class="{{ class }}" id="{{ id }}" method="post" enctype="multipart/form-data">
Please login to merge, or discard this patch.
templates/form/response.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('WPINC') || die; ?>
1
+<?php defined( 'WPINC' ) || die; ?>
2 2
 
3 3
 <div class="glsr-form-message {{ class }}">
4 4
     {{ message }}
Please login to merge, or discard this patch.
autoload.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@
 block discarded – undo
5 5
 require_once ABSPATH.WPINC.'/class-phpass.php';
6 6
 
7 7
 spl_autoload_register(function ($className) {
8
-    $namespaces = [
9
-        'GeminiLabs\\SiteReviews\\' => __DIR__.'/plugin/',
10
-        'GeminiLabs\\SiteReviews\\Tests\\' => __DIR__.'/tests/',
11
-        'GeminiLabs\\Sepia\\PoParser\\' => __DIR__.'/vendors/sepia/po-parser/',
12
-        'GeminiLabs\\Sinergi\\BrowserDetector\\' => __DIR__.'/vendors/sinergi/browser-detector/',
13
-        'GeminiLabs\\Vectorface\\Whip\\' => __DIR__.'/vendors/vectorface/whip/',
14
-    ];
15
-    foreach ($namespaces as $prefix => $baseDir) {
16
-        $len = strlen($prefix);
17
-        if (0 !== strncmp($prefix, $className, $len)) {
18
-            continue;
19
-        }
20
-        $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php';
21
-        if (!file_exists($file)) {
22
-            continue;
23
-        }
24
-        require $file;
25
-        break;
26
-    }
8
+	$namespaces = [
9
+		'GeminiLabs\\SiteReviews\\' => __DIR__.'/plugin/',
10
+		'GeminiLabs\\SiteReviews\\Tests\\' => __DIR__.'/tests/',
11
+		'GeminiLabs\\Sepia\\PoParser\\' => __DIR__.'/vendors/sepia/po-parser/',
12
+		'GeminiLabs\\Sinergi\\BrowserDetector\\' => __DIR__.'/vendors/sinergi/browser-detector/',
13
+		'GeminiLabs\\Vectorface\\Whip\\' => __DIR__.'/vendors/vectorface/whip/',
14
+	];
15
+	foreach ($namespaces as $prefix => $baseDir) {
16
+		$len = strlen($prefix);
17
+		if (0 !== strncmp($prefix, $className, $len)) {
18
+			continue;
19
+		}
20
+		$file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php';
21
+		if (!file_exists($file)) {
22
+			continue;
23
+		}
24
+		require $file;
25
+		break;
26
+	}
27 27
 });
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('WPINC') || die;
3
+defined( 'WPINC' ) || die;
4 4
 
5 5
 require_once ABSPATH.WPINC.'/class-phpass.php';
6 6
 
7
-spl_autoload_register(function ($className) {
7
+spl_autoload_register( function( $className ) {
8 8
     $namespaces = [
9 9
         'GeminiLabs\\SiteReviews\\' => __DIR__.'/plugin/',
10 10
         'GeminiLabs\\SiteReviews\\Tests\\' => __DIR__.'/tests/',
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
         'GeminiLabs\\Sinergi\\BrowserDetector\\' => __DIR__.'/vendors/sinergi/browser-detector/',
13 13
         'GeminiLabs\\Vectorface\\Whip\\' => __DIR__.'/vendors/vectorface/whip/',
14 14
     ];
15
-    foreach ($namespaces as $prefix => $baseDir) {
16
-        $len = strlen($prefix);
17
-        if (0 !== strncmp($prefix, $className, $len)) {
15
+    foreach( $namespaces as $prefix => $baseDir ) {
16
+        $len = strlen( $prefix );
17
+        if( 0 !== strncmp( $prefix, $className, $len ) ) {
18 18
             continue;
19 19
         }
20
-        $file = $baseDir.str_replace('\\', '/', substr($className, $len)).'.php';
21
-        if (!file_exists($file)) {
20
+        $file = $baseDir.str_replace( '\\', '/', substr( $className, $len ) ).'.php';
21
+        if( !file_exists( $file ) ) {
22 22
             continue;
23 23
         }
24 24
         require $file;
Please login to merge, or discard this patch.
compatibility.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
  * @see https://www.elegantthemes.com/gallery/divi/
9 9
  */
10 10
 add_action('site-reviews/customize/divi', function ($instance) {
11
-    if ('label' != $instance->tag || 'checkbox' != $instance->args['type']) {
12
-        return;
13
-    }
14
-    $instance->args['text'] = '<i></i>'.$instance->args['text'];
11
+	if ('label' != $instance->tag || 'checkbox' != $instance->args['type']) {
12
+		return;
13
+	}
14
+	$instance->args['text'] = '<i></i>'.$instance->args['text'];
15 15
 });
16 16
 
17 17
 /*
@@ -22,14 +22,14 @@  discard block
 block discarded – undo
22 22
  * @see https://wordpress.org/plugins/wp-super-cache/
23 23
  */
24 24
 add_action('site-reviews/review/created', function ($review, $request) {
25
-    if (!function_exists('wp_cache_post_change')) {
26
-        return;
27
-    }
28
-    wp_cache_post_change($request->post_id);
29
-    if (empty($review->assigned_to) || $review->assigned_to == $request->post_id) {
30
-        return;
31
-    }
32
-    wp_cache_post_change($review->assigned_to);
25
+	if (!function_exists('wp_cache_post_change')) {
26
+		return;
27
+	}
28
+	wp_cache_post_change($request->post_id);
29
+	if (empty($review->assigned_to) || $review->assigned_to == $request->post_id) {
30
+		return;
31
+	}
32
+	wp_cache_post_change($review->assigned_to);
33 33
 }, 10, 2);
34 34
 
35 35
 /*
@@ -38,8 +38,8 @@  discard block
 block discarded – undo
38 38
  * @see https://wordpress.org/plugins/speed-booster-pack/
39 39
  */
40 40
 add_filter('sbp_exclude_defer_scripts', function ($scriptHandles) {
41
-    $scriptHandles[] = 'site-reviews/google-recaptcha';
42
-    return array_keys(array_flip($scriptHandles));
41
+	$scriptHandles[] = 'site-reviews/google-recaptcha';
42
+	return array_keys(array_flip($scriptHandles));
43 43
 });
44 44
 
45 45
 /*
@@ -49,13 +49,13 @@  discard block
 block discarded – undo
49 49
  * @see https://searchandfilter.com/
50 50
  */
51 51
 add_filter('sf_edit_query_args', function ($query) {
52
-    if (!empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key']) {
53
-        unset($query['meta_key']);
54
-        $query['meta_query'] = [
55
-            'relation' => 'OR',
56
-            ['key' => '_glsr_ranking', 'compare' => 'NOT EXISTS'], // this comes first!
57
-            ['key' => '_glsr_ranking', 'compare' => 'EXISTS'],
58
-        ];
59
-    }
60
-    return $query;
52
+	if (!empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key']) {
53
+		unset($query['meta_key']);
54
+		$query['meta_query'] = [
55
+			'relation' => 'OR',
56
+			['key' => '_glsr_ranking', 'compare' => 'NOT EXISTS'], // this comes first!
57
+			['key' => '_glsr_ranking', 'compare' => 'EXISTS'],
58
+		];
59
+	}
60
+	return $query;
61 61
 }, 20);
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-defined('WPINC') || die;
3
+defined( 'WPINC' ) || die;
4 4
 
5 5
 /*
6 6
  * @param \GeminiLabs\SiteReviews\Modules\Html\Builder $instance
7 7
  * @return void
8 8
  * @see https://www.elegantthemes.com/gallery/divi/
9 9
  */
10
-add_action('site-reviews/customize/divi', function ($instance) {
11
-    if ('label' != $instance->tag || 'checkbox' != $instance->args['type']) {
10
+add_action( 'site-reviews/customize/divi', function( $instance ) {
11
+    if( 'label' != $instance->tag || 'checkbox' != $instance->args['type'] ) {
12 12
         return;
13 13
     }
14 14
     $instance->args['text'] = '<i></i>'.$instance->args['text'];
@@ -21,25 +21,25 @@  discard block
 block discarded – undo
21 21
  * @return void
22 22
  * @see https://wordpress.org/plugins/wp-super-cache/
23 23
  */
24
-add_action('site-reviews/review/created', function ($review, $request) {
25
-    if (!function_exists('wp_cache_post_change')) {
24
+add_action( 'site-reviews/review/created', function( $review, $request ) {
25
+    if( !function_exists( 'wp_cache_post_change' ) ) {
26 26
         return;
27 27
     }
28
-    wp_cache_post_change($request->post_id);
29
-    if (empty($review->assigned_to) || $review->assigned_to == $request->post_id) {
28
+    wp_cache_post_change( $request->post_id );
29
+    if( empty($review->assigned_to) || $review->assigned_to == $request->post_id ) {
30 30
         return;
31 31
     }
32
-    wp_cache_post_change($review->assigned_to);
33
-}, 10, 2);
32
+    wp_cache_post_change( $review->assigned_to );
33
+}, 10, 2 );
34 34
 
35 35
 /*
36 36
  * @param array $scriptHandles
37 37
  * @return array
38 38
  * @see https://wordpress.org/plugins/speed-booster-pack/
39 39
  */
40
-add_filter('sbp_exclude_defer_scripts', function ($scriptHandles) {
40
+add_filter( 'sbp_exclude_defer_scripts', function( $scriptHandles ) {
41 41
     $scriptHandles[] = 'site-reviews/google-recaptcha';
42
-    return array_keys(array_flip($scriptHandles));
42
+    return array_keys( array_flip( $scriptHandles ) );
43 43
 });
44 44
 
45 45
 /*
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
  * @return array
49 49
  * @see https://searchandfilter.com/
50 50
  */
51
-add_filter('sf_edit_query_args', function ($query) {
52
-    if (!empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key']) {
51
+add_filter( 'sf_edit_query_args', function( $query ) {
52
+    if( !empty($query['meta_key']) && '_glsr_ranking' == $query['meta_key'] ) {
53 53
         unset($query['meta_key']);
54 54
         $query['meta_query'] = [
55 55
             'relation' => 'OR',
@@ -58,4 +58,4 @@  discard block
 block discarded – undo
58 58
         ];
59 59
     }
60 60
     return $query;
61
-}, 20);
61
+}, 20 );
Please login to merge, or discard this patch.