SessionCreated::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
namespace SquareetLabs\LaravelOpenVidu\Events;
4
5
6
/**
7
 * Class SessionCreated
8
 * @package SquareetLabs\LaravelOpenVidu\Events
9
 */
10
class SessionCreated
11
{
12
    /**
13
     * @var string $sessionId
14
     * Session for which the event was triggered
15
     * A string with the session unique identifier
16
     */
17
    public $sessionId;
18
    /**
19
     * @var int $timestamp
20
     * Time when the event was triggered
21
     * UTC milliseconds
22
     */
23
    public $timestamp;
24
    /**
25
     * @var string $event
26
     * Openvidu server webhook event
27
     */
28
    public $event;
29
30
    /**
31
     * Create a new SessionCreated event instance.
32
     * @param  array  $data
33
     */
34
    public function __construct(array $data)
35
    {
36
        $this->sessionId = $data['sessionId'];
37
        $this->timestamp = $data['timestamp'];
38
        $this->event = $data['event'];
39
    }
40
}