Passed
Branch master (7bdb2e)
by Matt
03:16
created
src/Client.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 *        	client here, say. Otherwise we'll just make one.
72 72
 	 * @throws Exception
73 73
 	 */
74
-	public function __construct ($app_url, $app_name, $app_version, $api_key = null, $guzzle_client = null)
74
+	public function __construct($app_url, $app_name, $app_version, $api_key = null, $guzzle_client = null)
75 75
 	{
76 76
 		if ((empty($app_url)) || (empty($app_name)) || (empty($app_version)))
77 77
 		{
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 		// testing, but in the normal course of things we'll probably just
89 89
 		// create it ourselves.
90 90
 		$this->guzzle_client = $guzzle_client;
91
-		if (! isset($this->guzzle_client))
91
+		if (!isset($this->guzzle_client))
92 92
 		{
93 93
 			$this->guzzle_client = new \GuzzleHttp\Client();
94 94
 		}
95 95
 	}
96 96
 
97
-	private function getStandardHeaders ()
97
+	private function getStandardHeaders()
98 98
 	{
99 99
 		// I'd use Guzzle middleware for this, as we want to add it on 
100 100
 		// every request, but how do I do that and support dependency 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		);
106 106
 	}
107 107
 
108
-	private function getOurUserAgent ()
108
+	private function getOurUserAgent()
109 109
 	{
110 110
 		// From the docs:
111 111
 		// Setting your user agent If possible, your user agent string should always use the following format: Application Name/Version | Plugin Name/Version
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		return "{$this->app_name}/{$this->app_version} | Gothick\\AkismetClient/" . self::VERSION;
116 116
 	}
117 117
 
118
-	public function setApiKey ($api_key)
118
+	public function setApiKey($api_key)
119 119
 	{
120 120
 		if (empty($api_key))
121 121
 		{
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		$this->api_key = $api_key;
125 125
 	}
126 126
 
127
-	public function verifyKey ($api_key = null)
127
+	public function verifyKey($api_key = null)
128 128
 	{
129 129
 		$verified = false;
130 130
 		$error = '';
@@ -188,11 +188,11 @@  discard block
 block discarded – undo
188 188
 	 * @param boolean $is_test
189 189
 	 *        	Set to true for automated testing
190 190
 	 */
191
-	public function commentCheck ($params = array(), $server_params = array(), $user_role = 'user', $is_test = false)
191
+	public function commentCheck($params = array(), $server_params = array(), $user_role = 'user', $is_test = false)
192 192
 	{
193 193
 		// According to the Akismet docs, these two (and 'blog', which we have as $this->blog already) are
194 194
 		// the only required parameters. Seems odd, but hey.
195
-		if (empty($params['user_ip']) || empty($params['user_agent']))
195
+		if (empty($params[ 'user_ip' ]) || empty($params[ 'user_agent' ]))
196 196
 		{
197 197
 			throw new \InvalidArgumentException(__METHOD__ . ' requires user_ip and user_agent in $params');
198 198
 		}
@@ -222,14 +222,14 @@  discard block
 block discarded – undo
222 222
 			}
223 223
 			throw new Exception('Unexpected status code in ' . __METHOD__ . ': ' . $error);
224 224
 		}
225
-		if (! $result)
225
+		if (!$result)
226 226
 		{
227 227
 			throw new Exception('Unexpected error in ' . __METHOD__);
228 228
 		}
229 229
 		return $result;
230 230
 	}
231 231
 
232
-	private function apiUri ($method)
232
+	private function apiUri($method)
233 233
 	{
234 234
 		if ($method == 'verify-key')
235 235
 		{
Please login to merge, or discard this patch.
src/ClientResult.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 	 */
20 20
 	protected $pro_tip;
21 21
 
22
-	public function __construct (\GuzzleHttp\Psr7\Response $response)
22
+	public function __construct(\GuzzleHttp\Psr7\Response $response)
23 23
 	{
24 24
 		if ($response->getStatusCode() != 200)
25 25
 		{
Please login to merge, or discard this patch.
src/Exception.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 class Exception extends \Exception
5 5
 {
6 6
 
7
-	public function __construct ($message, $code = 0, \Exception $previous = null)
7
+	public function __construct($message, $code = 0, \Exception $previous = null)
8 8
 	{
9 9
 		parent::__construct('Gothick\AkismetClient: ' . $message, $code,
10 10
 				$previous);
Please login to merge, or discard this patch.