@@ -4,5 +4,5 @@ |
||
| 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 |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public static function getInstance(bool $isNeedAuthorization) |
| 45 | 45 | { |
| 46 | - $indexKey = static::class.md5(Credentials::getHost().Credentials::getApiKey().Credentials::getSecret()); |
|
| 46 | + $indexKey = static::class . md5(Credentials::getHost() . Credentials::getApiKey() . Credentials::getSecret()); |
|
| 47 | 47 | if (empty(self::$instance[$indexKey])) { |
| 48 | 48 | self::$instance[$indexKey] = new static(); |
| 49 | 49 | } |
@@ -56,6 +56,6 @@ |
||
| 56 | 56 | $apiData = $curl->exec($this->getEndpointUrl(), $this->parameters->array()); |
| 57 | 57 | |
| 58 | 58 | |
| 59 | - return (new CurlResponseHandler())->build($apiData, $this->getResponseClassnameByCondition($apiData)); |
|
| 59 | + return (new CurlResponseHandler())->build($apiData, $this->getResponseClassnameByCondition($apiData)); |
|
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | \ No newline at end of file |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $entityMethods = get_class_methods($this); |
| 21 | 21 | $params = []; |
| 22 | 22 | |
| 23 | - array_walk($entityMethods, function ($method) use (&$entity, &$params) { |
|
| 23 | + array_walk($entityMethods, function($method) use (&$entity, &$params) { |
|
| 24 | 24 | if (substr($method, 0, 3) == 'get') { |
| 25 | 25 | $entityProperty = lcfirst(substr($method, 3)); |
| 26 | 26 | if (isset($entity->$entityProperty)) { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | $propIndex = array_search($entityProperty, $entity->requiredFields, true); |
| 37 | 37 | |
| 38 | - if($propIndex > -1) { |
|
| 38 | + if ($propIndex > -1) { |
|
| 39 | 39 | unset($entity->requiredFields[$propIndex]); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -47,7 +47,7 @@ |
||
| 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 | $collection->push(ResponseDtoBuilder::make($responseClassName, $item)); |
| 52 | 52 | }); |
| 53 | 53 | |