File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
src/Symfony/Component/Serializer/Mapping/Factory Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 21
21
*
22
22
* @author Kévin Dunglas <dunglas@gmail.com>
23
23
*/
24
- class ClassMetadataFactory extends AbstractMetadataFactory
24
+ class ClassMetadataFactory implements ClassMetadataFactoryInterface
25
25
{
26
+ use ClassResolverTrait;
27
+
26
28
/**
27
29
* @var LoaderInterface
28
30
*/
Original file line number Diff line number Diff line change 14
14
use Symfony \Component \Serializer \Exception \InvalidArgumentException ;
15
15
16
16
/**
17
- * Abstract metadata factory .
17
+ * Resolves a class name .
18
18
*
19
19
* @author Kévin Dunglas <dunglas@gmail.com>
20
20
*/
21
- abstract class AbstractMetadataFactory implements ClassMetadataFactoryInterface
21
+ trait ClassResolverTrait
22
22
{
23
23
/**
24
24
* Gets a class name for a given class or instance.
@@ -29,7 +29,7 @@ abstract class AbstractMetadataFactory implements ClassMetadataFactoryInterface
29
29
*
30
30
* @throws InvalidArgumentException If the class does not exists
31
31
*/
32
- protected function getClass ($ value )
32
+ private function getClass ($ value )
33
33
{
34
34
if (is_string ($ value )) {
35
35
if (!class_exists ($ value ) && !interface_exists ($ value )) {
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
-
4
3
/*
5
4
* This file is part of the Symfony package.
6
5
*
11
10
*/
12
11
13
12
namespace Symfony \Component \Serializer \Mapping \Factory ;
13
+
14
14
use Psr \Cache \CacheItemPoolInterface ;
15
15
16
16
/**
17
17
* Caches metadata using a PSR-6 implementation.
18
18
*
19
19
* @author Kévin Dunglas <dunglas@gmail.com>
20
20
*/
21
- class Psr6CacheDecorator extends AbstractMetadataFactory
21
+ class Psr6CacheDecorator implements ClassMetadataFactoryInterface
22
22
{
23
+ use ClassResolverTrait;
24
+
23
25
/**
24
26
* @var ClassMetadataFactoryInterface
25
27
*/
You can’t perform that action at this time.
0 commit comments