Completed
Push — develop ( ee8f39...b34707 )
by Mark
06:39
created
src/BaseApplication.php 3 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -12,13 +12,10 @@
 block discarded – undo
12 12
 namespace yolk\app;
13 13
 
14 14
 use yolk\Yolk;
15
-
16 15
 use yolk\contracts\app\Application;
17
-use yolk\contracts\app\Dispatcher;
18 16
 use yolk\contracts\app\Request;
19 17
 use yolk\contracts\app\Response;
20 18
 use yolk\contracts\profiler\Profiler;
21
-
22 19
 use yolk\exceptions\Handler as YolkHandler;
23 20
 
24 21
 /**
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 	/**
70 70
 	 * Figure out what to do with a request
71 71
 	 *
72
-	 * @return \yolk\app\Response
72
+	 * @return Response
73 73
 	 */
74 74
 	public function dispatch( Request $request ) {
75 75
 		$response = parent::dispatch( $request );
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 	 * @return \yolk\app\Response
73 73
 	 */
74 74
 	public function dispatch( Request $request ) {
75
-		$response = parent::dispatch( $request );
75
+		$response = parent::dispatch($request);
76 76
 		if( $response !== false ) {
77 77
 			return $response;
78 78
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 	 */
216 216
 	protected function registerController( $name, $fq_class, $opts = [] ) {
217 217
 		$this->services[$name] = function( $c ) use ($fq_class, $opts) {
218
-			return new $fq_class( $c, $opts );
218
+			return new $fq_class($c, $opts);
219 219
 		};
220 220
 	}
221 221
 
Please login to merge, or discard this patch.
src/BaseController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace yolk\app;
13 13
 
14 14
 use yolk\contracts\support\Config;
15
-
16 15
 use yolk\database\DSN;
17 16
 
18 17
 /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 		$this->services = $services;
39 39
 
40 40
 		// we can set a view_path override per controller
41
-		if( isset( $opts['view_path'] ) ) {
41
+		if( isset($opts['view_path']) ) {
42 42
 			$this->view_path = $opts['view_path'];
43 43
 		}
44 44
 	}
Please login to merge, or discard this patch.
src/BaseRequest.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@
 block discarded – undo
12 12
 namespace yolk\app;
13 13
 
14 14
 use yolk\contracts\support\Config;
15
-
16 15
 use yolk\database\DSN;
17 16
 
18 17
 /**
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	 */
112 112
 	protected $extra;
113 113
 
114
-	public static function createFromArgs($args) {
114
+	public static function createFromArgs( $args ) {
115 115
 
116 116
 		$args += [
117 117
 			'method'		=> 'GET',
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
 		// do geo-ip stuff if we have a valid IP that isn't part of a private network
196 196
 		if( $this->ip ) {
197
-			$this->country_code = function_exists('geoip_country_code_by_name')   ? geoip_country_code_by_name($this->ip)   : '';
197
+			$this->country_code = function_exists('geoip_country_code_by_name') ? geoip_country_code_by_name($this->ip) : '';
198 198
 			$this->continent    = function_exists('geoip_continent_code_by_name') ? geoip_continent_code_by_name($this->ip) : '';
199 199
 		}
200 200
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 		if( $this->uri == $uri_prefix )
246 246
 			return '/';
247 247
 		else
248
-			return preg_replace('/^'. preg_quote($uri_prefix, '/'). '/', '', $this->uri);
248
+			return preg_replace('/^'.preg_quote($uri_prefix, '/').'/', '', $this->uri);
249 249
 
250 250
 	}
251 251
 
Please login to merge, or discard this patch.
src/ServiceContainer.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,7 @@
 block discarded – undo
12 12
 namespace yolk\app;
13 13
 
14 14
 use yolk\Yolk;
15
-
16 15
 use yolk\contracts\support\Config;
17
-
18 16
 use yolk\database\DSN;
19 17
 
20 18
 /**
Please login to merge, or discard this patch.
src/BaseDispatcher.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	/**
244 244
 	 * Determines if the specified handler is a controller class/method handler
245 245
 	 * in the format Foo::bar
246
-	 * @param  mixed  $handler
246
+	 * @param  callable  $handler
247 247
 	 * @return boolean
248 248
 	 */
249 249
 	protected function isControllerClassHandler( $handler ) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
 	/**
254 254
 	 * Determines if the specified handler is an instance of the Controller interface.
255
-	 * @param  mixed  $handler
255
+	 * @param  callable  $handler
256 256
 	 * @return boolean
257 257
 	 */
258 258
 	protected function isControllerInstanceHandler( $handler ) {
Please login to merge, or discard this patch.
src/BaseResponse.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -260,9 +260,9 @@
 block discarded – undo
260 260
 		if( $this->redirect_prefix ) {
261 261
 			// caller couldn't be bothered to specify so decide for them
262 262
 			if( $prefix === null )
263
-				$prefix = !preg_match('/^https?:\/\//', $url) && !preg_match('/^' . preg_quote($this->redirect_prefix, '/') . '/', $url);
263
+				$prefix = !preg_match('/^https?:\/\//', $url) && !preg_match('/^'.preg_quote($this->redirect_prefix, '/').'/', $url);
264 264
 			if( $prefix )
265
-				$url = $this->redirect_prefix . $url;
265
+				$url = $this->redirect_prefix.$url;
266 266
 		}
267 267
 
268 268
 		$this->status($permanent ? 301 : 302)
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
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	public function __toString() {
26
-		return __CLASS__ . ": [{$this->code}]: {$this->message}";
26
+		return __CLASS__.": [{$this->code}]: {$this->message}";
27 27
 	}
28 28
 
29 29
 }
Please login to merge, or discard this patch.