Completed
Pull Request — master (#89)
by
unknown
02:20
created

StartGreeter   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 54
ccs 0
cts 21
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A onApplicationInit() 0 4 1
A onApplicationReady() 0 12 1
A onApplicationStop() 0 4 1
1
<?php
2
3
namespace eXpansion\Framework\Core\Plugins;
4
5
use eXpansion\Framework\Core\DataProviders\Listener\ListenerInterfaceExpApplication;
6
use eXpansion\Framework\Core\Helpers\ChatNotification;
7
use eXpansion\Framework\Core\Services\Application\AbstractApplication;
8
9
class StartGreeter implements ListenerInterfaceExpApplication
10
{
11
    /**
12
     * @var ChatNotification
13
     */
14
    private $chatNotification;
15
16
    /**
17
     * StartGreeter constructor.
18
     * @param ChatNotification $chatNotification
19
     */
20
    public function __construct(ChatNotification $chatNotification)
21
    {
22
        $this->chatNotification = $chatNotification;
23
    }
24
25
    /**
26
     * called at eXpansion init
27
     *
28
     * @return void
29
     */
30
    public function onApplicationInit()
31
    {
32
33
    }
34
35
    /**
36
     * called when init is done and callbacks are enabled
37
     *
38
     * @return void
39
     */
40
    public function onApplicationReady()
41
    {
42
        $this->chatNotification->sendMessage("");
43
        $this->chatNotification->sendMessage("");
44
        $this->chatNotification->sendMessage('$z$fff$s       -  -   –    –     —     —    –    –   -   -');
45
        $this->chatNotification->sendMessage('$z$s$w$i$fff       e X p a n s i o n ²', null, []);
46
        $this->chatNotification->sendMessage(
47
            '$z$o$000                version$o '.AbstractApplication::EXPANSION_VERSION, null, []);
48
49
        $this->chatNotification->sendMessage('$z$s$fff                 —————————— ');
50
        $this->chatNotification->sendMessage("");
51
    }
52
53
    /**
54
     * called when requesting application stop
55
     *
56
     * @return void
57
     */
58
    public function onApplicationStop()
59
    {
60
61
    }
62
}
63