Completed
Push — master ( 8c3306...57acb7 )
by Martijn van
02:51
created

ClearCommand::delTree()   A

Complexity

Conditions 3
Paths 3

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 9
rs 9.6666
cc 3
eloc 5
nc 3
nop 1
1
<?php
2
3
4
class ClearCommand extends SilverstripeCommand
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
5
{
6
    /**
7
     * The console command name.
8
     *
9
     * @var string
10
     */
11
    protected $name = 'cache:clear';
12
13
    /**
14
     * The console command description.
15
     *
16
     * @var string
17
     */
18
    protected $description = 'Clear the cache by deleting the files and rebuild the manifest';
19
20
    public function fire()
21
    {
22
        SS_ClassLoader::instance()->getManifest()->regenerate();
23
        $this->info('regenerated manifest!');
24
25
        ClassInfo::reset_db_cache();
26
        $this->info('resetted db cache!');
27
    }
28
}
29