Passed
Push — master ( 9b46a7...ed8579 )
by Paul
03:56
created
plugin/Commands/CreateReview.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -29,23 +29,23 @@  discard block
 block discarded – undo
29 29
 	public function __construct( $input )
30 30
 	{
31 31
 		$this->request = $input;
32
-		$this->ajax_request = isset( $input['ajax_request'] );
32
+		$this->ajax_request = isset($input['ajax_request']);
33 33
 		$this->assigned_to = $this->getNumeric( 'assign_to' );
34
-		$this->author = sanitize_text_field( $this->get( 'name' ));
35
-		$this->avatar = get_avatar_url( $this->get( 'email' ));
36
-		$this->blacklisted = isset( $input['blacklisted'] );
37
-		$this->category = sanitize_key( $this->get( 'category' ));
38
-		$this->content = sanitize_textarea_field( $this->get( 'content' ));
34
+		$this->author = sanitize_text_field( $this->get( 'name' ) );
35
+		$this->avatar = get_avatar_url( $this->get( 'email' ) );
36
+		$this->blacklisted = isset($input['blacklisted']);
37
+		$this->category = sanitize_key( $this->get( 'category' ) );
38
+		$this->content = sanitize_textarea_field( $this->get( 'content' ) );
39 39
 		$this->custom = $this->getCustom();
40 40
 		$this->date = $this->getDate( 'date' );
41
-		$this->email = sanitize_email( $this->get( 'email' ));
42
-		$this->form_id = sanitize_key( $this->get( 'form_id' ));
41
+		$this->email = sanitize_email( $this->get( 'email' ) );
42
+		$this->form_id = sanitize_key( $this->get( 'form_id' ) );
43 43
 		$this->ip_address = $this->get( 'ip_address' );
44
-		$this->post_id = intval( $this->get( 'post_id' ));
45
-		$this->rating = intval( $this->get( 'rating' ));
44
+		$this->post_id = intval( $this->get( 'post_id' ) );
45
+		$this->rating = intval( $this->get( 'rating' ) );
46 46
 		$this->referer = $this->get( 'referer' );
47
-		$this->terms = !empty( $input['terms'] );
48
-		$this->title = sanitize_text_field( $this->get( 'title' ));
47
+		$this->terms = !empty($input['terms']);
48
+		$this->title = sanitize_text_field( $this->get( 'title' ) );
49 49
 	}
50 50
 
51 51
 	/**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 */
55 55
 	protected function get( $key )
56 56
 	{
57
-		return isset( $this->request[$key] )
57
+		return isset($this->request[$key])
58 58
 			? (string)$this->request[$key]
59 59
 			: '';
60 60
 	}
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 		];
72 72
 		$custom = $this->request;
73 73
 		foreach( $unset as $value ) {
74
-			unset( $custom[$value] );
74
+			unset($custom[$value]);
75 75
 		}
76 76
 		return $custom;
77 77
 	}
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 	 */
83 83
 	protected function getDate( $key )
84 84
 	{
85
-		$date = strtotime( $this->get( $key ));
85
+		$date = strtotime( $this->get( $key ) );
86 86
 		if( $date === false ) {
87 87
 			$date = time();
88 88
 		}
89
-		return get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $date ));
89
+		return get_date_from_gmt( gmdate( 'Y-m-d H:i:s', $date ) );
90 90
 	}
91 91
 
92 92
 	/**
Please login to merge, or discard this patch.