Completed
Push — master ( adc131...6e9eb4 )
by Kevin
03:32
created

DBFakerCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A execute() 0 4 1
A configure() 0 6 1
1
<?php
2
namespace DBFaker;
3
4
5
use DBFaker\Generators\GeneratorFactory;
0 ignored issues
show
Bug introduced by
The type DBFaker\Generators\GeneratorFactory was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Doctrine\DBAL\Connection;
7
use Mouf\Database\SchemaAnalyzer\SchemaAnalyzer;
0 ignored issues
show
Bug introduced by
The type Mouf\Database\SchemaAnalyzer\SchemaAnalyzer was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Symfony\Component\Console\Command\Command;
9
use Symfony\Component\Console\Input\InputInterface;
10
use Symfony\Component\Console\Output\OutputInterface;
11
12
class DBFakerCommand extends Command
13
{
14
15
    /**
16
     * @var DBFaker
17
     */
18
    private $dbFaker;
19
20
    /**
21
     * DBFaker constructor.
22
     * @param DBFaker $faker
23
     */
24
    public function __construct(DBFaker $faker)
25
    {
26
        parent::__construct();
27
        $this->dbFaker = $faker;
28
    }
29
30
    protected function configure()
31
    {
32
        $this
33
            ->setName('dbfaker:fake-data')
34
            ->setDescription('Generates fake data related to database\'s structure and populates the database')
35
            ->setHelp('This command allows you to create a user...');
36
    }
37
38
    protected function execute(InputInterface $input, OutputInterface $output)
39
    {
40
        //TODO : how to pass output for detailed logging ?
41
        $this->dbFaker->fakeDB();
42
    }
43
}