Passed
Branch v0.6 (816ed2)
by Chris
03:55
created
Category
src/Darya/Foundation/Providers/RoutingService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 	public function register(Container $container)
23 23
 	{
24 24
 		$container->register(array(
25
-			Router::class => function (Container $container) {
25
+			Router::class => function(Container $container) {
26 26
 				/**
27 27
 				 * @var Configuration $config
28 28
 				 */
Please login to merge, or discard this patch.
src/Darya/Routing/Router.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			$path = preg_replace($pattern, $replacement, $path);
96 96
 		}
97 97
 
98
-		return '#/?^' . $path . '/?$#';
98
+		return '#/?^'.$path.'/?$#';
99 99
 	}
100 100
 
101 101
 	/**
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 			return $controller;
115 115
 		}
116 116
 
117
-		return preg_replace_callback('/^(.)|-(.)/', function ($matches) {
117
+		return preg_replace_callback('/^(.)|-(.)/', function($matches) {
118 118
 			return strtoupper($matches[1] ?: $matches[2]);
119
-		}, $controller) . 'Controller';
119
+		}, $controller).'Controller';
120 120
 	}
121 121
 
122 122
 	/**
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 	 */
131 131
 	public static function prepareAction($action)
132 132
 	{
133
-		return preg_replace_callback('/-(.)/', function ($matches) {
133
+		return preg_replace_callback('/-(.)/', function($matches) {
134 134
 			return strtoupper($matches[1]);
135 135
 		}, $action);
136 136
 	}
@@ -477,15 +477,15 @@  discard block
 block discarded – undo
477 477
 			$controller = static::prepareController($route->controller);
478 478
 
479 479
 			if ($route->namespace) {
480
-				$controller = $route->namespace . '\\' . $controller;
480
+				$controller = $route->namespace.'\\'.$controller;
481 481
 			}
482 482
 
483 483
 			if (class_exists($controller)) {
484 484
 				$route->controller = $controller;
485 485
 			}
486 486
 		} else {
487
-			$namespace = $route->namespace ? $route->namespace . '\\' : '';
488
-			$route->controller = $namespace . $this->defaults['controller'];
487
+			$namespace = $route->namespace ? $route->namespace.'\\' : '';
488
+			$route->controller = $namespace.$this->defaults['controller'];
489 489
 		}
490 490
 
491 491
 		return $route;
@@ -510,8 +510,8 @@  discard block
 block discarded – undo
510 510
 
511 511
 			if (method_exists($route->controller, $action)) {
512 512
 				$route->action = $action;
513
-			} else if (method_exists($route->controller, $action . 'Action')) {
514
-				$route->action = $action . 'Action';
513
+			} else if (method_exists($route->controller, $action.'Action')) {
514
+				$route->action = $action.'Action';
515 515
 			}
516 516
 		} else {
517 517
 			$route->action = $this->defaults['action'];
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 			$response = $this->dispatchCallable($request, $response, $callable, $arguments);
733 733
 			$this->unsubscribe($controller);
734 734
 
735
-			$response->header('X-Location: ' . $request->uri());
735
+			$response->header('X-Location: '.$request->uri());
736 736
 
737 737
 			return $response;
738 738
 		}
@@ -768,11 +768,11 @@  discard block
 block discarded – undo
768 768
 	 */
769 769
 	public function generate($path, array $parameters = array())
770 770
 	{
771
-		return preg_replace_callback('#/(:[A-Za-z0-9_-]+(\??))#', function ($match) use ($parameters) {
771
+		return preg_replace_callback('#/(:[A-Za-z0-9_-]+(\??))#', function($match) use ($parameters) {
772 772
 			$parameter = trim($match[1], '?:');
773 773
 
774 774
 			if ($parameter && isset($parameters[$parameter])) {
775
-				return '/' . $parameters[$parameter];
775
+				return '/'.$parameters[$parameter];
776 776
 			}
777 777
 
778 778
 			if ($parameter !== 'params' && $match[2] !== '?') {
@@ -819,6 +819,6 @@  discard block
 block discarded – undo
819 819
 	 */
820 820
 	public function url($name, array $parameters = array())
821 821
 	{
822
-		return $this->base . $this->path($name, $parameters);
822
+		return $this->base.$this->path($name, $parameters);
823 823
 	}
824 824
 }
Please login to merge, or discard this patch.
src/Darya/ORM/Relation/BelongsToMany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
 		$names = [$parent, $target];
158 158
 		sort($names);
159 159
 
160
-		$this->table = implode('_', $names) . 's';
160
+		$this->table = implode('_', $names).'s';
161 161
 	}
162 162
 
163 163
 	/**
Please login to merge, or discard this patch.
src/Darya/View/Php.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 		}
22 22
 
23 23
 		// Ensure that the selected template file exists
24
-		$path = $this->directory . '/' . $this->file;
24
+		$path = $this->directory.'/'.$this->file;
25 25
 
26 26
 		if (!is_file($path)) {
27 27
 			throw new \Exception("Could not find file when rendering view: \"$path\"");
Please login to merge, or discard this patch.
src/Darya/Foundation/Providers/ConfigurationService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	{
27 27
 		// Register the configuration service and its aliases
28 28
 		$container->register([
29
-			Configuration::class => function (Application $application) {
29
+			Configuration::class => function(Application $application) {
30 30
 				$basePath = $application->basePath();
31 31
 
32 32
 				// Load the application's configuration
Please login to merge, or discard this patch.
src/Darya/Foundation/Providers/PhpViewService.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
 	public function register(Container $container)
24 24
 	{
25 25
 		$container->register([
26
-			View\Resolver::class => function (Container $container) {
26
+			View\Resolver::class => function(Container $container) {
27 27
 				$basePath     = $container->get('path');
28 28
 				$realBasePath = realpath("{$basePath}/views/php");
29 29
 
Please login to merge, or discard this patch.
src/Darya/Foundation/Providers/DatabaseConnectionService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	public function register(Container $container)
26 26
 	{
27 27
 		$container->register([
28
-			Connection::class => function (Container $container) {
28
+			Connection::class => function(Container $container) {
29 29
 				/**
30 30
 				 * @var Configuration $config
31 31
 				 */
Please login to merge, or discard this patch.
src/Darya/Foundation/Providers/DatabaseStorageService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	public function register(Container $container)
26 26
 	{
27 27
 		$container->register([
28
-			'Darya\Database\Storage'      => function (Container $container) {
28
+			'Darya\Database\Storage'      => function(Container $container) {
29 29
 				return new Storage($container->get('Darya\Database\Connection'));
30 30
 			},
31 31
 			'Darya\Storage\Readable'      => 'Darya\Database\Storage',
Please login to merge, or discard this patch.
src/Darya/Foundation/Providers/HttpService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 	public function register(Container $container)
26 26
 	{
27 27
 		$container->register([
28
-			Request::class  => function (Container $container) {
28
+			Request::class  => function(Container $container) {
29 29
 				return Request::createFromGlobals($container->get(Session::class));
30 30
 			},
31 31
 			Response::class => new Response,
Please login to merge, or discard this patch.