Skip to content

Commit 6ada20f

Browse files
authored
chore: fix cs (#4)
1 parent 755284f commit 6ada20f

File tree

165 files changed

+1321
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+1321
-247
lines changed

Attribute/Formatter.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Attribute;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
#[\Attribute(\Attribute::TARGET_PROPERTY)]
816
final class Formatter
917
{
@@ -19,15 +27,15 @@ public function __construct(
1927
string|array $unmarshal = null,
2028
) {
2129
if (null !== $marshal) {
22-
if (!is_callable($marshal)) {
30+
if (!\is_callable($marshal)) {
2331
throw new \InvalidArgumentException(sprintf('Parameter "$marshal" of attribute "%s" must be a valid callable.', self::class));
2432
}
2533

2634
$this->marshalFormatter = \Closure::fromCallable($marshal);
2735
}
2836

2937
if (null !== $unmarshal) {
30-
if (!is_callable($unmarshal)) {
38+
if (!\is_callable($unmarshal)) {
3139
throw new \InvalidArgumentException(sprintf('Parameter "$unmarshal" of attribute "%s" must be a valid callable.', self::class));
3240
}
3341

Attribute/Name.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Attribute;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
#[\Attribute(\Attribute::TARGET_PROPERTY)]
816
final class Name
917
{

Attribute/Warmable.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Attribute;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
#[\Attribute(\Attribute::TARGET_CLASS)]
816
final class Warmable
917
{

Cache/TemplateCacheWarmer.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Cache;
611

712
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
813
use Symfony\Component\Marshaller\Attribute\Warmable;
914
use Symfony\Component\Marshaller\MarshallerInterface;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class TemplateCacheWarmer implements CacheWarmerInterface
1220
{
1321
/**

Cache/WarmableResolver.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Cache;
611

712
use Symfony\Component\Marshaller\Attribute\Warmable;
813

14+
/**
15+
* @author Mathias Arlaud <[email protected]>
16+
*/
917
final class WarmableResolver
1018
{
1119
/**

Context/Context.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context;
611

712
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*
815
* @implements \IteratorAggregate<object>
916
*/
1017
final class Context implements \IteratorAggregate
@@ -18,7 +25,7 @@ public function __construct(object ...$options)
1825
{
1926
$map = [];
2027
foreach ($options as $option) {
21-
$map[get_class($option)] = $option;
28+
$map[$option::class] = $option;
2229
}
2330

2431
$this->optionMap = $map;

Context/Generation/FormatterAttributeContextBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Generation;
611

712
use Symfony\Component\Marshaller\Attribute\Formatter;
813
use Symfony\Component\Marshaller\Context\Context;
914
use Symfony\Component\Marshaller\Context\GenerationContextBuilderInterface;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class FormatterAttributeContextBuilder implements GenerationContextBuilderInterface
1220
{
1321
public function build(string $type, Context $context, array $rawContext): array

Context/Generation/HookContextBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Generation;
611

712
use Symfony\Component\Marshaller\Context\Context;
813
use Symfony\Component\Marshaller\Context\GenerationContextBuilderInterface;
914
use Symfony\Component\Marshaller\Context\Option\HookOption;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class HookContextBuilder implements GenerationContextBuilderInterface
1220
{
1321
public function build(string $type, Context $context, array $rawContext): array

Context/Generation/NameAttributeContextBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Generation;
611

712
use Symfony\Component\Marshaller\Attribute\Name;
813
use Symfony\Component\Marshaller\Context\Context;
914
use Symfony\Component\Marshaller\Context\GenerationContextBuilderInterface;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class NameAttributeContextBuilder implements GenerationContextBuilderInterface
1220
{
1321
public function build(string $type, Context $context, array $rawContext): array

Context/Generation/TypeFormatterContextBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Generation;
611

712
use Symfony\Component\Marshaller\Context\Context;
813
use Symfony\Component\Marshaller\Context\GenerationContextBuilderInterface;
914
use Symfony\Component\Marshaller\Context\Option\TypeFormatterOption;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class TypeFormatterContextBuilder implements GenerationContextBuilderInterface
1220
{
1321
public function build(string $type, Context $context, array $rawContext): array

Context/GenerationContextBuilderInterface.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
interface GenerationContextBuilderInterface
816
{
917
/**

Context/Marshal/JsonEncodeFlagsContextBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Marshal;
611

712
use Symfony\Component\Marshaller\Context\Context;
813
use Symfony\Component\Marshaller\Context\MarshalContextBuilderInterface;
914
use Symfony\Component\Marshaller\Context\Option\JsonEncodeFlagsOption;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class JsonEncodeFlagsContextBuilder implements MarshalContextBuilderInterface
1220
{
1321
public function build(Context $context, array $rawContext): array

Context/Marshal/TypeContextBuilder.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Marshal;
611

712
use Symfony\Component\Marshaller\Context\Context;
813
use Symfony\Component\Marshaller\Context\MarshalContextBuilderInterface;
914
use Symfony\Component\Marshaller\Context\Option\TypeOption;
1015

16+
/**
17+
* @author Mathias Arlaud <[email protected]>
18+
*/
1119
final class TypeContextBuilder implements MarshalContextBuilderInterface
1220
{
1321
public function build(Context $context, array $rawContext): array

Context/MarshalContextBuilderInterface.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
interface MarshalContextBuilderInterface
816
{
917
/**

Context/Option/HookOption.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Option;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
final class HookOption
816
{
917
/**
@@ -19,7 +27,7 @@ public function __construct(array $hooks)
1927
$closures = [];
2028

2129
foreach ($hooks as $hookName => $hook) {
22-
if (!is_callable($hook)) {
30+
if (!\is_callable($hook)) {
2331
throw new \InvalidArgumentException(sprintf('Hook "%s" of attribute "%s" is an invalid callable.', $hookName, self::class));
2432
}
2533

Context/Option/JsonEncodeFlagsOption.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Option;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
final class JsonEncodeFlagsOption
816
{
917
public function __construct(

Context/Option/TypeFormatterOption.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
<?php
22

3-
declare(strict_types=1);
3+
/*
4+
* This file is part of the Symfony package.
5+
* (c) Fabien Potencier <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
49

510
namespace Symfony\Component\Marshaller\Context\Option;
611

12+
/**
13+
* @author Mathias Arlaud <[email protected]>
14+
*/
715
final class TypeFormatterOption
816
{
917
/**
@@ -19,7 +27,7 @@ public function __construct(array $typeFormatters)
1927
$formatters = [];
2028

2129
foreach ($typeFormatters as $typeName => $formatter) {
22-
if (!is_callable($formatter)) {
30+
if (!\is_callable($formatter)) {
2331
throw new \InvalidArgumentException(sprintf('Formatter "%s" of attribute "%s" is an invalid callable.', $typeName, self::class));
2432
}
2533

0 commit comments

Comments
 (0)