@@ -10,11 +10,11 @@ |
||
10 | 10 | use yii\base\Model; |
11 | 11 | use yii\data\DataProviderInterface; |
12 | 12 | use yii\data\Pagination; |
13 | +use yii\helpers\Inflector; |
|
13 | 14 | use yii\web\Link; |
14 | 15 | use yii\web\Linkable; |
15 | 16 | use yii\web\Request; |
16 | 17 | use yii\web\Response; |
17 | -use yii\helpers\Inflector; |
|
18 | 18 | |
19 | 19 | class Serializer extends Component |
20 | 20 | { |
@@ -166,10 +166,10 @@ |
||
166 | 166 | { |
167 | 167 | $result = []; |
168 | 168 | foreach (['id', 'type'] as $key) { |
169 | - $getter = 'get' . ucfirst($key); |
|
169 | + $getter = 'get'.ucfirst($key); |
|
170 | 170 | $value = $identifier->$getter(); |
171 | 171 | if ($value === null || is_array($value) || (is_object($value) && !method_exists($value, '__toString'))) { |
172 | - throw new InvalidValueException("The value {$key} of resource object " . get_class($identifier) . ' MUST be a string.'); |
|
172 | + throw new InvalidValueException("The value {$key} of resource object ".get_class($identifier).' MUST be a string.'); |
|
173 | 173 | } |
174 | 174 | if ($key === 'type' && $this->pluralize) { |
175 | 175 | $value = Inflector::pluralize($value); |