Code Duplication    Length = 12-12 lines in 2 locations

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

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

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
    {