1 | <?php |
||
7 | final class Upgrade |
||
8 | { |
||
9 | /** |
||
10 | * @var Build |
||
11 | */ |
||
12 | private $build; |
||
13 | |||
14 | /** |
||
15 | * @var Target |
||
16 | */ |
||
17 | private $target; |
||
18 | |||
19 | /** |
||
20 | * Upgrade constructor. |
||
21 | * |
||
22 | * @param $build |
||
23 | * @param $target |
||
24 | */ |
||
25 | public function __construct(Build $build, Target $target) |
||
30 | |||
31 | /** |
||
32 | * @return Version |
||
|
|||
33 | */ |
||
34 | public function getBuildVersion() |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | public function getBuildFlav() |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getBuildPath() |
||
54 | |||
55 | /** |
||
56 | * @return Version |
||
57 | */ |
||
58 | public function getTargetVersion() |
||
62 | |||
63 | /** |
||
64 | * @return string |
||
65 | */ |
||
66 | public function getTargetFlav() |
||
70 | |||
71 | /** |
||
72 | * @return string |
||
73 | */ |
||
74 | public function getTargetPath() |
||
78 | |||
79 | /** |
||
80 | * Returns possible file name for current context. |
||
81 | * |
||
82 | * @return string |
||
83 | */ |
||
84 | public function asFilename() |
||
88 | |||
89 | /** |
||
90 | * Returns Upgrade string representation. |
||
91 | * |
||
92 | * @return string |
||
93 | */ |
||
94 | public function __toString() |
||
98 | } |
||
99 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.