1 | <?php |
||
21 | class AssetPackage |
||
22 | { |
||
23 | protected $_type; |
||
24 | protected $_name; |
||
25 | protected $_hash; |
||
26 | protected $_releases = []; |
||
27 | protected $_saved; |
||
28 | |||
29 | /** |
||
30 | * @var NullIO |
||
31 | */ |
||
32 | protected $_io; |
||
33 | /** |
||
34 | * @var Composer |
||
35 | */ |
||
36 | protected $_composer; |
||
37 | /** |
||
38 | * @var Storage |
||
39 | */ |
||
40 | protected $_storage; |
||
41 | /** |
||
42 | * @var Composer |
||
43 | */ |
||
44 | protected static $_commonComposer; |
||
45 | |||
46 | 1 | public function __construct($type, $name) |
|
57 | |||
58 | 1 | public function checkType($type) |
|
62 | |||
63 | 1 | public function checkName($name) |
|
67 | |||
68 | 1 | public function getFullName() |
|
72 | |||
73 | 1 | public static function buildFullName($type, $name) |
|
77 | |||
78 | public static function splitFullName($full) |
||
85 | |||
86 | public function getType() |
||
90 | |||
91 | public function getName() |
||
95 | |||
96 | public function getHash() |
||
100 | |||
101 | /** |
||
102 | * @return Composer |
||
103 | */ |
||
104 | public static function getCommonComposer() |
||
112 | |||
113 | public function setComposer($value) |
||
117 | |||
118 | /** |
||
119 | * @return Composer |
||
120 | */ |
||
121 | public function getComposer() |
||
129 | |||
130 | public function getIO() |
||
138 | |||
139 | /** |
||
140 | * findOne. |
||
141 | * |
||
142 | * @param string $type |
||
143 | * @param string $name |
||
144 | * @return static|null |
||
145 | */ |
||
146 | public static function findOne($type, $name) |
||
153 | |||
154 | public function load() |
||
160 | |||
161 | public function update() |
||
168 | |||
169 | /** |
||
170 | * @param AssetVcsRepository $repository |
||
171 | * @return array |
||
172 | */ |
||
173 | public function prepareReleases($repository) |
||
204 | |||
205 | public function prepareUid($version) |
||
211 | |||
212 | public function getReleases() |
||
216 | |||
217 | public function getRelease($version) |
||
221 | |||
222 | public function getSaved() |
||
230 | |||
231 | public function getStorage() |
||
239 | } |
||
240 |
This checks looks for assignemnts to variables using the
list(...)
function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$a
and$c
are used. There was no need to assign$b
.Instead, the list call could have been.