Completed
Push — master ( ce0f45...969a46 )
by yuuki
01:36
created

CompileCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
/**
4
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
5
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
6
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
8
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
9
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
10
 * THE SOFTWARE.
11
 *
12
 * This software consists of voluntary contributions made by many individuals
13
 * and is licensed under the MIT license.
14
 *
15
 * Copyright (c) 2015-2017 Yuuki Takezawa
16
 *
17
 */
18
namespace Ytake\LaravelAspect\Console;
19
20
use Illuminate\Console\Command;
21
use Ytake\LaravelAspect\AspectManager;
22
23
/**
24
 * Class ClearCacheCommand
25
 */
26
class CompileCommand extends Command
27
{
28
    /** @var string */
29
    protected $name = 'ytake:aspect-compile';
30
31
    /** @var string */
32
    protected $description = 'compiles all known classes';
33
34
    /** @var AspectManager */
35
    protected $aspectManager;
36
37
    /**
38
     * CompileCommand constructor.
39
     *
40
     * @param AspectManager $aspectManager
41
     */
42
    public function __construct(AspectManager $aspectManager)
43
    {
44
        parent::__construct();
45
        $this->aspectManager = $aspectManager;
46
    }
47
48
    /**
49
     * @return void
50
     */
51
    public function handle()
52
    {
53
        $this->aspectManager->weave();
54
        $this->info('class files compiled!');
55
    }
56
}
57