Agent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 8
c 1
b 0
f 0
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A toArray() 0 6 1
1
<?php
2
namespace App\BxConsole\Annotations;
3
4
/**
5
 * @Annotation
6
 * @Target("CLASS")
7
 */
8
class Agent {
9
10
    /** @var integer */
11
    public int $period;
12
13
    /**
14
     * Times of day in HH:MM format
15
     * @var array<string>
16
     */
17
    public array $times = [];
18
19
    public string $interval = '';
20
21
//    /** @var integer */
22
//    public $timeout = 0;
23
//
24
//    /** @var integer $priority */
25
//    public $priority = 100;
26
27
    public function toArray() {
28
29
        return [
30
            'period' => (int) $this->period,
31
            'times' => $this->times,
32
            'interval' => $this->interval,
33
            //'timeout' => $this->timeout,
34
        ];
35
    }
36
}