@@ -68,11 +68,17 @@ discard block |
||
| 68 | 68 | return Yii::$app->get('registryFactory'); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | + /** |
|
| 72 | + * @param string $type |
|
| 73 | + */ |
|
| 71 | 74 | public function checkType($type) |
| 72 | 75 | { |
| 73 | 76 | return $type === 'bower' || $type === 'npm'; |
| 74 | 77 | } |
| 75 | 78 | |
| 79 | + /** |
|
| 80 | + * @param string $name |
|
| 81 | + */ |
|
| 76 | 82 | public function checkName($name) |
| 77 | 83 | { |
| 78 | 84 | return strlen($name) > 0; |
@@ -83,6 +89,10 @@ discard block |
||
| 83 | 89 | return static::buildFullName($this->_type, $this->_name); |
| 84 | 90 | } |
| 85 | 91 | |
| 92 | + /** |
|
| 93 | + * @param string $type |
|
| 94 | + * @param string $name |
|
| 95 | + */ |
|
| 86 | 96 | public static function buildNormalName($type, $name) |
| 87 | 97 | { |
| 88 | 98 | return static::buildFullName($type, static::normalizeName($name)); |
@@ -231,6 +241,9 @@ discard block |
||
| 231 | 241 | return $requires; |
| 232 | 242 | } |
| 233 | 243 | |
| 244 | + /** |
|
| 245 | + * @param string $version |
|
| 246 | + */ |
|
| 234 | 247 | public function prepareUid($version) |
| 235 | 248 | { |
| 236 | 249 | $known = $this->getSaved()->getRelease($version); |
@@ -307,7 +320,7 @@ discard block |
||
| 307 | 320 | } |
| 308 | 321 | |
| 309 | 322 | /** |
| 310 | - * @return array |
|
| 323 | + * @return string[] |
|
| 311 | 324 | */ |
| 312 | 325 | public function __sleep() |
| 313 | 326 | { |