@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | if ((isset($this->attributesDefinitions[$key]) === true) |
57 | 57 | && (in_array($this->attributesDefinitions[$key], $bypassTypes) === false) |
58 | 58 | ) { |
59 | - switch($this->attributesDefinitions[$key]) { |
|
59 | + switch ($this->attributesDefinitions[$key]) { |
|
60 | 60 | case 'bool': |
61 | 61 | case 'boolean': |
62 | 62 | $value = $value ? 1 : 0; |
@@ -98,11 +98,11 @@ discard block |
||
98 | 98 | switch ($this->attributesDefinitions[$key]) { |
99 | 99 | case 'bool': |
100 | 100 | case 'boolean': |
101 | - $value = (bool) $value; |
|
101 | + $value = (bool)$value; |
|
102 | 102 | break; |
103 | 103 | case 'int': |
104 | 104 | case 'integer': |
105 | - $value = (int) $value; |
|
105 | + $value = (int)$value; |
|
106 | 106 | break; |
107 | 107 | case 'array': |
108 | 108 | if (is_array($value) === false) { |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | case 'real': |
120 | 120 | case 'double': |
121 | 121 | case 'float': |
122 | - $value = (float) $value; |
|
122 | + $value = (float)$value; |
|
123 | 123 | break; |
124 | 124 | } |
125 | 125 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | ->where('id = :id', [':id' => $accessTokenKey]) |
70 | 70 | ->one($this->db); |
71 | 71 | if ($entity !== false) { |
72 | - throw new DuplicateKeyException('Duplicate key "' . $accessTokenKey . '"'); |
|
72 | + throw new DuplicateKeyException('Duplicate key "'.$accessTokenKey.'"'); |
|
73 | 73 | } |
74 | 74 | $values = $accessToken->getDirtyAttributes($attributes); |
75 | 75 | $accessTokenParameters = []; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | ->where('id = :id', [':id' => $values[$modelKey]]) |
136 | 136 | ->one($this->db); |
137 | 137 | if ($entity !== false) { |
138 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
138 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
139 | 139 | } |
140 | 140 | } |
141 | 141 | $accessTokenKey = isset($values[$modelKey]) ? $values[$modelKey] : $accessToken->getKey(); |
@@ -78,7 +78,7 @@ |
||
78 | 78 | protected function encodeAttributes(Array $attributes) |
79 | 79 | { |
80 | 80 | $data = Json::encode($attributes); |
81 | - $etag = '"' . rtrim(base64_encode(sha1($data, true)), '=') . '"'; |
|
81 | + $etag = '"'.rtrim(base64_encode(sha1($data, true)), '=').'"'; |
|
82 | 82 | return $etag; |
83 | 83 | } |
84 | 84 |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | ->where('id = :id', [':id' => $refreshTokenKey]) |
74 | 74 | ->one($this->db); |
75 | 75 | if ($entity !== false) { |
76 | - throw new DuplicateKeyException('Duplicate key "' . $refreshTokenKey . '"'); |
|
76 | + throw new DuplicateKeyException('Duplicate key "'.$refreshTokenKey.'"'); |
|
77 | 77 | } |
78 | 78 | $values = $refreshToken->getDirtyAttributes($attributes); |
79 | 79 | $refreshTokenParameters = []; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ->where('id = :id', [':id' => $values[$modelKey]]) |
140 | 140 | ->one($this->db); |
141 | 141 | if ($entity !== false) { |
142 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
142 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | $refreshTokenKey = isset($values[$modelKey]) ? $values[$modelKey] : $refreshToken->getKey(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | ->where('id = :id', [':id' => $jwt->id]) |
67 | 67 | ->one($this->db); |
68 | 68 | if ($entity !== false) { |
69 | - throw new DuplicateKeyException('Duplicate key "' . $jwt->id . '"'); |
|
69 | + throw new DuplicateKeyException('Duplicate key "'.$jwt->id.'"'); |
|
70 | 70 | } |
71 | 71 | $values = $jwt->getDirtyAttributes($attributes); |
72 | 72 | $jwtParameters = []; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ->where('id = :id', [':id' => $values[$modelKey]]) |
121 | 121 | ->one($this->db); |
122 | 122 | if ($entity !== false) { |
123 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
123 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | $jwtKey = isset($values[$modelKey]) ? $values[$modelKey] : $jwt->getKey(); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | ->where('id = :id', [':id' => $clientKey]) |
85 | 85 | ->one($this->db); |
86 | 86 | if ($entity !== false) { |
87 | - throw new DuplicateKeyException('Duplicate key "' . $clientKey . '"'); |
|
87 | + throw new DuplicateKeyException('Duplicate key "'.$clientKey.'"'); |
|
88 | 88 | } |
89 | 89 | $values = $client->getDirtyAttributes($attributes); |
90 | 90 | $clientParameters = []; |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | ->where('id = :id', [':id' => $values[$modelKey]]) |
163 | 163 | ->one($this->db); |
164 | 164 | if ($entity !== false) { |
165 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
165 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
166 | 166 | } |
167 | 167 | } |
168 | 168 | $clientKey = isset($values[$modelKey]) ? $values[$modelKey] : $client->getKey(); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | ->where('id = :id', [':id' => $authCodeKey]) |
72 | 72 | ->one($this->db); |
73 | 73 | if ($entity !== false) { |
74 | - throw new DuplicateKeyException('Duplicate key "' . $authCodeKey . '"'); |
|
74 | + throw new DuplicateKeyException('Duplicate key "'.$authCodeKey.'"'); |
|
75 | 75 | } |
76 | 76 | $values = $authCode->getDirtyAttributes($attributes); |
77 | 77 | $authCodeParameters = []; |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | ->where('id = :id', [':id' => $values[$modelKey]]) |
138 | 138 | ->one($this->db); |
139 | 139 | if ($entity !== false) { |
140 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
140 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 | $authCodeKey = isset($values[$modelKey]) ? $values[$modelKey] : $authCode->getKey(); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | ->where('id = :id', [':id' => $scope->id]) |
73 | 73 | ->one($this->db); |
74 | 74 | if ($entity !== false) { |
75 | - throw new DuplicateKeyException('Duplicate key "' . $scope->id . '"'); |
|
75 | + throw new DuplicateKeyException('Duplicate key "'.$scope->id.'"'); |
|
76 | 76 | } |
77 | 77 | $values = $scope->getDirtyAttributes($attributes); |
78 | 78 | $scopeParameters = []; |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | ->where('id = :id', [':id' => $values[$modelKey]]) |
127 | 127 | ->one($this->db); |
128 | 128 | if ($entity !== false) { |
129 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
129 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
130 | 130 | } |
131 | 131 | } |
132 | 132 | $scopeKey = isset($values[$modelKey]) ? $values[$modelKey] : $scope->getKey(); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | ->where('id = :id', [':id' => $cypherKeyKey]) |
67 | 67 | ->one($this->db); |
68 | 68 | if ($entity !== false) { |
69 | - throw new DuplicateKeyException('Duplicate key "' . $cypherKeyKey . '"'); |
|
69 | + throw new DuplicateKeyException('Duplicate key "'.$cypherKeyKey.'"'); |
|
70 | 70 | } |
71 | 71 | $values = $cypherKey->getDirtyAttributes($attributes); |
72 | 72 | $cypherKeyParameters = []; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ->where('id = :id', [':id' => $values[$modelKey]]) |
121 | 121 | ->one($this->db); |
122 | 122 | if ($entity !== false) { |
123 | - throw new DuplicateKeyException('Duplicate key "' . $values[$modelKey] . '"'); |
|
123 | + throw new DuplicateKeyException('Duplicate key "'.$values[$modelKey].'"'); |
|
124 | 124 | } |
125 | 125 | } |
126 | 126 | $cypherKeyKey = isset($values[$modelKey]) ? $values[$modelKey] : $cypherKey->getKey(); |