Code Duplication    Length = 12-12 lines in 2 locations

src/Isolate/LazyObjects/Proxy/Method.php 1 location

@@ 21-32 (lines=12) @@
18
     * @param string $name
19
     * @throws InvalidArgumentException
20
     */
21
    public function __construct($name)
22
    {
23
        if (!is_string($name)) {
24
            throw new InvalidArgumentException("Method name must be a valid string.");
25
        }
26
27
        if (empty($name)) {
28
            throw new InvalidArgumentException("Method name can not be empty.");
29
        }
30
31
        $this->name = $name;
32
    }
33
34
    public function __toString()
35
    {

src/Isolate/LazyObjects/Proxy/Property/Name.php 1 location

@@ 21-32 (lines=12) @@
18
     * @param $name
19
     * @throws InvalidArgumentException
20
     */
21
    public function __construct($name)
22
    {
23
        if (!is_string($name)) {
24
            throw new InvalidArgumentException("Property name must be a valid string.");
25
        }
26
27
        if (empty($name)) {
28
            throw new InvalidArgumentException("Property name can not be empty.");
29
        }
30
31
        $this->name = $name;
32
    }
33
34
    public function __toString()
35
    {