Skip to content

Commit

Permalink
Fix CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 4, 2020
1 parent e85feee commit aaee424
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Annotation/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ class Groups
public function __construct(array $data)
{
if (!isset($data['value']) || !$data['value']) {
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', \get_class($this)));
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" cannot be empty.', static::class));
}

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

Expand Down
4 changes: 2 additions & 2 deletions Annotation/MaxDepth.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class MaxDepth
public function __construct(array $data)
{
if (!isset($data['value'])) {
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" should be set.', \get_class($this)));
throw new InvalidArgumentException(sprintf('Parameter of annotation "%s" should be set.', static::class));
}

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

$this->maxDepth = $data['value'];
Expand Down
4 changes: 2 additions & 2 deletions Normalizer/AbstractNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ protected function instantiateObject(array &$data, $class, array &$context, \Ref
if (\func_num_args() >= 6) {
$format = func_get_arg(5);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@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);
@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);
}
}

Expand Down
8 changes: 4 additions & 4 deletions Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function supportsNormalization($data, $format = null/*, array $context =
if (\func_num_args() > 2) {
$context = func_get_arg(2);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@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);
Expand All @@ -214,7 +214,7 @@ public function supportsDenormalization($data, $type, $format = null/*, array $c
if (\func_num_args() > 3) {
$context = func_get_arg(3);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@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);
Expand Down Expand Up @@ -292,7 +292,7 @@ public function supportsEncoding($format/*, array $context = []*/)
if (\func_num_args() > 1) {
$context = func_get_arg(1);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@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);
Expand All @@ -313,7 +313,7 @@ public function supportsDecoding($format/*, array $context = []*/)
if (\func_num_args() > 1) {
$context = func_get_arg(1);
} else {
if (__CLASS__ !== \get_class($this)) {
if (__CLASS__ !== static::class) {
$r = new \ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
@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);
Expand Down

0 comments on commit aaee424

Please sign in to comment.