Completed
Push — master ( 6bfa64...0e7ab7 )
by Ömer
06:02
created
src/Knot/Exceptions/WrongArrayPathException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,6 +4,6 @@
 block discarded – undo
4 4
 
5 5
 	public function __toString()
6 6
 	{
7
-		return __CLASS__ . ":[" . $this->code . "]: Wrong Path. Path: " . $this->message . '\n';
7
+		return __CLASS__.":[".$this->code."]: Wrong Path. Path: ".$this->message.'\n';
8 8
 	}
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
src/Knot/Exceptions/FunctionExecuteException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 
7 7
 	public function __toString()
8 8
 	{
9
-		return __CLASS__ . ":[" . $this->code . "]: Function execute error. Function: " . $this->message . '\n';
9
+		return __CLASS__.":[".$this->code."]: Function execute error. Function: ".$this->message.'\n';
10 10
 	}
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
src/Knot/Dict/Helpers/UnderscoreHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 	public function __construct()
83 83
 	{
84
-		if ( class_exists("__") )
84
+		if (class_exists("__"))
85 85
 		{
86 86
 			$this->ready = true;
87 87
 		}
@@ -97,11 +97,11 @@  discard block
 block discarded – undo
97 97
 	public function addRoutes(HelperManager $helperManager)
98 98
 	{
99 99
 		// If underscore is not exists, don't add any routes to helper.
100
-		if ( $this->ready === true )
100
+		if ($this->ready === true)
101 101
 		{
102 102
 			foreach ($this->functions as $functionName)
103 103
 			{
104
-				$helperManager->addRoute($functionName, [ __CLASS__, "execute" ]);
104
+				$helperManager->addRoute($functionName, [__CLASS__, "execute"]);
105 105
 			}
106 106
 		}
107 107
 	}
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 		$data = $knot->toArray();
113 113
 
114 114
 		$underscoreObject = \__($data);
115
-		$targetFunction   = [ $underscoreObject, $functionName ];
115
+		$targetFunction   = [$underscoreObject, $functionName];
116 116
 
117 117
 		return call_user_func_array($targetFunction, $arguments);
118 118
 	}
Please login to merge, or discard this patch.
src/Knot/Dict/Helpers/PHPArrayEqualizerHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		foreach ($this->functions as $functionName)
59 59
 		{
60 60
 			$route = $this->convertPHPFunctionToRoute($functionName);
61
-			$helperManager->addRoute($route, [ __CLASS__, "execute" ]);
61
+			$helperManager->addRoute($route, [__CLASS__, "execute"]);
62 62
 		}
63 63
 	}
64 64
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	public static function execute(AbstractDictBody $knot, $arguments, $methodName)
67 67
 	{
68 68
 		$methodName = self::convertRouteToPHPFunction($methodName);
69
-		$data       =& $knot->toArray();
69
+		$data       = & $knot->toArray();
70 70
 
71 71
 		array_unshift($arguments, $data);
72 72
 		$data = call_user_func_array($methodName, $arguments);
Please login to merge, or discard this patch.
src/Knot/Dict/Helpers/AbstractPHPArrayHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	{
15 15
 		$route = ltrim($phpFunctionName, "array_");
16 16
 
17
-		return preg_replace_callback('/\_([a-z])/', function ($matches)
17
+		return preg_replace_callback('/\_([a-z])/', function($matches)
18 18
 		{
19 19
 			return strtoupper($matches[1]);
20 20
 		}, $route);
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
 
24 24
 	protected static function convertRouteToPHPFunction($route)
25 25
 	{
26
-		$right_side = preg_replace_callback('/([A-Z])/', function ($matches)
26
+		$right_side = preg_replace_callback('/([A-Z])/', function($matches)
27 27
 		{
28
-			return '_' . strtolower($matches[1]);
28
+			return '_'.strtolower($matches[1]);
29 29
 		}, $route);
30 30
 
31
-		return 'array_' . $right_side;
31
+		return 'array_'.$right_side;
32 32
 	}
33 33
 
34 34
 }
35 35
\ No newline at end of file
Please login to merge, or discard this patch.
src/Knot/Dict/Helpers/PHPArrayChangerHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 		foreach ($this->functions as $functionName)
37 37
 		{
38 38
 			$route = $this->convertPHPFunctionToRoute($functionName);
39
-			$helperManager->addRoute($route, [ __CLASS__, "execute" ]);
39
+			$helperManager->addRoute($route, [__CLASS__, "execute"]);
40 40
 		}
41 41
 	}
42 42
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	public static function execute(AbstractDictBody $knot, $arguments, $methodName)
45 45
 	{
46 46
 		$methodName = self::convertRouteToPHPFunction($methodName);
47
-		$data       =& $knot->toArray();
47
+		$data       = & $knot->toArray();
48 48
 
49
-		return call_user_func_array($methodName, array_merge([ &$data ], $arguments));
49
+		return call_user_func_array($methodName, array_merge([&$data], $arguments));
50 50
 	}
51 51
 }
52 52
\ No newline at end of file
Please login to merge, or discard this patch.
src/Knot/Dict/ArrayAccessTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
 	 */
30 30
 	public function &offsetGet($offset = null)
31 31
 	{
32
-		if ( count(func_get_args()) == 0 or is_null($offset) )
32
+		if (count(func_get_args()) == 0 or is_null($offset))
33 33
 		{
34
-			$this->data[] = [ ];
34
+			$this->data[] = [];
35 35
 
36 36
 			return $this->data[$this->lastKey()];
37 37
 		}
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 */
49 49
 	public function offsetSet($offset, $value)
50 50
 	{
51
-		if ( is_null($offset) )
51
+		if (is_null($offset))
52 52
 		{
53 53
 			$this->data[] = $value;
54 54
 		}
Please login to merge, or discard this patch.
src/Knot/Dict/ParentDict.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 	 */
14 14
 	public function kill()
15 15
 	{
16
-		$this->data = [ ];
16
+		$this->data = [];
17 17
 
18 18
 		return $this;
19 19
 	}
Please login to merge, or discard this patch.
src/Knot/Dict/ChildDict.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 	public function kill()
11 11
 	{
12 12
 		$this->parentArray->del($this->path());
13
-		$this->data = [ ];
13
+		$this->data = [];
14 14
 
15 15
 		return $this;
16 16
 	}
Please login to merge, or discard this patch.