Code Duplication    Length = 12-13 lines in 2 locations

classes/ClassGenerator.php 2 locations

@@ 194-205 (lines=12) @@
191
     * @param string $name
192
     * @return ClassGenerator
193
     */
194
    public function generateIsset(string $name): ClassGenerator
195
    {
196
        $this->class
197
            ->addMethod(static::camelCase('isset_' . $name))
198
            ->addComment(
199
                '@return bool'
200
            )->setReturnType('bool')
201
            ->setBody(
202
                'return isset($this->__' . $name . '__[0]);'
203
            );
204
        return $this;
205
    }
206
207
    /**
208
     * @param string $name
@@ 459-471 (lines=13) @@
456
     * @param string $name
457
     * @return ClassGenerator
458
     */
459
    public function generateConfigIsset(string $name): ClassGenerator
460
    {
461
        $this->class
462
            ->addMethod(static::camelCase('isset_' . $name))
463
            ->addComment(
464
                '@return bool'
465
            )->setReturnType('bool')
466
            ->setBody(
467
                '// config is immutable' . PHP_EOL .
468
                'return true;'
469
            );
470
        return $this;
471
    }
472
473
    /**
474
     * @param string $name