@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | include_once __DIR__ . '/vendor/autoload.php'; |
| 3 | -if (is_file(__DIR__. '/.env')) { |
|
| 3 | +if (is_file(__DIR__ . '/.env')) { |
|
| 4 | 4 | $dotenv = new Dotenv\Dotenv(__DIR__); |
| 5 | 5 | $dotenv->load(); |
| 6 | 6 | } |
@@ -20,11 +20,11 @@ |
||
| 20 | 20 | |
| 21 | 21 | return [ |
| 22 | 22 | 'default' => [ |
| 23 | - 'host' => 'https://api-eu.clusterpoint.com/v4', |
|
| 24 | - 'account_id' => 'ACCOUNT_ID', |
|
| 25 | - 'username' => 'USERNAME', |
|
| 26 | - 'password' => 'PASSWORD', |
|
| 27 | - 'debug' => false, |
|
| 23 | + 'host' => 'https://api-eu.clusterpoint.com/v4', |
|
| 24 | + 'account_id' => 'ACCOUNT_ID', |
|
| 25 | + 'username' => 'USERNAME', |
|
| 26 | + 'password' => 'PASSWORD', |
|
| 27 | + 'debug' => false, |
|
| 28 | 28 | ], |
| 29 | 29 | 'development' => [ |
| 30 | 30 | 'host' => 'https://api-eu.clusterpoint.com/v4/', |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | private function getUniqueFieldQuery($query, $uniqueFields) |
| 38 | 38 | { |
| 39 | 39 | // @codeCoverageIgnoreStart |
| 40 | - $query->where(function ($query) use ($uniqueFields) { |
|
| 40 | + $query->where(function($query) use ($uniqueFields) { |
|
| 41 | 41 | foreach ($uniqueFields as $fieldName) { |
| 42 | 42 | if (property_exists($this->resource, $fieldName)) { |
| 43 | 43 | $query->orWhere($fieldName, '==', $this->resource->{$fieldName}); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | $this->failOnError($res); |
| 51 | 51 | return $this->toObject($res); |
| 52 | 52 | } catch (\Exception $ex) { |
| 53 | - throw new RestException($ex->getMessage(), ['result'=>empty($res)?null:$res]); |
|
| 53 | + throw new RestException($ex->getMessage(), ['result'=>empty($res) ? null : $res]); |
|
| 54 | 54 | } |
| 55 | 55 | } |
| 56 | 56 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $this->failOnError($res); |
| 62 | 62 | return $this->toObject($res); |
| 63 | 63 | } catch (\Exception $ex) { |
| 64 | - throw new RestException($ex->getMessage(), ['result'=>empty($res)?null:$res]); |
|
| 64 | + throw new RestException($ex->getMessage(), ['result'=>empty($res) ? null : $res]); |
|
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $this->failOnError($res); |
| 73 | 73 | return $this->toObject($res); |
| 74 | 74 | } catch (\Exception $ex) { |
| 75 | - throw new RestException($ex->getMessage(), ['result'=>empty($res)?null:$res]); |
|
| 75 | + throw new RestException($ex->getMessage(), ['result'=>empty($res) ? null : $res]); |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |