Passed
Push — master ( 844081...2958af )
by JHONATAN
02:19
created

src/Metadata/ClassMetadata.php (1 issue)

1
<?php
2
3
namespace Vox\Metadata;
4
5
use Metadata\MergeableClassMetadata;
6
7
class ClassMetadata extends MergeableClassMetadata
8
{
9
    use AnnotationsTrait;
10
    
11
    public function serialize()
12
    {
13
        return serialize(array(
14
            $this->name,
15
            $this->methodMetadata,
16
            $this->propertyMetadata,
17
            $this->fileResources,
18
            $this->createdAt,
19
            $this->annotations,
20
        ));
21
    }
22
23 View Code Duplication
    public function unserialize($str)
0 ignored issues
show
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
24
    {
25
        list(
26
            $this->name,
27
            $this->methodMetadata,
28
            $this->propertyMetadata,
29
            $this->fileResources,
30
            $this->createdAt,
31
            $this->annotations
32
        ) = unserialize($str);
33
34
        $this->reflection = new \ReflectionClass($this->name);
35
    }
36
}
37