Skip to content

Commit aaee424

Browse files
committed
Fix CS
1 parent e85feee commit aaee424

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Annotation/Groups.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ class Groups
3434
public function __construct(array $data)
3535
{
3636
if (!isset($data['value']) || !$data['value']) {
37-
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', \get_class($this)));
37+
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', static::class));
3838
}
3939

4040
$value = (array) $data['value'];
4141
foreach ($value as $group) {
4242
if (!\is_string($group)) {
43-
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a string or an array of strings.', \get_class($this)));
43+
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a string or an array of strings.', static::class));
4444
}
4545
}
4646

Annotation/MaxDepth.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ class MaxDepth
3131
public function __construct(array $data)
3232
{
3333
if (!isset($data['value'])) {
34-
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" should be set.', \get_class($this)));
34+
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" should be set.', static::class));
3535
}
3636

3737
if (!\is_int($data['value']) || $data['value'] <= 0) {
38-
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a positive integer.', \get_class($this)));
38+
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a positive integer.', static::class));
3939
}
4040

4141
$this->maxDepth = $data['value'];

Normalizer/AbstractNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,10 +304,10 @@ protected function instantiateObject(array &$data, $class, array &$context, \Ref
304304
if (\func_num_args() >= 6) {
305305
$format = func_get_arg(5);
306306
} else {
307-
if (__CLASS__ !== \get_class($this)) {
307+
if (__CLASS__ !== static::class) {
308308
$r = new \ReflectionMethod($this, __FUNCTION__);
309309
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
310-
@trigger_error(sprintf('Method %s::%s() will have a 6th `string $format = null` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', \get_class($this), __FUNCTION__), E_USER_DEPRECATED);
310+
@trigger_error(sprintf('Method %s::%s() will have a 6th `string $format = null` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', static::class, __FUNCTION__), E_USER_DEPRECATED);
311311
}
312312
}
313313

Serializer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function supportsNormalization($data, $format = null/*, array $context =
193193
if (\func_num_args() > 2) {
194194
$context = func_get_arg(2);
195195
} else {
196-
if (__CLASS__ !== \get_class($this)) {
196+
if (__CLASS__ !== static::class) {
197197
$r = new \ReflectionMethod($this, __FUNCTION__);
198198
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
199199
@trigger_error(sprintf('The "%s()" method will have a third `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
@@ -214,7 +214,7 @@ public function supportsDenormalization($data, $type, $format = null/*, array $c
214214
if (\func_num_args() > 3) {
215215
$context = func_get_arg(3);
216216
} else {
217-
if (__CLASS__ !== \get_class($this)) {
217+
if (__CLASS__ !== static::class) {
218218
$r = new \ReflectionMethod($this, __FUNCTION__);
219219
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
220220
@trigger_error(sprintf('The "%s()" method will have a fourth `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
@@ -292,7 +292,7 @@ public function supportsEncoding($format/*, array $context = []*/)
292292
if (\func_num_args() > 1) {
293293
$context = func_get_arg(1);
294294
} else {
295-
if (__CLASS__ !== \get_class($this)) {
295+
if (__CLASS__ !== static::class) {
296296
$r = new \ReflectionMethod($this, __FUNCTION__);
297297
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
298298
@trigger_error(sprintf('The "%s()" method will have a second `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);
@@ -313,7 +313,7 @@ public function supportsDecoding($format/*, array $context = []*/)
313313
if (\func_num_args() > 1) {
314314
$context = func_get_arg(1);
315315
} else {
316-
if (__CLASS__ !== \get_class($this)) {
316+
if (__CLASS__ !== static::class) {
317317
$r = new \ReflectionMethod($this, __FUNCTION__);
318318
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
319319
@trigger_error(sprintf('The "%s()" method will have a second `$context = []` argument in version 4.0. Not defining it is deprecated since Symfony 3.3.', __METHOD__), E_USER_DEPRECATED);

0 commit comments

Comments
 (0)