1 | <?php |
||
31 | class UpgradeTask extends AbstractComposerCommandTask |
||
32 | { |
||
33 | /** |
||
34 | * The packages to upgrade. |
||
35 | */ |
||
36 | const SETTING_PACKAGES = 'packages'; |
||
37 | |||
38 | /** |
||
39 | * The home path of tenside. |
||
40 | */ |
||
41 | const SETTING_HOME = 'home'; |
||
42 | |||
43 | /** |
||
44 | * The data directory of tenside. |
||
45 | */ |
||
46 | const SETTING_DATA_DIR = 'data-dir'; |
||
47 | |||
48 | /** |
||
49 | * Retrieve the names of the packages to upgrade or null if none. |
||
50 | * |
||
51 | * @return string[]|null |
||
|
|||
52 | */ |
||
53 | public function getPackages() |
||
57 | |||
58 | /** |
||
59 | * Check if the upgrade is selective or for all packages. |
||
60 | * |
||
61 | * @return bool |
||
62 | */ |
||
63 | public function isSelectiveUpgrade() |
||
67 | |||
68 | /** |
||
69 | * Retrieve the home path of tenside. |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getHome() |
||
77 | |||
78 | /** |
||
79 | * Retrieve the data path of tenside. |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getDataDir() |
||
87 | |||
88 | /** |
||
89 | * Returns 'upgrade'. |
||
90 | * |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | public function getType() |
||
97 | |||
98 | /** |
||
99 | * {@inheritDoc} |
||
100 | */ |
||
101 | protected function prepareCommand() |
||
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | protected function prepareInput() |
||
127 | } |
||
128 |
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.If the return type contains the type array, this check recommends the use of a more specific type like
String[]
orarray<String>
.