Code Duplication    Length = 12-12 lines in 2 locations

src/Prophecy/Doubler/Generator/Node/ClassNode.php 1 location

@@ 82-93 (lines=12) @@
79
        return $this->properties;
80
    }
81
82
    public function addProperty($name, $visibility = 'public')
83
    {
84
        $visibility = strtolower($visibility);
85
86
        if (!in_array($visibility, array('public', 'private', 'protected'))) {
87
            throw new InvalidArgumentException(sprintf(
88
                '`%s` property visibility is not supported.', $visibility
89
            ));
90
        }
91
92
        $this->properties[$name] = $visibility;
93
    }
94
95
    /**
96
     * @return MethodNode[]

src/Prophecy/Doubler/Generator/Node/MethodNode.php 1 location

@@ 61-72 (lines=12) @@
58
    /**
59
     * @param string $visibility
60
     */
61
    public function setVisibility($visibility)
62
    {
63
        $visibility = strtolower($visibility);
64
65
        if (!in_array($visibility, array('public', 'private', 'protected'))) {
66
            throw new InvalidArgumentException(sprintf(
67
                '`%s` method visibility is not supported.', $visibility
68
            ));
69
        }
70
71
        $this->visibility = $visibility;
72
    }
73
74
    public function isStatic()
75
    {