@@ -6,7 +6,7 @@ |
||
| 6 | 6 | { |
| 7 | 7 | public function __construct($response) |
| 8 | 8 | { |
| 9 | - $message = 'Object could not be created ' . $response; |
|
| 9 | + $message = 'Object could not be created '.$response; |
|
| 10 | 10 | parent::__construct($message); |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | \ No newline at end of file |
@@ -89,8 +89,8 @@ |
||
| 89 | 89 | |
| 90 | 90 | if ($this->checkFields) { |
| 91 | 91 | return |
| 92 | - in_array(str_singular($field) . '_id', $this->getFields(), false) |
|
| 93 | - || in_array(str_singular($field) . '_ids', $this->getFields(), false) |
|
| 92 | + in_array(str_singular($field).'_id', $this->getFields(), false) |
|
| 93 | + || in_array(str_singular($field).'_ids', $this->getFields(), false) |
|
| 94 | 94 | || in_array($field, $this->getFields(), false) |
| 95 | 95 | || in_array($field, $this->getHidden(), false); |
| 96 | 96 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | if ($parameters) { |
| 29 | - $path .= '?' . http_build_query($parameters); |
|
| 29 | + $path .= '?'.http_build_query($parameters); |
|
| 30 | 30 | } |
| 31 | 31 | return $this->getClient()->request('get', $path); |
| 32 | 32 | } |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | public function load(array $parameters = NULL) |
| 43 | 43 | { |
| 44 | 44 | $parameters = $parameters ?? ['id' => $this->getAttribute('id')]; |
| 45 | - $path = $this->processPath($this->getLoadPath() ?? $this->getResourceName() . '/' . $this->getAttribute('id')); |
|
| 45 | + $path = $this->processPath($this->getLoadPath() ?? $this->getResourceName().'/'.$this->getAttribute('id')); |
|
| 46 | 46 | $this->setValues($this->getRequest($path, $parameters)); |
| 47 | 47 | return $this; |
| 48 | 48 | } |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | if ($this->getAttribute('id') === NULL) { |
| 21 | 21 | throw new IdMissing($this); |
| 22 | 22 | } |
| 23 | - $path = $this->getSavePath() ?? $this->getResourceName() . '/' . $this->getAttribute('id'); |
|
| 23 | + $path = $this->getSavePath() ?? $this->getResourceName().'/'.$this->getAttribute('id'); |
|
| 24 | 24 | $this->setValues($this->postRequest($path)); |
| 25 | 25 | return $this; |
| 26 | 26 | } |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | $this->setCount($items->count); |
| 125 | 125 | $this->setNextPage(); |
| 126 | 126 | |
| 127 | - foreach ((array)$items->data as $item) { |
|
| 127 | + foreach ((array) $items->data as $item) { |
|
| 128 | 128 | $list[] = new $this($item, $this->getClient()); |
| 129 | 129 | } |
| 130 | 130 | |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | { |
| 10 | 10 | foreach ($tokens as $token => $value) { |
| 11 | 11 | $subject = str_replace( |
| 12 | - $prefix . $token, |
|
| 12 | + $prefix.$token, |
|
| 13 | 13 | $value, |
| 14 | 14 | $subject); |
| 15 | 15 | } |
@@ -23,12 +23,12 @@ discard block |
||
| 23 | 23 | function checkrEntityClassName($name) |
| 24 | 24 | { |
| 25 | 25 | $namespace = '\Lyal\Checkr\Entities'; |
| 26 | - if (class_exists($namespace . '\Resources\\' . resourceNameFormat($name))) { |
|
| 27 | - return $namespace . '\Resources\\' . resourceNameFormat($name); |
|
| 26 | + if (class_exists($namespace.'\Resources\\'.resourceNameFormat($name))) { |
|
| 27 | + return $namespace.'\Resources\\'.resourceNameFormat($name); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if (class_exists($namespace . '\Screenings\\' . resourceNameFormat($name))) { |
|
| 31 | - return $namespace . '\Screenings\\' . resourceNameFormat($name); |
|
| 30 | + if (class_exists($namespace.'\Screenings\\'.resourceNameFormat($name))) { |
|
| 31 | + return $namespace.'\Screenings\\'.resourceNameFormat($name); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | return false; |
@@ -209,11 +209,11 @@ |
||
| 209 | 209 | { |
| 210 | 210 | $body = ''; |
| 211 | 211 | $options = array_merge($this->getOptions(), $options); |
| 212 | - $options['auth'] = [$this->getKey() . ':', '']; |
|
| 212 | + $options['auth'] = [$this->getKey().':', '']; |
|
| 213 | 213 | try { |
| 214 | - $response = $this->getHttpClient()->request($method, $this->getApiEndPoint() . $path, $options); |
|
| 214 | + $response = $this->getHttpClient()->request($method, $this->getApiEndPoint().$path, $options); |
|
| 215 | 215 | $this->setLastResponse($response); |
| 216 | - $body = json_decode((string)$response->getBody()); |
|
| 216 | + $body = json_decode((string) $response->getBody()); |
|
| 217 | 217 | |
| 218 | 218 | } catch (BadResponseException $exception) { |
| 219 | 219 | $this->handleError($exception); |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | |
| 22 | 22 | public function getDeletePath() |
| 23 | 23 | { |
| 24 | - return $this->deletePath ?? $this->getResourceName() . '/' . $this->getAttribute('id'); |
|
| 24 | + return $this->deletePath ?? $this->getResourceName().'/'.$this->getAttribute('id'); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function setDeletePath($path) |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | public function setPreviousObject(AbstractEntity $object) |
| 49 | 49 | { |
| 50 | - $objectId = strtolower((new \ReflectionClass($object))->getShortName()) . '_id'; |
|
| 50 | + $objectId = strtolower((new \ReflectionClass($object))->getShortName()).'_id'; |
|
| 51 | 51 | if (null !== $object->getAttribute('id') && $this->checkField($objectId)) { |
| 52 | 52 | $this->setAttribute($objectId, $object->getAttribute('id')); |
| 53 | 53 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | return; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - foreach ((array)$values as $key => $value) { |
|
| 74 | + foreach ((array) $values as $key => $value) { |
|
| 75 | 75 | if (isset($value->object)) { |
| 76 | 76 | $className = checkrEntityClassName($value->object); |
| 77 | 77 | $value = new $className($value, $this->getClient()); |