浏览代码

Merge pull request #8377 from TysonAndre/misc-nit

Fix misc phpdoc and strpos arg order nits for suggestions
Jordi Boggiano 5 年之前
父节点
当前提交
f2700bbd98
共有 3 个文件被更改,包括 2 次插入3 次删除
  1. 1 1
      src/Composer/Command/SuggestsCommand.php
  2. 1 1
      src/Composer/Package/BasePackage.php
  3. 0 1
      src/Composer/Util/Zip.php

+ 1 - 1
src/Composer/Command/SuggestsCommand.php

@@ -90,7 +90,7 @@ EOT
                 continue;
             }
             foreach ($package['suggest'] as $suggestion => $reason) {
-                if (false === strpos('/', $suggestion) && null !== $platform->findPackage($suggestion, '*')) {
+                if (preg_match(PlatformRepository::PLATFORM_PACKAGE_REGEX, $suggestion) && null !== $platform->findPackage($suggestion, '*')) {
                     continue;
                 }
                 if (!isset($installed[$suggestion])) {

+ 1 - 1
src/Composer/Package/BasePackage.php

@@ -239,7 +239,7 @@ abstract class BasePackage implements PackageInterface
      * Build a regexp from a package name, expanding * globs as required
      *
      * @param  string $whiteListedPattern
-     * @param  bool $wrap Wrap the cleaned string by the given string
+     * @param  string $wrap Wrap the cleaned string by the given string
      * @return string
      */
     public static function packageNameToRegexp($whiteListedPattern, $wrap = '{^%s$}i')

+ 0 - 1
src/Composer/Util/Zip.php

@@ -21,7 +21,6 @@ class Zip
      * Gets content of the root composer.json inside a ZIP archive.
      *
      * @param string $pathToZip
-     * @param string $filename
      *
      * @return string|null
      */