1
0
Fork 0

Merge pull request #8377 from TysonAndre/misc-nit

Fix misc phpdoc and strpos arg order nits for suggestions
pull/8390/head
Jordi Boggiano 2019-10-24 11:17:03 +02:00 committed by GitHub
commit f2700bbd98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 3 deletions

View File

@ -90,7 +90,7 @@ EOT
continue; continue;
} }
foreach ($package['suggest'] as $suggestion => $reason) { 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; continue;
} }
if (!isset($installed[$suggestion])) { if (!isset($installed[$suggestion])) {

View File

@ -239,7 +239,7 @@ abstract class BasePackage implements PackageInterface
* Build a regexp from a package name, expanding * globs as required * Build a regexp from a package name, expanding * globs as required
* *
* @param string $whiteListedPattern * @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 * @return string
*/ */
public static function packageNameToRegexp($whiteListedPattern, $wrap = '{^%s$}i') public static function packageNameToRegexp($whiteListedPattern, $wrap = '{^%s$}i')

View File

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