Completed
Push — master ( 8e8e3f...743870 )
by Chris
07:19 queued 04:34
created
src/Darya/Foundation/Providers/HttpService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 	public function register(Container $container)
25 25
 	{
26 26
 		$container->register(array(
27
-			'Darya\Http\Request' => function ($container) {
27
+			'Darya\Http\Request' => function($container) {
28 28
 				return Request::createFromGlobals($container->resolve('Darya\Http\Session'));
29 29
 			},
30 30
 			'Darya\Http\Response' => new Response,
Please login to merge, or discard this patch.
src/Darya/Foundation/Providers/SmartyViewService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 	public function register(Container $container)
21 21
 	{
22 22
 		$container->register(array(
23
-			'Darya\Smarty\ViewResolver' => function ($container) {
23
+			'Darya\Smarty\ViewResolver' => function($container) {
24 24
 				$basePath = $container->get('path');
25 25
 				$realBasePath = realpath("{$basePath}/views/smarty");
26 26
 				
Please login to merge, or discard this patch.
src/Darya/Storage/Filterer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 	{
127 127
 		$filterer = $this;
128 128
 		
129
-		return function ($row) use ($filterer, $filter, $or) {
129
+		return function($row) use ($filterer, $filter, $or) {
130 130
 			return $filterer->matches($row, $filter, $or);
131 131
 		};
132 132
 	}
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 	{
481 481
 		$value = preg_quote($value, '/');
482 482
 		
483
-		$pattern = '/' . preg_replace(array('/([^\\\])?_/', '/([^\\\])?%/'), array('$1.', '$1.*'), $value) . '/i';
483
+		$pattern = '/'.preg_replace(array('/([^\\\])?_/', '/([^\\\])?%/'), array('$1.', '$1.*'), $value).'/i';
484 484
 		
485 485
 		return preg_match($pattern, $actual);
486 486
 	}
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
 	}
@@ -471,15 +471,15 @@  discard block
 block discarded – undo
471 471
 			$controller = static::prepareController($route->controller);
472 472
 			
473 473
 			if ($route->namespace) {
474
-				$controller = $route->namespace . '\\' . $controller;
474
+				$controller = $route->namespace.'\\'.$controller;
475 475
 			}
476 476
 			
477 477
 			if (class_exists($controller)) {
478 478
 				$route->controller = $controller;
479 479
 			}
480 480
 		} else {
481
-			$namespace = $route->namespace ? $route->namespace . '\\' : '';
482
-			$route->controller = $namespace . $this->defaults['controller'];
481
+			$namespace = $route->namespace ? $route->namespace.'\\' : '';
482
+			$route->controller = $namespace.$this->defaults['controller'];
483 483
 		}
484 484
 		
485 485
 		return $route;
@@ -504,8 +504,8 @@  discard block
 block discarded – undo
504 504
 			
505 505
 			if (method_exists($route->controller, $action)) {
506 506
 				$route->action = $action;
507
-			} else if (method_exists($route->controller, $action . 'Action')) {
508
-				$route->action = $action . 'Action';
507
+			} else if (method_exists($route->controller, $action.'Action')) {
508
+				$route->action = $action.'Action';
509 509
 			}
510 510
 		} else {
511 511
 			$route->action = $this->defaults['action'];
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
 			$response = $this->dispatchCallable($request, $response, $callable, $arguments);
727 727
 			$this->unsubscribe($controller);
728 728
 			
729
-			$response->header('X-Location: ' . $request->uri());
729
+			$response->header('X-Location: '.$request->uri());
730 730
 			
731 731
 			return $response;
732 732
 		}
@@ -762,11 +762,11 @@  discard block
 block discarded – undo
762 762
 	 */
763 763
 	public function generate($path, array $parameters = array())
764 764
 	{
765
-		return preg_replace_callback('#/(:[A-Za-z0-9_-]+(\??))#', function ($match) use ($parameters) {
765
+		return preg_replace_callback('#/(:[A-Za-z0-9_-]+(\??))#', function($match) use ($parameters) {
766 766
 			$parameter = trim($match[1], '?:');
767 767
 			
768 768
 			if ($parameter && isset($parameters[$parameter])) {
769
-				return '/' . $parameters[$parameter];
769
+				return '/'.$parameters[$parameter];
770 770
 			}
771 771
 			
772 772
 			if ($parameter !== 'params' && $match[2] !== '?') {
@@ -813,6 +813,6 @@  discard block
 block discarded – undo
813 813
 	 */
814 814
 	public function url($name, array $parameters = array())
815 815
 	{
816
-		return $this->base . $this->path($name, $parameters);
816
+		return $this->base.$this->path($name, $parameters);
817 817
 	}
818 818
 }
Please login to merge, or discard this patch.
src/Darya/View/AbstractView.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,8 +105,8 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	public static function registerExtensions($extensions)
107 107
 	{
108
-		$extensions = array_map(function ($extension) {
109
-			return '.' . ltrim(trim($extension), '.');
108
+		$extensions = array_map(function($extension) {
109
+			return '.'.ltrim(trim($extension), '.');
110 110
 		}, (array) $extensions);
111 111
 		
112 112
 		static::$extensions = array_merge(static::$extensions, $extensions);
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		
223 223
 		foreach ($extensions as $extension) {
224 224
 			if (static::$basePath) {
225
-				$paths[] = static::$basePath . "/$path$extension";
225
+				$paths[] = static::$basePath."/$path$extension";
226 226
 			}
227 227
 			
228 228
 			$paths[] = "$path$extension";
Please login to merge, or discard this patch.
src/Darya/ORM/Model/TransformerTrait.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
 	public function transform($value, $type = '')
23 23
 	{
24
-		$method = 'transform' . ucfirst($type);
24
+		$method = 'transform'.ucfirst($type);
25 25
 		
26 26
 		if (method_exists($this, $method)) {
27 27
 			return $this->$method($value);
Please login to merge, or discard this patch.
src/Darya/Database/Query/Translator/SqlServer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 	 * options.
69 69
 	 * 
70 70
 	 * @param string       $table
71
-	 * @param array|string $columns
71
+	 * @param string $columns
72 72
 	 * @param string       $joins     [optional]
73 73
 	 * @param string       $where     [optional]
74 74
 	 * @param string       $order     [optional]
Please login to merge, or discard this patch.
src/Darya/ORM/Record.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 */
90 90
 	public function get($attribute)
91 91
 	{
92
-		list($attribute, $subattribute) = array_pad(explode('.',  $attribute, 2), 2, null);
92
+		list($attribute, $subattribute) = array_pad(explode('.', $attribute, 2), 2, null);
93 93
 		
94 94
 		if ($this->hasRelation($attribute)) {
95 95
 			$related = $this->related($attribute);
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 		$split = explode('\\', get_class($this));
156 156
 		$class = end($split);
157 157
 		
158
-		return preg_replace_callback('/([A-Z])/', function ($matches) {
159
-			return '_' . strtolower($matches[1]);
160
-		}, lcfirst($class)) . 's';
158
+		return preg_replace_callback('/([A-Z])/', function($matches) {
159
+			return '_'.strtolower($matches[1]);
160
+		}, lcfirst($class)).'s';
161 161
 	}
162 162
 	
163 163
 	/**
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 		$storage = $instance->storage();
412 412
 		
413 413
 		if (!$storage instanceof Searchable) {
414
-			throw new Exception(get_class($instance) . ' storage is not searchable');
414
+			throw new Exception(get_class($instance).' storage is not searchable');
415 415
 		}
416 416
 		
417 417
 		$attributes = $attributes ?: $instance->defaultSearchAttributes();
@@ -476,13 +476,13 @@  discard block
 block discarded – undo
476 476
 		$storage = $instance->storage();
477 477
 		
478 478
 		if (!$storage instanceof Queryable) {
479
-			throw new Exception(get_class($instance) . ' storage is not queryable');
479
+			throw new Exception(get_class($instance).' storage is not queryable');
480 480
 		}
481 481
 		
482 482
 		$query = new Query($instance->table());
483 483
 		$builder = new Builder($query, $storage);
484 484
 		
485
-		$builder->callback(function ($result) use ($instance) {
485
+		$builder->callback(function($result) use ($instance) {
486 486
 			return $instance::hydrate($result->data);
487 487
 		});
488 488
 		
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 		
564 564
 		// Storage must be modifiable in order to save
565 565
 		if (!$storage instanceof Modifiable) {
566
-			throw new Exception($class . ' storage is not modifiable');
566
+			throw new Exception($class.' storage is not modifiable');
567 567
 		}
568 568
 		
569 569
 		// Create or update the model in storage
@@ -797,6 +797,6 @@  discard block
 block discarded – undo
797 797
 			return $this->relation($method);
798 798
 		}
799 799
 		
800
-		throw new Exception('Call to undefined method ' . get_class($this) . '::' . $method . '()');
800
+		throw new Exception('Call to undefined method '.get_class($this).'::'.$method.'()');
801 801
 	}
802 802
 }
Please login to merge, or discard this patch.
src/Darya/ORM/Relation.php 2 patches
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 namespace Darya\ORM;
3 3
 
4 4
 use Darya\ORM\Record;
5
-use Darya\Storage\Readable;
6
-use Darya\Storage\Modifiable;
7 5
 use Darya\Storage\Queryable;
8 6
 use Darya\Storage\Query\Builder;
9 7
 use Exception;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 		$split = explode('\\', $class);
248 248
 		$class = end($split);
249 249
 		
250
-		return preg_replace_callback('/([A-Z])/', function ($matches) {
251
-			return '_' . strtolower($matches[1]);
250
+		return preg_replace_callback('/([A-Z])/', function($matches) {
251
+			return '_'.strtolower($matches[1]);
252 252
 		}, lcfirst($class));
253 253
 	}
254 254
 	
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	 */
261 261
 	protected function prepareForeignKey($class)
262 262
 	{
263
-		return $this->delimitClass($class) . '_id';
263
+		return $this->delimitClass($class).'_id';
264 264
 	}
265 265
 	
266 266
 	/**
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 		
429 429
 		foreach (static::arrayify($instances) as $instance) {
430 430
 			if (!$instance instanceof $class) {
431
-				throw new Exception('Related models must be an instance of ' . $class);
431
+				throw new Exception('Related models must be an instance of '.$class);
432 432
 			}
433 433
 		}
434 434
 	}
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 			->filters($this->filter())
579 579
 			->orders($this->order());
580 580
 
581
-		$builder->callback(function ($result) use ($class) {
581
+		$builder->callback(function($result) use ($class) {
582 582
 			return $class::hydrate($result->data);
583 583
 		});
584 584
 
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 		
789 789
 		// Filter the IDs to associate and dissociate if any have been given
790 790
 		if (!empty($ids)) {
791
-			$filter = function ($instance) use ($ids) {
791
+			$filter = function($instance) use ($ids) {
792 792
 				return in_array($instance->id(), $ids);
793 793
 			};
794 794
 			
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
 		}
803 803
 		
804 804
 		// Dissociate, then associate
805
-		if  (!empty($detached)) {
805
+		if (!empty($detached)) {
806 806
 			$this->dissociate($detached);
807 807
 		}
808 808
 
Please login to merge, or discard this patch.