Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 53-64 (lines=12) @@
50
    /**
51
     * @param string $visibility
52
     */
53
    public function setVisibility($visibility)
54
    {
55
        $visibility = strtolower($visibility);
56
57
        if (!in_array($visibility, array('public', 'private', 'protected'))) {
58
            throw new InvalidArgumentException(sprintf(
59
                '`%s` method visibility is not supported.', $visibility
60
            ));
61
        }
62
63
        $this->visibility = $visibility;
64
    }
65
66
    public function isStatic()
67
    {

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[]