Completed
Pull Request — master (#94)
by Alessandro
04:33
created

SharkPrinter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 3
dl 0
loc 34
ccs 20
cts 20
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribedEvents() 0 6 1
B onEngineBeforeStart() 0 24 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Paraunit\Printer;
5
6
use Paraunit\Bin\Paraunit;
7
use Paraunit\Lifecycle\EngineEvent;
8
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
9
10
/**
11
 * Class SharkPrinter
12
 * @package Paraunit\Printer
13
 */
14
class SharkPrinter extends AbstractPrinter implements EventSubscriberInterface
15
{
16 56
    public static function getSubscribedEvents(): array
17
    {
18
        return [
19 56
            EngineEvent::BEFORE_START => ['onEngineBeforeStart', 1000],
20
        ];
21
    }
22
23 15
    public function onEngineBeforeStart()
24
    {
25 15
        $output = $this->getOutput();
26
27 15
        $output->writeln('                                                   B>                           ');
28 15
        $output->writeln('                                                   B "Bp                        ');
29 15
        $output->writeln('.pp..                                              B    9p                      ');
30 15
        $output->writeln(' "9BBBBBBpp.                                       B      9p                    ');
31 15
        $output->writeln('    " ""9BBBBBBpp                          .<eeP"B B      .B b                  ');
32 15
        $output->writeln('           "SANDROBpp              .     B B     B B      )B B                  ');
33 15
        $output->writeln('              "BFRABBBB>  .<pe6P\B B     B B     B B      $  B     .e           ');
34 15
        $output->writeln('                 5NICOBBB B     ·B B     B B     B Bqp.  :B  B     $ 4BBpp      ');
35 15
        $output->writeln('                   BMIKIB B        B     B B     B B   "^Bp  B    ) |BBB"\BBpp. ');
36 15
        $output->writeln('                 .BALEBBB """9q.   B"""""B B"""""B B      1p B""""9p BBBBbBBBBBBB');
37 15
        $output->writeln('               <BLUCABBBB B    "B  B     B B     B B       B B     9 9BBB< ^P"  ');
38 15
        $output->writeln('            .6BSERGIOBBBB B666666B B     B B     B B       9 P      7 9BBBBP    ');
39
40 15
        $output->writeln('');
41 15
        $output->writeln(
42
            'PARAUNIT v' .
43 15
            Paraunit::getVersion() .
44 15
            ' - by Francesco Panina, Alessandro Lai & Shark Dev Team @ Facile.it'
45
        );
46
    }
47
}
48