Passed
Pull Request — master (#22)
by Vladislav
02:09
created
src/Core/Request/PostRequest.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@
 block discarded – undo
16 16
         $bodyParams = $this->buildRequestParams($params);
17 17
 
18 18
         $this->addCurlOpt(CURLOPT_URL, static::$host . $endpoint)
19
-             ->addCurlOpt(CURLOPT_CUSTOMREQUEST, EnumHttpMethods::POST)
20
-             ->addCurlOpt(CURLOPT_ENCODING, '')
21
-             ->addCurlOpt(CURLOPT_MAXREDIRS, 10)
22
-             ->addCurlOpt(CURLOPT_TIMEOUT, 0)
23
-             ->addCurlOpt(CURLOPT_FOLLOWLOCATION, true)
24
-             ->addCurlOpt(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1)
25
-             ->addCurlOpt(CURLOPT_POSTFIELDS, $bodyParams);
19
+                ->addCurlOpt(CURLOPT_CUSTOMREQUEST, EnumHttpMethods::POST)
20
+                ->addCurlOpt(CURLOPT_ENCODING, '')
21
+                ->addCurlOpt(CURLOPT_MAXREDIRS, 10)
22
+                ->addCurlOpt(CURLOPT_TIMEOUT, 0)
23
+                ->addCurlOpt(CURLOPT_FOLLOWLOCATION, true)
24
+                ->addCurlOpt(CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1)
25
+                ->addCurlOpt(CURLOPT_POSTFIELDS, $bodyParams);
26 26
 
27 27
         if ($this->isNeedAuthorization) {
28 28
             $this->auth($bodyParams);
Please login to merge, or discard this patch.
src/Core/Request/GetRequest.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
         $queryString = $this->buildRequestParams($queryParams);
19 19
 
20 20
         $this->addCurlOpt(CURLOPT_URL, static::$host . $endpoint . '?' . $queryString)
21
-             ->addCurlOpt(CURLOPT_CUSTOMREQUEST, EnumHttpMethods::GET);
21
+                ->addCurlOpt(CURLOPT_CUSTOMREQUEST, EnumHttpMethods::GET);
22 22
 
23 23
         if ($this->isNeedAuthorization) {
24 24
             $this->auth($queryString);
Please login to merge, or discard this patch.
src/Core/Objects/AbstractParameters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
         $entityMethods = get_class_methods($this);
20 20
         $params = [];
21 21
 
22
-        array_walk($entityMethods, function ($method) use (&$entity, &$params) {
22
+        array_walk($entityMethods, function($method) use (&$entity, &$params) {
23 23
             if (substr($method, 0, 3) == 'get') {
24 24
                 $entityProperty = lcfirst(substr($method, 3));
25 25
                 if (isset($entity->$entityProperty)) {
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
                     $params[$entityProperty] = $ePropertyVal;
34 34
 
35 35
                     $propIndex = array_search($entityProperty, $entity->requiredFields, true);
36
-                    if($propIndex > -1 && !empty($params[$entityProperty])) {
36
+                    if ($propIndex > -1 && !empty($params[$entityProperty])) {
37 37
                         unset($entity->requiredFields[$propIndex]);
38 38
                     }
39 39
 
Please login to merge, or discard this patch.
src/Core/Enums/EnumOutputMode.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 interface EnumOutputMode
5 5
 {
6 6
     const MODE_ENTITY = 0;
7
-   const MODE_JSON = 1;
7
+    const MODE_JSON = 1;
8 8
 }
9 9
\ No newline at end of file
Please login to merge, or discard this patch.
src/Core/Endpoints/Endpoint.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,6 +56,6 @@
 block discarded – undo
56 56
         $apiData = $curl->exec($this->getEndpointUrl(), $this->parameters->array());
57 57
 
58 58
 
59
-        return (new CurlResponseHandler())->handle($apiData,  $this->getResponseClassnameByCondition($apiData));
59
+        return (new CurlResponseHandler())->handle($apiData, $this->getResponseClassnameByCondition($apiData));
60 60
     }
61 61
 }
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
src/Core/Objects/SuccessResponse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
     protected function draw(array $result, string $responseClassName): AbstractResponse
48 48
     {
49 49
         $collection = new EntityCollection();
50
-        array_walk($result, function ($item) use ($collection, $responseClassName) {
50
+        array_walk($result, function($item) use ($collection, $responseClassName) {
51 51
             if (!empty($item)) {
52 52
                 $collection->push(ResponseDtoBuilder::make($responseClassName, $item));
53 53
             }
Please login to merge, or discard this patch.