@@ -39,6 +39,9 @@ discard block |
||
39 | 39 | return strtolower(static::normalizeScopedName($name)); |
40 | 40 | } |
41 | 41 | |
42 | + /** |
|
43 | + * @return string |
|
44 | + */ |
|
42 | 45 | public static function normalizeScopedName($name) |
43 | 46 | { |
44 | 47 | return preg_replace("#@(.+?)/#", '${1}--', $name); |
@@ -73,11 +76,17 @@ discard block |
||
73 | 76 | return Yii::$app->get('registryFactory'); |
74 | 77 | } |
75 | 78 | |
79 | + /** |
|
80 | + * @param string $type |
|
81 | + */ |
|
76 | 82 | public function checkType($type) |
77 | 83 | { |
78 | 84 | return $type === 'bower' || $type === 'npm'; |
79 | 85 | } |
80 | 86 | |
87 | + /** |
|
88 | + * @param string $name |
|
89 | + */ |
|
81 | 90 | public function checkName($name) |
82 | 91 | { |
83 | 92 | return strlen($name) > 0; |
@@ -88,6 +97,10 @@ discard block |
||
88 | 97 | return static::buildFullName($this->_type, $this->_name); |
89 | 98 | } |
90 | 99 | |
100 | + /** |
|
101 | + * @param string $type |
|
102 | + * @param string $name |
|
103 | + */ |
|
91 | 104 | public static function buildNormalName($type, $name) |
92 | 105 | { |
93 | 106 | return static::buildFullName($type, static::normalizeName($name)); |
@@ -238,6 +251,9 @@ discard block |
||
238 | 251 | return $requires; |
239 | 252 | } |
240 | 253 | |
254 | + /** |
|
255 | + * @param string $version |
|
256 | + */ |
|
241 | 257 | public function prepareUid($version) |
242 | 258 | { |
243 | 259 | $known = $this->getSaved()->getRelease($version); |
@@ -314,7 +330,7 @@ discard block |
||
314 | 330 | } |
315 | 331 | |
316 | 332 | /** |
317 | - * @return array |
|
333 | + * @return string[] |
|
318 | 334 | */ |
319 | 335 | public function __sleep() |
320 | 336 | { |