Passed
Push — master ( c52d76...a99d60 )
by Iman
09:00 queued 04:52
created

ConsolePrinter::printHeader()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 9.4285
1
<?php
2
3
namespace crocodicstudio\crudbooster\commands;
4
5
use Illuminate\Console\Command;
6
7
class ConsolePrinter
8
{
9
    private $console;
10
11
    /**
12
     * ConsolePrinter constructor.
13
     *
14
     * @param $console
15
     */
16
    public function __construct(Command $console)
17
    {
18
        $this->console = $console;
19
    }
20
21
    function printHeader()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
22
    {
23
        $this->console->info("
24
25
#     ______  ____    __   ______     _____                   __           
26
#    / ____/ / __ \  / /  / / __ \   / /__ )____  ____  _____/ /____  _____
27
#   / /     / /_/ / / /  / / / / /  / /__/ / __ \/ __ \/ ___/ __/ _ \/ ___/
28
#  / /___  / _, _ / /__/ / /_/ /  / /__/ / /_/ / /_/ (__  ) /_/  __/ /    
29
#  \____/ /_/ |_|  \____/_____/  /______/\____/\____/____/\__/\___/_/     
30
#                                                                                                                       
31
			");
32
        $this->console->info('--------- :===: Thanks for choosing CRUDBooster :==: ---------------');
33
        $this->console->info('====================================================================');
34
    }
35
36
37
    function printFooter($success = true)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
38
    {
39
        $this->console->info('--');
40
        $this->console->info('Homepage : http://www.crudbooster.com');
41
        $this->console->info('Github : https://github.com/crocodic-studio/crudbooster');
42
        $this->console->info('Documentation : https://github.com/crocodic-studio/crudbooster/blob/master/docs/en/index.md');
43
        $this->console->info('====================================================================');
44
        if ($success == true) {
45
            $this->console->info('------------------- :===: Completed !! :===: ------------------------');
46
        } else {
47
            $this->console->info('------------------- :===:  Failed !!  :===: ------------------------');
48
        }
49
    }
50
}