1 | <?php declare(strict_types=1); |
||
10 | final class CommitCommand |
||
11 | { |
||
12 | /** @var string */ |
||
13 | private $repository; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $message; |
||
17 | |||
18 | /** @var string */ |
||
19 | private $tree; |
||
20 | |||
21 | /** @var string[]|null */ |
||
22 | private $commit; |
||
23 | |||
24 | /** |
||
25 | * @param string $repository |
||
26 | * @param string $message |
||
27 | * @param string $tree |
||
28 | * @param string[]|null $commit |
||
29 | */ |
||
30 | public function __construct(string $repository, string $message, string $tree, ?string ...$commit) |
||
37 | |||
38 | /** |
||
39 | * @return string |
||
40 | */ |
||
41 | public function getRepository(): string |
||
45 | |||
46 | /** |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getMessage(): string |
||
53 | |||
54 | /** |
||
55 | * @return string |
||
56 | */ |
||
57 | public function getTree(): string |
||
61 | |||
62 | /** |
||
63 | * @return string[]|null |
||
64 | */ |
||
65 | public function getCommit(): ?array |
||
69 | } |
||
70 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..