Completed
Push — master ( 31e3fa...9e9db7 )
by Martijn van
02:34
created

code/Commands/Dev/BuildCommand.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/**
4
 * Class BuildCommand.
5
 */
6
class BuildCommand extends SilverstripeCommand
7
{
8
    /**
9
     * @var string
10
     */
11
    protected $name = 'dev:build';
12
13
    /**
14
     * @var string
15
     */
16
    protected $description = 'Rebuild the database';
17
18
    public function fire()
19
    {
20
        //$this->call('cache:clear');
0 ignored issues
show
Unused Code Comprehensibility introduced by
86% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
21
22
        /** @var DatabaseAdmin $da */
23
        $da = DatabaseAdmin::create();
24
25
        // hack untill we have something better...
26
        ob_start();
27
        $da->doBuild();
28
        $this->info(ob_get_contents());
29
        ob_get_clean();
30
    }
31
}
32