Code Duplication    Length = 14-15 lines in 8 locations

src/Distilleries/Contentful/Commands/Generators/Definitions/BooleanDefinition.php 1 location

@@ 5-19 (lines=15) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class BooleanDefinition extends BaseDefinition
6
{
7
8
    /**
9
     * {@inheritdoc}
10
     */
11
    public function modelGetter()
12
    {
13
        $stubPath = __DIR__ . '/stubs/boolean.stub';
14
        return self::getStub($stubPath, [
15
            'field_camel' => studly_case($this->id()),
16
            'field' => $this->id(),
17
        ]);
18
    }
19
}
20

src/Distilleries/Contentful/Commands/Generators/Definitions/DateDefinition.php 1 location

@@ 5-19 (lines=15) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class DateDefinition extends BaseDefinition
6
{
7
8
    /**
9
     * {@inheritdoc}
10
     */
11
    public function modelGetter()
12
    {
13
        $stubPath = __DIR__ . '/stubs/datetime.stub';
14
        return self::getStub($stubPath, [
15
            'field_camel' => studly_case($this->id()),
16
            'field' => $this->id(),
17
        ]);
18
    }
19
}
20

src/Distilleries/Contentful/Commands/Generators/Definitions/IntegerDefinition.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class IntegerDefinition extends BaseDefinition
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function modelGetter()
11
    {
12
        $stubPath = __DIR__ . '/stubs/integer.stub';
13
        return self::getStub($stubPath, [
14
            'field_camel' => studly_case($this->id()),
15
            'field' => $this->id(),
16
        ]);
17
    }
18
}
19

src/Distilleries/Contentful/Commands/Generators/Definitions/LocationDefinition.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class LocationDefinition extends BaseDefinition
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function modelGetter()
11
    {
12
        $stubPath = __DIR__ . '/stubs/location.stub';
13
        return self::getStub($stubPath, [
14
            'field_camel' => studly_case($this->id()),
15
            'field' => $this->id(),
16
        ]);
17
    }
18
}
19

src/Distilleries/Contentful/Commands/Generators/Definitions/NumberDefinition.php 1 location

@@ 5-19 (lines=15) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class NumberDefinition extends BaseDefinition
6
{
7
8
    /**
9
     * {@inheritdoc}
10
     */
11
    public function modelGetter()
12
    {
13
        $stubPath = __DIR__ . '/stubs/float.stub';
14
        return self::getStub($stubPath, [
15
            'field_camel' => studly_case($this->id()),
16
            'field' => $this->id(),
17
        ]);
18
    }
19
}
20

src/Distilleries/Contentful/Commands/Generators/Definitions/SymbolDefinition.php 1 location

@@ 5-19 (lines=15) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class SymbolDefinition extends BaseDefinition
6
{
7
8
    /**
9
     * {@inheritdoc}
10
     */
11
    public function modelGetter()
12
    {
13
        $stubPath = __DIR__ . '/stubs/string.stub';
14
        return self::getStub($stubPath, [
15
            'field_camel' => studly_case($this->id()),
16
            'field' => $this->id(),
17
        ]);
18
    }
19
}
20

src/Distilleries/Contentful/Commands/Generators/Definitions/TextDefinition.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class TextDefinition extends SymbolDefinition
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function modelGetter()
11
    {
12
        $stubPath = __DIR__ . '/stubs/string.stub';
13
        return self::getStub($stubPath, [
14
            'field_camel' => studly_case($this->id()),
15
            'field' => $this->id(),
16
        ]);
17
    }
18
}
19

src/Distilleries/Contentful/Commands/Generators/Definitions/ObjectDefinition.php 1 location

@@ 5-18 (lines=14) @@
2
3
namespace Distilleries\Contentful\Commands\Generators\Definitions;
4
5
class ObjectDefinition extends BaseDefinition
6
{
7
    /**
8
     * {@inheritdoc}
9
     */
10
    public function modelGetter()
11
    {
12
        $stubPath = __DIR__ . '/stubs/json.stub';
13
        return self::getStub($stubPath, [
14
            'field_camel' => studly_case($this->id()),
15
            'field' => $this->id(),
16
        ]);
17
    }
18
}
19