Test Setup Failed
Push — master ( 85b30b...7230cc )
by Php Easy Api
04:43
created
src/resta/Support/TrackLogger.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
      * @param $output
24 24
      * @param $arguments
25 25
      */
26
-    public function __construct(ApplicationContracts $app,$output,$arguments)
26
+    public function __construct(ApplicationContracts $app, $output, $arguments)
27 27
     {
28 28
         parent::__construct($app);
29 29
 
30
-        if(!$this->app->runningInConsole()){
30
+        if (!$this->app->runningInConsole()) {
31 31
             exception()->runtime('Console application is missing');
32 32
         }
33 33
 
@@ -60,31 +60,31 @@  discard block
 block discarded – undo
60 60
      */
61 61
     public function handle($callback)
62 62
     {
63
-        if(isset($this->arguments['filter'])){
63
+        if (isset($this->arguments['filter'])) {
64 64
 
65 65
             $filterResult = [];
66 66
             $filter = lcfirst($this->arguments['filter']);
67 67
 
68
-            foreach (explode('+',$filter) as $item){
69
-                $itemList = explode('=',$item);
70
-                if(isset($this->output[$itemList[0]]) && $this->output[$itemList[0]]==$itemList[1]){
68
+            foreach (explode('+', $filter) as $item) {
69
+                $itemList = explode('=', $item);
70
+                if (isset($this->output[$itemList[0]]) && $this->output[$itemList[0]]==$itemList[1]) {
71 71
                     $filterResult[] = true;
72 72
                 }
73
-                else{
73
+                else {
74 74
                     $filterResult[] = false;
75 75
                 }
76 76
             }
77 77
         }
78 78
 
79
-        if(!isset($filterResult) || (isset($filterResult) && is_array($filterResult) && !in_array(false,$filterResult))){
79
+        if (!isset($filterResult) || (isset($filterResult) && is_array($filterResult) && !in_array(false, $filterResult))) {
80 80
 
81
-            if($this->output['meta']['success'])
81
+            if ($this->output['meta']['success'])
82 82
             {
83 83
                 echo ''.$this->output['trackNumber'].' - SUCCESS:';
84 84
                 echo PHP_EOL;
85 85
                 echo 'Request Success : true';
86 86
             }
87
-            else{
87
+            else {
88 88
 
89 89
                 echo ''.$this->output['trackNumber'].' - ERROR:';
90 90
                 echo PHP_EOL;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
             echo PHP_EOL;
104 104
             $requestClientIp = (isset($this->output['clientIp'])) ? $this->output['clientIp'] : null;
105
-            echo 'Client Ip: '.$requestClientIp ;
105
+            echo 'Client Ip: '.$requestClientIp;
106 106
 
107 107
             echo PHP_EOL;
108 108
             $requestEndpoint = (isset($this->output['requestUrl'])) ? $this->output['requestUrl'] : null;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
             echo 'Client Key: '.$requestClientKey;
127 127
 
128 128
             echo PHP_EOL;
129
-            if(is_callable($callback)){
129
+            if (is_callable($callback)) {
130 130
                 echo $callback($this);
131 131
             }
132 132
 
Please login to merge, or discard this patch.