Test Failed
Branch 2.0.0 (fa7db6)
by Chubarov
09:07
created
example.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 // 7 Example Update from API
50 50
 $test = $test->action('update:xml', function ($creator){
51 51
     $creator->guid('')->setData([
52
-       'Number' => 'test'
52
+        'Number' => 'test'
53 53
     ]);
54 54
 })->get();
55 55
 dd($test);
56 56
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 //dd($test, 'done');
48 48
 
49 49
 // 7 Example Update from API
50
-$test = $test->action('update:xml', function ($creator){
50
+$test = $test->action('update:xml', function($creator) {
51 51
     $creator->guid('')->setData([
52 52
        'Number' => 'test'
53 53
     ]);
Please login to merge, or discard this patch.
src/Handlers/XmlConverter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,12 +9,12 @@  discard block
 block discarded – undo
9 9
     private function xmlToArrayRecursive($xml) {
10 10
         $xml = (array) $xml;
11 11
 
12
-        if(empty($xml)) {
12
+        if (empty($xml)) {
13 13
             return null;
14 14
         }
15 15
 
16 16
         foreach ($xml as $key => $val) {
17
-            if (is_array($val)){
17
+            if (is_array($val)) {
18 18
                 $xml[$key] = $this->xmlToArray($val);
19 19
             } else {
20 20
                 if ($val instanceof SimpleXMLElement) {
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     private function xmlToArray($xml) {
33 33
         $xml = (array) $xml;
34 34
 
35
-        if(empty($xml)) {
35
+        if (empty($xml)) {
36 36
             return null;
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Handlers/JsonHandler.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function checkIntegrity($response)
49 49
     {
50
-       return isset( json_decode($response)->{$this->jsonPrefix} );
50
+        return isset( json_decode($response)->{$this->jsonPrefix} );
51 51
     }
52 52
 
53 53
     /**
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
             {
89 89
                 $result[$key] = $this->objectToArray($value);
90 90
             } else{
91
-               if (gettype($value) != 'object')
92
-               {
93
-                   $result[$key] = $value;
94
-               } else{
95
-                   $result[$key] = get_object_vars($value);
96
-               }
91
+                if (gettype($value) != 'object')
92
+                {
93
+                    $result[$key] = $value;
94
+                } else{
95
+                    $result[$key] = get_object_vars($value);
96
+                }
97 97
 
98 98
             }
99 99
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function checkIntegrity($response)
49 49
     {
50
-       return isset( json_decode($response)->{$this->jsonPrefix} );
50
+       return isset(json_decode($response)->{$this->jsonPrefix} );
51 51
     }
52 52
 
53 53
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function create(array $data)
75 75
     {
76
-        if ( empty($data)){
76
+        if (empty($data)) {
77 77
             return $this->buildJson = '{}';
78 78
         }
79 79
         return $this->buildJson = json_encode($data);
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
             if (gettype($value) == 'object')
88 88
             {
89 89
                 $result[$key] = $this->objectToArray($value);
90
-            } else{
90
+            } else {
91 91
                if (gettype($value) != 'object')
92 92
                {
93 93
                    $result[$key] = $value;
94
-               } else{
94
+               } else {
95 95
                    $result[$key] = get_object_vars($value);
96 96
                }
97 97
 
Please login to merge, or discard this patch.
src/Actions/Create.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,12 +55,12 @@
 block discarded – undo
55 55
     {
56 56
         $parameters = str_replace(' ', '%20', $this->url);
57 57
 
58
-        $url        = $this->kernel->getCollection() . $parameters;
58
+        $url        = $this->kernel->getCollection().$parameters;
59 59
         $client     = app()->make(ClientInterface::class);
60
-        $urlHome    = config($this->kernel->getPrefixConfig() . '.UrlHome');
60
+        $urlHome    = config($this->kernel->getPrefixConfig().'.UrlHome');
61 61
 
62 62
         try {
63
-            $response = $client->request($this->HTTP_TYPE, $urlHome . $url,
63
+            $response = $client->request($this->HTTP_TYPE, $urlHome.$url,
64 64
                 [
65 65
                     'headers' => [
66 66
                         'HTTP/1.0',
Please login to merge, or discard this patch.
src/Actions/Read.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
             }
111 111
             $ParameterQuery.=  " ".$param;
112 112
         }
113
-         $this->concatenationUrlCurl($ParameterQuery);
113
+            $this->concatenationUrlCurl($ParameterQuery);
114 114
 
115 115
         return $this;
116 116
     }
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -58,14 +58,14 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function guid($guid)
60 60
     {
61
-        try{
61
+        try {
62 62
             Assertion::regex($guid, '/[A-z0-9]{8}-[A-z0-9]{4}-[A-z0-9]{4}-[A-z0-9]{4}-[A-z0-9]{12}/');
63
-            $ParameterQuery = '(guid'.'\'' . $guid . '\''.')';
63
+            $ParameterQuery = '(guid'.'\''.$guid.'\''.')';
64 64
             $this->url = '';
65 65
             $this->concatenationUrlCurl($ParameterQuery);
66 66
 
67 67
             return $this;
68
-        } catch(AssertionFailedException $e) {
68
+        } catch (AssertionFailedException $e) {
69 69
             throw new \Exception("Your guid {$e->getValue()} does not match the mask : 00000000-0000-0000-0000-000000000000");
70 70
         }
71 71
 
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function filterConstructor($strRequest)
86 86
     {
87
-        $ParameterQuery =  '$filter=';
88
-        $ParameterQuery.=  $strRequest;
87
+        $ParameterQuery = '$filter=';
88
+        $ParameterQuery .= $strRequest;
89 89
         $this->concatenationUrlCurl($ParameterQuery);
90 90
         return $this;
91 91
     }
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
     public function orderBy($whatSort, $param = 'asc')
103 103
     {
104 104
         $ParameterQuery = '$orderby=';
105
-        $ParameterQuery.=  ucfirst($whatSort);
105
+        $ParameterQuery .= ucfirst($whatSort);
106 106
 
107
-        if ( empty($param) === false ) {
107
+        if (empty($param) === false) {
108 108
             if ($param != 'desc' && $param != 'asc') {
109 109
                 throw new \Exception('no valid orderby parameters');
110 110
             }
111
-            $ParameterQuery.=  " ".$param;
111
+            $ParameterQuery .= " ".$param;
112 112
         }
113 113
          $this->concatenationUrlCurl($ParameterQuery);
114 114
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function amount($amountMax = null)
141 141
     {
142
-        Assert::that($amountMax,'You must specify a numeric parameter for the amount of the method')->integer();
142
+        Assert::that($amountMax, 'You must specify a numeric parameter for the amount of the method')->integer();
143 143
         $ParameterQuery = '$top='.$amountMax;
144 144
         $this->concatenationUrlCurl($ParameterQuery);
145 145
         return $this;
@@ -151,12 +151,12 @@  discard block
 block discarded – undo
151 151
     private function query()
152 152
     {
153 153
         $parameters = str_replace(' ', '%20', $this->url);
154
-        $url        = $this->kernel->getCollection() . $parameters;
154
+        $url        = $this->kernel->getCollection().$parameters;
155 155
         $client     = app()->make(ClientInterface::class);
156
-        $urlHome    = config($this->kernel->getPrefixConfig() . '.UrlHome');
156
+        $urlHome    = config($this->kernel->getPrefixConfig().'.UrlHome');
157 157
 
158 158
         try {
159
-            $response = $client->request($this->HTTP_TYPE, $urlHome . $url,
159
+            $response = $client->request($this->HTTP_TYPE, $urlHome.$url,
160 160
                 [
161 161
                     'headers' => [
162 162
                         'HTTP/1.0',
Please login to merge, or discard this patch.
src/Actions/Update.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
     {
79 79
         $this->url      = '';
80 80
         $ParameterQuery = '(guid';
81
-        $ParameterQuery.= "'";
82
-        $ParameterQuery.= $guid;
83
-        $ParameterQuery.= "'";
84
-        $ParameterQuery.=')';
81
+        $ParameterQuery .= "'";
82
+        $ParameterQuery .= $guid;
83
+        $ParameterQuery .= "'";
84
+        $ParameterQuery .= ')';
85 85
 
86 86
         return $this->concatenationUrlCurl($ParameterQuery);
87 87
     }
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
     {
99 99
         $parameters = str_replace(' ', '%20', $this->url);
100 100
 
101
-        $url        = $this->kernel->getCollection() . $parameters;
101
+        $url        = $this->kernel->getCollection().$parameters;
102 102
         $client     = app()->make(ClientInterface::class);
103
-        $urlHome    = config($this->kernel->getPrefixConfig() . '.UrlHome');
103
+        $urlHome    = config($this->kernel->getPrefixConfig().'.UrlHome');
104 104
 
105 105
 
106 106
         try {
107
-            $response = $client->request($this->HTTP_TYPE, $urlHome . $url,
107
+            $response = $client->request($this->HTTP_TYPE, $urlHome.$url,
108 108
                 [
109 109
                     'headers' => [
110 110
                         'HTTP/1.0',
Please login to merge, or discard this patch.
src/ServiceProviders/ConfigurationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 {
10 10
     public function register()
11 11
     {
12
-        if ( app()->resolved('config') === false )
12
+        if (app()->resolved('config') === false)
13 13
         {
14 14
             app()->instance('config', new Repository());
15 15
         }
Please login to merge, or discard this patch.
src/ServiceProviders/ActionsServiceProviders.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
13 13
 
14 14
     public function register()
15 15
     {
16
-       app()->bind(Read::class,   Read::class);
17
-       app()->bind(Create::class, Create::class);
18
-       app()->bind(Update::class, Update::class);
19
-       app()->bind(Delete::class, Delete::class);
16
+        app()->bind(Read::class,   Read::class);
17
+        app()->bind(Create::class, Create::class);
18
+        app()->bind(Update::class, Update::class);
19
+        app()->bind(Delete::class, Delete::class);
20 20
     }
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this 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 register()
15 15
     {
16
-       app()->bind(Read::class,   Read::class);
16
+       app()->bind(Read::class, Read::class);
17 17
        app()->bind(Create::class, Create::class);
18 18
        app()->bind(Update::class, Update::class);
19 19
        app()->bind(Delete::class, Delete::class);
Please login to merge, or discard this patch.
src/Assistants/CookieAuthentication.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 class CookieAuthentication implements Authentication
11 11
 {
12 12
     protected $prefixCSRF       = 'BPMCSRF';
13
-    protected $pathToCookieFile = __DIR__ . '/../resource/cookie.txt';
13
+    protected $pathToCookieFile = __DIR__.'/../resource/cookie.txt';
14 14
     protected $configuration;
15 15
 
16 16
     public function setConfig(array $config)
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
             curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
39 39
             curl_setopt($curl, CURLOPT_HEADER, 1);
40
-            curl_setopt($curl, CURLOPT_URL,  $this->configuration['UrlLogin']);
40
+            curl_setopt($curl, CURLOPT_URL, $this->configuration['UrlLogin']);
41 41
             curl_setopt($curl, CURLOPT_POST, true);
42 42
             curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
43 43
             curl_setopt($curl, CURLOPT_COOKIEJAR, $this->pathToCookieFile);
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getCsrf()
68 68
     {
69
-        if ( file_exists($this->pathToCookieFile) === false )
69
+        if (file_exists($this->pathToCookieFile) === false)
70 70
         {
71 71
             return '';
72 72
         }
73 73
         preg_match("/BPMCSRF\\s(.+)/", file_get_contents($this->pathToCookieFile), $matches);
74 74
 
75
-        if ( isset($matches[1]) === false )
75
+        if (isset($matches[1]) === false)
76 76
         {
77 77
             return '';
78 78
         }
Please login to merge, or discard this patch.