Test Failed
Branch feature/upgrade-code-quality (805160)
by Csaba
01:56
created
src/Database/Clusterpoint/RestObject.php 1 patch
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
         if ((int)$res->hits() > 0) {
27 27
             $results = json_decode($res->rawResponse())->results;
28 28
             $message = $results[0]->{$this->primaryKey} === $this->getPrimaryKeyValue() ?
29
-                'Primary key collision' :
30
-                'Unique constraint violation';
29
+                'Primary key collision' : 'Unique constraint violation';
31 30
             throw new RestException(
32 31
                 $message,
33 32
                 ['resourceName' => $this->resourceName, 'confilct' => $results[0]]
@@ -45,7 +44,7 @@  discard block
 block discarded – undo
45 44
             $query->where($this->primaryKey, '!=', $this->getPrimaryKeyValue());
46 45
         }
47 46
         // @codeCoverageIgnoreStart
48
-        $query->where(function ($query) use ($uniqueFields) {
47
+        $query->where(function($query) use ($uniqueFields) {
49 48
             foreach ($uniqueFields as $fieldName) {
50 49
                 if (property_exists($this->resource, $fieldName)) {
51 50
                     $query->orWhere($fieldName, '==', $this->resource->{$fieldName});
@@ -66,7 +65,7 @@  discard block
 block discarded – undo
66 65
 
67 66
     public function query()
68 67
     {
69
-        $query = $this->getClient()->database($this->getDatabaseName().'.'.$this->resourceName);
68
+        $query = $this->getClient()->database($this->getDatabaseName() . '.' . $this->resourceName);
70 69
         return $query;
71 70
     }
72 71
 }
Please login to merge, or discard this patch.