Passed
Pull Request — master (#12)
by Thomas
02:09
created

Factory   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 34
ccs 0
cts 16
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getFileName() 0 4 1
A getPath() 0 4 1
A getStub() 0 4 1
1
<?php
2
3
namespace Webfactor\Laravel\Generators\Schemas\Naming;
4
5
use Carbon\Carbon;
6
use Webfactor\Laravel\Generators\Contracts\NamingAbstract;
7
8
class Factory extends NamingAbstract
9
{
10
    /**
11
     * @return string
12
     */
13
    public function getName(): string
14
    {
15
        return ucfirst($this->entity) . 'Factory';
16
    }
17
18
    /**
19
     * @return string
20
     */
21
    public function getFileName(): string
22
    {
23
        return $this->getName() . '.php';
0 ignored issues
show
Bug introduced by
Consider using $this->name. There is an issue with getName() and APC-enabled PHP versions.
Loading history...
24
    }
25
26
    /**
27
     * @return string
28
     */
29
    public function getPath(): string
30
    {
31
        return database_path('factories');
32
    }
33
34
    /**
35
     * @return string
36
     */
37
    public function getStub(): string
38
    {
39
        return __DIR__ . '/../../../stubs/factory.stub';
40
    }
41
}
42