Completed
Push — master ( 13ef94...d761f8 )
by Chubarov
09:32 queued 04:10
created
src/Actions/Create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $urlHome    = config($this->kernel->getPrefixConfig() . '.UrlHome');
60 60
 
61 61
         $this->headers()->getCookie()->body()->httpErrorsFalse()->get();
62
-        $response   =  $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
62
+        $response   = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
63 63
                        $this->headers()->getCookie()->body()->httpErrorsFalse()->get()
64 64
         );
65 65
         $body       = $response->getBody();
Please login to merge, or discard this patch.
src/Actions/Read.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function filterConstructor($strRequest)
79 79
     {
80
-        $ParameterQuery =  '$filter=';
81
-        $ParameterQuery.=  $strRequest;
80
+        $ParameterQuery = '$filter=';
81
+        $ParameterQuery .= $strRequest;
82 82
         $this->concatenationUrlCurl($ParameterQuery);
83 83
         return $this;
84 84
     }
@@ -95,13 +95,13 @@  discard block
 block discarded – undo
95 95
     public function orderBy($whatSort, $param = 'asc')
96 96
     {
97 97
         $ParameterQuery = '$orderby=';
98
-        $ParameterQuery.=  ucfirst($whatSort);
98
+        $ParameterQuery .= ucfirst($whatSort);
99 99
 
100
-        if ( empty($param) === false ) {
100
+        if (empty($param) === false) {
101 101
             if ($param != 'desc' && $param != 'asc') {
102 102
                 throw new \Exception('no valid orderby parameters');
103 103
             }
104
-            $ParameterQuery.=  " ".$param;
104
+            $ParameterQuery .= " " . $param;
105 105
         }
106 106
          $this->concatenationUrlCurl($ParameterQuery);
107 107
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     public function skip($skip)
119 119
     {
120 120
         Assert::that($skip, 'You must specify a numeric parameter for the amount of the method')->integer();
121
-        $ParameterQuery = '$skip='.$skip;
121
+        $ParameterQuery = '$skip=' . $skip;
122 122
         $this->concatenationUrlCurl($ParameterQuery);
123 123
 
124 124
         return $this;
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function amount($amountMax = null)
134 134
     {
135
-        Assert::that($amountMax,'You must specify a numeric parameter for the amount of the method')->integer();
136
-        $ParameterQuery = '$top='.$amountMax;
135
+        Assert::that($amountMax, 'You must specify a numeric parameter for the amount of the method')->integer();
136
+        $ParameterQuery = '$top=' . $amountMax;
137 137
         $this->concatenationUrlCurl($ParameterQuery);
138 138
         return $this;
139 139
     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $url          = $this->kernel->getCollection() . $parameters;
162 162
         $urlHome      = config($this->kernel->getPrefixConfig() . '.UrlHome');
163 163
 
164
-        $response     =  $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
164
+        $response     = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
165 165
                          $this->debug()->headers()->getCookie()->httpErrorsFalse()->get()
166 166
         );
167 167
         $body         = $response->getBody();
Please login to merge, or discard this patch.
src/Actions/Delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
         $urlHome    = config($this->kernel->getPrefixConfig() . '.UrlHome');
58 58
 
59 59
 
60
-        $response =  $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
60
+        $response = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
61 61
                      $this->headers()->getCookie()->httpErrorsFalse()->get()
62 62
         );
63 63
 
Please login to merge, or discard this patch.
src/Actions/Update.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         $url        = $this->kernel->getCollection() . $parameters;
84 84
         $urlHome    = config($this->kernel->getPrefixConfig() . '.UrlHome');
85 85
 
86
-        $response   =  $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
86
+        $response   = $this->kernel->getCurl()->request($this->HTTP_TYPE, $urlHome . $url,
87 87
                        $this->headers()->getCookie()->body()->httpErrorsFalse()->get()
88 88
         );
89 89
         $body       = $response->getBody();
Please login to merge, or discard this patch.
src/Handlers/XmlHandler.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@  discard block
 block discarded – undo
84 84
         $this->response      = simplexml_load_string($response);
85 85
         $copyXml             = $this->response;
86 86
 
87
-        if ( $this->response === false || $this->checkIntegrity($this->response) === false )
87
+        if ($this->response === false || $this->checkIntegrity($this->response) === false)
88 88
         {
89 89
             return [];
90 90
         }
91 91
 
92
-            $array_vars_list    = get_object_vars($copyXml);
92
+            $array_vars_list = get_object_vars($copyXml);
93 93
 
94 94
             if (key_exists('content', $array_vars_list)) {
95 95
                 return $this->arrayOne();
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function checkIntegrity($response)
109 109
     {
110
-        if ( empty($response->message) )
110
+        if (empty($response->message))
111 111
         {
112 112
             return true;
113 113
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     private function workspace()
156 156
     {
157 157
         foreach ($this->response->workspace->collection as $item) {
158
-            $this->validText[] = get_object_vars($item->children(  $this->namespaces['NamespaceAtom'] ))['title'];
158
+            $this->validText[] = get_object_vars($item->children($this->namespaces['NamespaceAtom']))['title'];
159 159
         }
160 160
         return $this;
161 161
     }
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
      */
168 168
     private function arrayMany()
169 169
     {
170
-            foreach ($this->response->children( $this->namespaces['NamespaceAtom'] )->entry as $item ) {
171
-                $this->validText[] =   $item->content->children( $this->namespaces['NamespaceMetadata'] )
170
+            foreach ($this->response->children($this->namespaces['NamespaceAtom'])->entry as $item) {
171
+                $this->validText[] = $item->content->children($this->namespaces['NamespaceMetadata'])
172 172
                     ->children($this->namespaces['NamespaceDataServices']);
173 173
             }
174 174
             return $this;
@@ -179,9 +179,9 @@  discard block
 block discarded – undo
179 179
      */
180 180
     private function arrayOne()
181 181
     {
182
-        $this->validText = $this->response->children( $this->namespaces['NamespaceAtom'] )->content
183
-            ->children( $this->namespaces['NamespaceMetadata'] )
184
-            ->children( $this->namespaces['NamespaceDataServices'] );
182
+        $this->validText = $this->response->children($this->namespaces['NamespaceAtom'])->content
183
+            ->children($this->namespaces['NamespaceMetadata'])
184
+            ->children($this->namespaces['NamespaceDataServices']);
185 185
         return $this;
186 186
     }
187 187
 
@@ -218,11 +218,11 @@  discard block
 block discarded – undo
218 218
         $xmlns_dcd->appendChild($valued);
219 219
 
220 220
         //----------  properties  ----------//
221
-        $properties   = $dom->createElement('m:properties');
221
+        $properties = $dom->createElement('m:properties');
222 222
         $content->appendChild($properties);
223 223
 
224 224
         foreach ($data as $nameField => $valueField) {
225
-            $element  = $dom->createElement($this->prefixNamespace.':'.$nameField);
225
+            $element  = $dom->createElement($this->prefixNamespace . ':' . $nameField);
226 226
             $properties->appendChild($element);
227 227
             $valued   = $dom->createTextNode($valueField);
228 228
             $element->appendChild($valued);
Please login to merge, or discard this patch.
src/KernelBpm.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function loadConfiguration(SourceConfiguration $configuration)
111 111
     {
112
-        config()->set(  $this->prefixConfiguration = $configuration->getName(), $configuration->get());
112
+        config()->set($this->prefixConfiguration = $configuration->getName(), $configuration->get());
113 113
     }
114 114
 
115 115
     /**
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
     {
160 160
         Assertion::keyIsset($this->action, $typeAction);
161 161
 
162
-        $this->currentAction  =  app()->make( $this->action[$typeAction] );
162
+        $this->currentAction = app()->make($this->action[$typeAction]);
163 163
 
164 164
         return $this->currentAction;
165 165
     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
          extract($this->splitAction($action));
177 177
 
178
-         $action  = $this->setAction($action);
178
+         $action = $this->setAction($action);
179 179
          $this->setHandler($handler);
180 180
 
181 181
         $action->injectionKernel($this);
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
     {
206 206
         try {
207 207
             Assertion::regex($collection, '/[A-z]+Collection$/');
208
-        } catch(AssertionFailedException $e) {
209
-           throw new \Exception("Expected word 'Collection' in parameter method setCollection received : " .  $e->getValue());
208
+        } catch (AssertionFailedException $e) {
209
+           throw new \Exception("Expected word 'Collection' in parameter method setCollection received : " . $e->getValue());
210 210
         }
211 211
 
212 212
         return $this->collection = $collection;
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
 
238 238
         // verification values
239 239
         Assertion::between(count($split), 2, 2);
240
-        Assertion::keyExists( $this->action, $split[0]);
241
-        Assertion::keyExists( $this->handlers, $split[1]);
240
+        Assertion::keyExists($this->action, $split[0]);
241
+        Assertion::keyExists($this->handlers, $split[1]);
242 242
 
243 243
         return ['action' => $split[0], 'handler' => $split[1]];
244 244
     }
Please login to merge, or discard this patch.
src/Assistants/CookieAuthentication.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
             curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
44 44
             curl_setopt($curl, CURLOPT_HEADER, 1);
45
-            curl_setopt($curl, CURLOPT_URL,  $this->configuration['UrlLogin']);
45
+            curl_setopt($curl, CURLOPT_URL, $this->configuration['UrlLogin']);
46 46
             curl_setopt($curl, CURLOPT_POST, true);
47 47
             curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
48 48
             curl_setopt($curl, CURLOPT_COOKIEJAR, $this->pathToCookieFile);
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function getCsrf()
73 73
     {
74
-        if ( file_exists($this->pathToCookieFile) === false )
74
+        if (file_exists($this->pathToCookieFile) === false)
75 75
         {
76 76
             return '';
77 77
         }
78 78
         preg_match("/BPMCSRF\\s(.+)/", file_get_contents($this->pathToCookieFile), $matches);
79 79
 
80
-        if ( isset($matches[1]) === false )
80
+        if (isset($matches[1]) === false)
81 81
         {
82 82
             return '';
83 83
         }
Please login to merge, or discard this patch.
src/Assistants/ConstructorUrl.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      */
18 18
     protected function concatenationUrlCurl($newParameters)
19 19
     {
20
-        if ($this->url  == '?') {
20
+        if ($this->url == '?') {
21 21
             $this->url .= $newParameters;
22 22
         } elseif ($this->url == '') {
23 23
             $this->url .= $newParameters;
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
             $this->url .= $newParameters;
26 26
         }
27 27
         else {
28
-            $this->url .= '&'.$newParameters;
28
+            $this->url .= '&' . $newParameters;
29 29
         }
30 30
         return $this;
31 31
     }
@@ -40,10 +40,10 @@  discard block
 block discarded – undo
40 40
         $this->checkGuId($guid);
41 41
         $this->url      = '';
42 42
         $ParameterQuery = '(guid';
43
-        $ParameterQuery.= "'";
44
-        $ParameterQuery.= $guid;
45
-        $ParameterQuery.= "'";
46
-        $ParameterQuery.=')';
43
+        $ParameterQuery .= "'";
44
+        $ParameterQuery .= $guid;
45
+        $ParameterQuery .= "'";
46
+        $ParameterQuery .= ')';
47 47
 
48 48
         return $this->concatenationUrlCurl($ParameterQuery);
49 49
     }
Please login to merge, or discard this patch.
src/Handlers/JsonHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     private function chooseJsonPrefix($parse)
50 50
     {
51 51
         $decode = json_decode($parse);
52
-        if ( isset($decode->{$this->jsonPrefix}->{$this->jsonPrefixWord}) )
52
+        if (isset($decode->{$this->jsonPrefix}->{$this->jsonPrefixWord}))
53 53
         {
54 54
             return $decode->{$this->jsonPrefix}->{$this->jsonPrefixWord};
55 55
         } else {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function checkIntegrity($response)
65 65
     {
66
-       return isset( json_decode($response)->{$this->jsonPrefix} );
66
+       return isset(json_decode($response)->{$this->jsonPrefix} );
67 67
     }
68 68
 
69 69
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     public function create(array $data)
91 91
     {
92
-        if ( empty($data)){
92
+        if (empty($data)) {
93 93
             return $this->buildJson = '{}';
94 94
         }
95 95
         return $this->buildJson = json_encode($data);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             if (gettype($value) == 'object')
104 104
             {
105 105
                 $result[$key] = $this->objectToArray($value);
106
-            } else{
106
+            } else {
107 107
                if (gettype($value) != 'object')
108 108
                {
109 109
                    $result[$key] = $value;
Please login to merge, or discard this patch.