Callback   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 10
dl 0
loc 29
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getFunction() 0 3 1
A getPriority() 0 3 1
A getParameters() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Everlution\AjaxcomBundle\DataObject;
6
7
/**
8
 * Class Callback.
9
 *
10
 * @author Ivan Barlog <[email protected]>
11
 */
12
class Callback
13
{
14
    /** @var string */
15
    private $function;
16
    /** @var array */
17
    private $parameters;
18
    /** @var int */
19
    private $priority;
20
21
    public function __construct(string $function, array $parameters = [], int $priority = 0)
22
    {
23
        $this->function = $function;
24
        $this->parameters = $parameters;
25
        $this->priority = $priority;
26
    }
27
28
    public function getFunction(): string
29
    {
30
        return $this->function;
31
    }
32
33
    public function getParameters(): array
34
    {
35
        return $this->parameters;
36
    }
37
38
    public function getPriority(): int
39
    {
40
        return $this->priority;
41
    }
42
}
43