Code Duplication    Length = 24-24 lines in 2 locations

src/Object/ExceptionObject.php 1 location

@@ 10-33 (lines=24) @@
7
/**
8
 * Class ExceptionObject
9
 */
10
class ExceptionObject extends AbstractExceptionObject
11
{
12
    /**
13
     * ExceptionObject constructor.
14
     *
15
     * @param \Exception $value
16
     */
17
    public function __construct(\Exception $value)
18
    {
19
        parent::__construct($value);
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function unserialize($serialized)
26
    {
27
        $unserialize = \unserialize($serialized);
28
29
        $this->set(
30
            (new \Exception($unserialize['value']['message'], $unserialize['value']['code']))
31
        );
32
    }
33
}
34

src/Object/TypeErrorObject.php 1 location

@@ 10-33 (lines=24) @@
7
/**
8
 * Class TypeErrorObject
9
 */
10
class TypeErrorObject extends AbstractExceptionObject
11
{
12
    /**
13
     * TypeObject constructor.
14
     *
15
     * @param \TypeError $value
16
     */
17
    public function __construct(\TypeError $value)
18
    {
19
        parent::__construct($value);
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function unserialize($serialized)
26
    {
27
        $unserialize = \unserialize($serialized);
28
29
        $this->set(
30
            (new \TypeError($unserialize['value']['message'], $unserialize['value']['code']))
31
        );
32
    }
33
}
34