Completed
Push — master ( 2fec7f...f11719 )
by Iman
02:20
created
src/Conditions/Traits/Callbacks.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,15 +11,15 @@
 block discarded – undo
11 11
 
12 12
     public function methodAllows($callback, array $parameters = [])
13 13
     {
14
-        return function (...$payload) use ($callback, $parameters) {
15
-            return (bool) app()->call($callback, array_merge($parameters, ...$payload));
14
+        return function(...$payload) use ($callback, $parameters) {
15
+            return (bool)app()->call($callback, array_merge($parameters, ...$payload));
16 16
         };
17 17
     }
18 18
 
19 19
     public function valueAllows($value)
20 20
     {
21
-        return function () use ($value) {
22
-            return (bool) $value;
21
+        return function() use ($value) {
22
+            return (bool)$value;
23 23
         };
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
src/Conditions/ConditionsFacade.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
         if (! isset($this->methods[$method])) {
12 12
             throw new \BadMethodCallException($method.' does not exists as a Heyman condition');
13 13
         }
14
-       $condition = $this->methods[$method];
14
+        $condition = $this->methods[$method];
15 15
 
16
-       if (is_callable($condition)) {
16
+        if (is_callable($condition)) {
17 17
             return $condition(...$param);
18 18
         }
19 19
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,8 +8,8 @@
 block discarded – undo
8 8
 
9 9
     public function _call($method, $param)
10 10
     {
11
-        if (! isset($this->methods[$method])) {
12
-            throw new \BadMethodCallException($method.' does not exists as a Heyman condition');
11
+        if (!isset($this->methods[$method])) {
12
+            throw new \BadMethodCallException($method . ' does not exists as a Heyman condition');
13 13
         }
14 14
        $condition = $this->methods[$method];
15 15
 
Please login to merge, or discard this patch.
Braces   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,9 +23,10 @@
 block discarded – undo
23 23
 
24 24
     public function define($methodName, $callable)
25 25
     {
26
-        if (is_callable($callable) || (is_string($callable) and mb_strpos($callable, '@')))
27
-            $this->methods[$methodName] = $callable;
28
-        else
29
-            throw new \InvalidArgumentException("$callable should be string Class@method or a php callable");
26
+        if (is_callable($callable) || (is_string($callable) and mb_strpos($callable, '@'))) {
27
+                    $this->methods[$methodName] = $callable;
28
+        } else {
29
+                    throw new \InvalidArgumentException("$callable should be string Class@method or a php callable");
30
+        }
30 31
     }
31 32
 }
Please login to merge, or discard this patch.