Passed
Push — master ( 7de9ff...9a7a6b )
by Paul
07:10 queued 03:33
created
plugin/Modules/Html/Partial.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	public function build( $partialPath, array $args = [] )
14 14
 	{
15 15
 		$className = glsr( Helper::class )->buildClassName( $partialPath, 'Modules\Html\Partials' );
16
-		if( !class_exists( $className )) {
16
+		if( !class_exists( $className ) ) {
17 17
 			glsr_log()->error( 'Partial missing: '.$className );
18 18
 			return;
19 19
 		}
Please login to merge, or discard this patch.
plugin/Modules/Akismet.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 			// 'is_test' => 1,
32 32
 		];
33 33
 		foreach( $_SERVER as $key => $value ) {
34
-			if( is_array( $value ) || in_array( $key, ['HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW'] ))continue;
34
+			if( is_array( $value ) || in_array( $key, ['HTTP_COOKIE', 'HTTP_COOKIE2', 'PHP_AUTH_PW'] ) )continue;
35 35
 			$submission[$key] = $value;
36 36
 		}
37
-		return $this->check( apply_filters( 'site-reviews/akismet/submission', $submission, $review ));
37
+		return $this->check( apply_filters( 'site-reviews/akismet/submission', $submission, $review ) );
38 38
 	}
39 39
 
40 40
 	/**
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
 	{
58 58
 		$query = [];
59 59
 		foreach( $data as $key => $value ) {
60
-			if( is_array( $value ) || is_object( $value ))continue;
60
+			if( is_array( $value ) || is_object( $value ) )continue;
61 61
 			if( $value === false ) {
62 62
 				$value = '0';
63 63
 			}
64 64
 			$value = trim( $value );
65
-			if( !strlen( $value ))continue;
65
+			if( !strlen( $value ) )continue;
66 66
 			$query[] = urlencode( $key ).'='.urlencode( $value );
67 67
 		}
68 68
 		return implode( '&', $query );
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 			|| !is_callable( ['Akismet', 'get_api_key'] )
78 78
 			|| !is_callable( ['Akismet', 'http_post'] )
79 79
 			? false
80
-			: (bool) AkismetPlugin::get_api_key();
80
+			: (bool)AkismetPlugin::get_api_key();
81 81
 		return apply_filters( 'site-reviews/akismet/is-active', $check );
82 82
 	}
83 83
 }
Please login to merge, or discard this patch.
plugin/Commands/TogglePinned.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 	public function __construct( $input )
11 11
 	{
12 12
 		$this->id = $input['id'];
13
-		$this->pinned = isset( $input['pinned'] )
13
+		$this->pinned = isset($input['pinned'])
14 14
 			? wp_validate_boolean( $input['pinned'] )
15 15
 			: null;
16 16
 	}
Please login to merge, or discard this patch.
plugin/Modules/Date.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
 		$diff = time() - strtotime( $date );
32 32
 		foreach( static::$TIME_PERIODS as $i => $timePeriod ) {
33 33
 			if( $diff > $timePeriod[0] )continue;
34
-			$unit = intval( floor( $diff / $timePeriod[1] ));
34
+			$unit = intval( floor( $diff / $timePeriod[1] ) );
35 35
 			$relativeDates = [
36 36
 				_n( '%s second ago', '%s seconds ago', $unit, 'site-reviews' ),
37 37
 				_n( '%s minute ago', '%s minutes ago', $unit, 'site-reviews' ),
Please login to merge, or discard this patch.
plugin/Database/Cache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,11 +19,11 @@  discard block
 block discarded – undo
19 19
 			$ipAddresses = array_fill_keys( ['v4', 'v6'], [] );
20 20
 			foreach( array_keys( $ipAddresses ) as $version ) {
21 21
 				$response = wp_remote_get( 'https://www.cloudflare.com/ips-'.$version );
22
-				if( is_wp_error( $response )) {
22
+				if( is_wp_error( $response ) ) {
23 23
 					glsr_log()->error( $response->get_error_message() );
24 24
 					continue;
25 25
 				}
26
-				$ipAddresses[$version] = array_filter( explode( PHP_EOL, wp_remote_retrieve_body( $response )));
26
+				$ipAddresses[$version] = array_filter( explode( PHP_EOL, wp_remote_retrieve_body( $response ) ) );
27 27
 			}
28 28
 			set_transient( Application::ID.'_cloudflare_ips', $ipAddresses, static::EXPIRY_TIME );
29 29
 		}
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 		if( $test === false ) {
58 58
 			$response = wp_remote_post( 'https://api.wordpress.org/stats/php/1.0/' );
59 59
 			$test = !is_wp_error( $response )
60
-				&& in_array( $response['response']['code'], range( 200, 299 ))
60
+				&& in_array( $response['response']['code'], range( 200, 299 ) )
61 61
 				? 'Works'
62 62
 				: 'Does not work';
63 63
 			set_transient( Application::ID.'_remote_post_test', $test, static::EXPIRY_TIME );
Please login to merge, or discard this patch.
views/partials/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.
plugin/Handlers/ChangeStatus.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@  discard block
 block discarded – undo
12 12
 	 */
13 13
 	public function handle( Command $command )
14 14
 	{
15
-		$postId = wp_update_post([
15
+		$postId = wp_update_post( [
16 16
 			'ID' => $command->id,
17 17
 			'post_status' => $command->status,
18
-		]);
19
-		if( is_wp_error( $postId )) {
18
+		] );
19
+		if( is_wp_error( $postId ) ) {
20 20
 			glsr_log()->error( $postId->get_error_message() );
21 21
 			return [];
22 22
 		}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 			'aria-label' => '&#8220;'.esc_attr( $title ).'&#8221; ('.__( 'Edit', 'site-reviews' ).')',
38 38
 			'class' => 'row-title',
39 39
 			'href' => get_edit_post_link( $postId ),
40
-		]);
40
+		] );
41 41
 	}
42 42
 
43 43
 	/**
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	protected function getPostState( $postId )
48 48
 	{
49 49
 		ob_start();
50
-		_post_states( get_post( $postId ));
50
+		_post_states( get_post( $postId ) );
51 51
 		return ob_get_clean();
52 52
 	}
53 53
 }
Please login to merge, or discard this patch.
plugin/Modules/Html/Template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,9 +51,9 @@
 block discarded – undo
51 51
 	protected function normalize( array $data )
52 52
 	{
53 53
 		$arrayKeys = ['context', 'globals'];
54
-		$data = wp_parse_args( $data, array_fill_keys( $arrayKeys, [] ));
54
+		$data = wp_parse_args( $data, array_fill_keys( $arrayKeys, [] ) );
55 55
 		foreach( $arrayKeys as $key ) {
56
-			if( is_array( $data[$key] ))continue;
56
+			if( is_array( $data[$key] ) )continue;
57 57
 			$data[$key] = [];
58 58
 		}
59 59
 		return $data;
Please login to merge, or discard this patch.
plugin/Modules/Html/Fields/Honeypot.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	{
14 14
 		$this->builder->args = wp_parse_args( $this->builder->args, [
15 15
 			'name' => $this->builder->args['text'],
16
-		]);
16
+		] );
17 17
 		$this->builder->tag = 'input';
18 18
 		$this->mergeFieldArgs();
19 19
 		return $this->builder->getOpeningTag();
Please login to merge, or discard this patch.