GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — 3.x ( 48a2e9...c23789 )
by Jindřich
20s queued 11s
created

RequestPostEvent::getResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types = 1);
3
4
namespace Skaut\Skautis\Wsdl\Event;
5
6
use Serializable;
7
use stdClass;
8
9
class RequestPostEvent implements Serializable
10
{
11
12
    /**
13
     * @var string Nazev funkce volane pomoci SOAP requestu
14
     */
15
    private $fname;
16
17
    /**
18
     * Parametry SOAP requestu na server
19
     *
20
     * @var array<int, mixed>
21
     */
22
    private $args;
23
24
25
    /**
26
     * @var float Pocet sekund trvani pozadvku
27
     */
28
    private $time;
29
30
	  /**
31
     * @var array|stdClass[]
32
     */
33
    private $result;
34
35
    /**
36
     * @param string $fname Nazev volane funkce
37
     * @param array<int, mixed> $args  Argumenty pozadavku
38
     * @param array|StdClass[] $result
39
     */
40 1
    public function __construct(
41
      string $fname,
42
      array $args,
43
      $result,
44
      float $duration
45
    ) {
46 1
        $this->fname = $fname;
47 1
        $this->args = $args;
48 1
        $this->result = $result;
49 1
        $this->time = $duration;
50 1
    }
51
52 1
    public function serialize(): string
53
    {
54
        $data = [
55 1
            'fname' => $this->fname,
56 1
            'args' => $this->args,
57 1
            'time' => $this->time,
58 1
            'result' => $this->result,
59
        ];
60 1
        return serialize($data);
61
    }
62
63
    /**
64
     * @param string $data
65
     */
66 1
    public function unserialize($data): void
67
    {
68 1
        $data = unserialize($data, ['allowed_classes' => [self::class, stdClass::class]]);
69 1
        $this->fname = (string) $data['fname'];
70 1
        $this->args = (array) $data['args'];
71 1
        $this->time = (float) $data['time'];
72 1
        $this->result = (array) $data['result'];
73 1
    }
74
75 1
    public function getFname(): string
76
    {
77 1
      return $this->fname;
78
    }
79
80
    /**
81
     * @return array<int, mixed>
0 ignored issues
show
Documentation introduced by
The doc-type array<int, could not be parsed: Expected ">" at position 5, but found "end of type". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
82
     */
83 1
    public function getArgs(): array
84
    {
85 1
      return $this->args;
86
    }
87
88
    /**
89
     * Pocet sekund trvani pozadvku
90
     */
91 1
    public function getDuration(): float
92
    {
93 1
      return $this->time;
94
    }
95
96
    /**
97
     * @return array|StdClass[]
98
     */
99 1
    public function getResult(): array
100
    {
101 1
      return $this->result;
102
    }
103
104
}
105