Skip to content

Commit 6d9a233

Browse files
committed
Fix CS
1 parent 3218150 commit 6d9a233

14 files changed

+17
-17
lines changed

Annotation/DiscriminatorMap.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ class DiscriminatorMap
3939
public function __construct(array $data)
4040
{
4141
if (empty($data['typeProperty'])) {
42-
throw new InvalidArgumentException(sprintf('Parameter "typeProperty" of annotation "%s" cannot be empty.', \get_class($this)));
42+
throw new InvalidArgumentException(sprintf('Parameter "typeProperty" of annotation "%s" cannot be empty.', static::class));
4343
}
4444

4545
if (empty($data['mapping'])) {
46-
throw new InvalidArgumentException(sprintf('Parameter "mapping" of annotation "%s" cannot be empty.', \get_class($this)));
46+
throw new InvalidArgumentException(sprintf('Parameter "mapping" of annotation "%s" cannot be empty.', static::class));
4747
}
4848

4949
$this->typeProperty = $data['typeProperty'];

Annotation/SerializedName.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ final class SerializedName
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_string($data['value']) || empty($data['value'])) {
38-
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a non-empty string.', \get_class($this)));
38+
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" must be a non-empty string.', static::class));
3939
}
4040

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

Normalizer/AbstractNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ protected function isCircularReference($object, &$context)
316316
*/
317317
protected function handleCircularReference($object/*, string $format = null, array $context = []*/)
318318
{
319-
if (\func_num_args() < 2 && __CLASS__ !== \get_class($this) && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) {
319+
if (\func_num_args() < 2 && __CLASS__ !== static::class && __CLASS__ !== (new \ReflectionMethod($this, __FUNCTION__))->getDeclaringClass()->getName() && !$this instanceof \PHPUnit\Framework\MockObject\MockObject && !$this instanceof \Prophecy\Prophecy\ProphecySubjectInterface) {
320320
@trigger_error(sprintf('The "%s()" method will have two new "string $format = null" and "array $context = []" arguments in version 5.0, not defining it is deprecated since Symfony 4.2.', __METHOD__), E_USER_DEPRECATED);
321321
}
322322
$format = \func_num_args() > 1 ? func_get_arg(1) : null;
@@ -549,7 +549,7 @@ protected function denormalizeParameter(\ReflectionClass $class, \ReflectionPara
549549
protected function createChildContext(array $parentContext, $attribute/*, ?string $format */): array
550550
{
551551
if (\func_num_args() < 3) {
552-
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', \get_class($this), __FUNCTION__), E_USER_DEPRECATED);
552+
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', static::class, __FUNCTION__), E_USER_DEPRECATED);
553553
}
554554
if (isset($parentContext[self::ATTRIBUTES][$attribute])) {
555555
$parentContext[self::ATTRIBUTES] = $parentContext[self::ATTRIBUTES][$attribute];

Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ protected function createChildContext(array $parentContext, $attribute/*, ?strin
594594
if (\func_num_args() >= 3) {
595595
$format = func_get_arg(2);
596596
} else {
597-
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', \get_class($this), __FUNCTION__), E_USER_DEPRECATED);
597+
@trigger_error(sprintf('Method "%s::%s()" will have a third "?string $format" argument in version 5.0; not defining it is deprecated since Symfony 4.3.', static::class, __FUNCTION__), E_USER_DEPRECATED);
598598
$format = null;
599599
}
600600

Normalizer/ConstraintViolationListNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,6 @@ public function supportsNormalization($data, $format = null)
9393
*/
9494
public function hasCacheableSupportsMethod(): bool
9595
{
96-
return __CLASS__ === \get_class($this);
96+
return __CLASS__ === static::class;
9797
}
9898
}

Normalizer/CustomNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,6 @@ public function supportsDenormalization($data, $type, $format = null)
7373
*/
7474
public function hasCacheableSupportsMethod(): bool
7575
{
76-
return __CLASS__ === \get_class($this);
76+
return __CLASS__ === static::class;
7777
}
7878
}

Normalizer/DataUriNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function supportsDenormalization($data, $type, $format = null)
138138
*/
139139
public function hasCacheableSupportsMethod(): bool
140140
{
141-
return __CLASS__ === \get_class($this);
141+
return __CLASS__ === static::class;
142142
}
143143

144144
/**

Normalizer/DateIntervalNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function supportsNormalization($data, $format = null)
6969
*/
7070
public function hasCacheableSupportsMethod(): bool
7171
{
72-
return __CLASS__ === \get_class($this);
72+
return __CLASS__ === static::class;
7373
}
7474

7575
/**

Normalizer/DateTimeNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function supportsDenormalization($data, $type, $format = null)
129129
*/
130130
public function hasCacheableSupportsMethod(): bool
131131
{
132-
return __CLASS__ === \get_class($this);
132+
return __CLASS__ === static::class;
133133
}
134134

135135
/**

Normalizer/DateTimeZoneNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,6 @@ public function supportsDenormalization($data, $type, $format = null)
7474
*/
7575
public function hasCacheableSupportsMethod(): bool
7676
{
77-
return __CLASS__ === \get_class($this);
77+
return __CLASS__ === static::class;
7878
}
7979
}

0 commit comments

Comments
 (0)