CountPublisher::fire()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace SfCod\SocketIoBundle\Tests\Data;
4
5
use SfCod\SocketIoBundle\Events\AbstractEvent;
6
use SfCod\SocketIoBundle\Events\EventInterface;
7
use SfCod\SocketIoBundle\Events\EventPublisherInterface;
8
9
class CountPublisher extends AbstractEvent implements EventInterface, EventPublisherInterface
10
{
11
    /**
12
     * Changel name. For client side this is nsp.
13
     */
14
    public static function broadcastOn(): array
15
    {
16
        return ['notifications'];
17
    }
18
19
    /**
20
     * Event name.
21
     */
22
    public static function name(): string
23
    {
24
        return 'update_notification_count';
25
    }
26
27
    /**
28
     * Emit client event.
29
     */
30
    public function fire(): array
31
    {
32
        return [
33
            'count' => 10,
34
        ];
35
    }
36
}
37