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

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