1
0
Fork 0

Fix phpstan phpdocs issues (#9478)

pull/9508/head
Andrés De la Cruz 2020-11-20 09:28:09 +01:00 committed by GitHub
parent f129c231b1
commit 480a6439fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 31 additions and 10 deletions

View File

@ -1,5 +1,6 @@
parameters:
level: 1
checkClassCaseSensitivity: true # Level 2 rule
excludes_analyse:
- '../tests/Composer/Test/Fixtures/*'
- '../tests/Composer/Test/Autoload/Fixtures/*'
@ -34,3 +35,25 @@ parameters:
rules:
- Composer\PHPStanRules\AnonymousFunctionWithThisRule
# Level 2 rules
- PHPStan\Rules\Cast\EchoRule
- PHPStan\Rules\Cast\InvalidCastRule
- PHPStan\Rules\Cast\InvalidPartOfEncapsedStringRule
- PHPStan\Rules\Cast\PrintRule
- PHPStan\Rules\Functions\IncompatibleDefaultParameterTypeRule
- PHPStan\Rules\Generics\ClassAncestorsRule
- PHPStan\Rules\Generics\ClassTemplateTypeRule
- PHPStan\Rules\Generics\FunctionTemplateTypeRule
- PHPStan\Rules\Generics\FunctionSignatureVarianceRule
- PHPStan\Rules\Generics\InterfaceAncestorsRule
- PHPStan\Rules\Generics\InterfaceTemplateTypeRule
- PHPStan\Rules\Generics\MethodTemplateTypeRule
- PHPStan\Rules\Generics\MethodSignatureVarianceRule
- PHPStan\Rules\Generics\TraitTemplateTypeRule
- PHPStan\Rules\Operators\InvalidBinaryOperationRule
- PHPStan\Rules\Operators\InvalidUnaryOperationRule
- PHPStan\Rules\Operators\InvalidComparisonOperationRule
- PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeRule
- PHPStan\Rules\PhpDoc\IncompatiblePropertyPhpDocTypeRule
- PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule
- PHPStan\Rules\PhpDoc\InvalidPHPStanDocTagRule

View File

@ -400,7 +400,7 @@ TAGSPUBKEY
* @param string $localFilename The composer.phar location
* @param string $newFilename The downloaded or backup phar
* @param string $backupTarget The filename to use for the backup
* @throws \FilesystemException If the file cannot be moved
* @throws FilesystemException If the file cannot be moved
* @return bool Whether the phar is valid and has been moved
*/
protected function setLocalPhar($localFilename, $newFilename, $backupTarget = null)

View File

@ -29,7 +29,7 @@ interface OperationInterface
/**
* Serializes the operation in a human readable format
*
* @param $lock bool Whether this is an operation on the lock file
* @param bool $lock Whether this is an operation on the lock file
* @return string
*/
public function show($lock);

View File

@ -66,7 +66,6 @@ class PackageEvent extends Event
* @param IOInterface $io
* @param bool $devMode
* @param RepositoryInterface $localRepo
* @param Request $request
* @param OperationInterface[] $operations
* @param OperationInterface $operation
*/

View File

@ -599,7 +599,7 @@ class PlatformRepository extends ArrayRepository
/**
* Check if a package name is a platform package.
*
* @param $name
* @param string $name
* @return bool
*/
public static function isPlatformPackage($name)

View File

@ -90,7 +90,6 @@ class Bitbucket
}
/**
* @param string $originUrl
* @return bool
*/
private function requestAccessToken()

View File

@ -152,7 +152,7 @@ class ProxyManager
/**
* Sets initial data
*
* @param string $proxyUrl Proxy url
* @param string $url Proxy url
* @param string $scheme Environment variable scheme
*/
private function setData($url, $scheme)

View File

@ -174,7 +174,7 @@ class NoProxyPattern
* @param int $index
* @param string $hostName
*
* @return {null|stdClass} Null if the hostname is invalid
* @return null|stdClass Null if the hostname is invalid
*/
private function getRule($index, $hostName)
{

View File

@ -1073,7 +1073,7 @@ Linked Version => 1.2.11',
* @param array<string,string|false> $expectations
* @param array<string,mixed> $functions
* @param array<string,mixed> $constants
* @param array<string,class-string> $classes
* @param array<string,class-string> $classDefinitions
*/
public function testLibraryInformation(
$extensions,

View File

@ -514,8 +514,8 @@ class AuthHelperTest extends TestCase
}
/**
* @param $origin
* @param $auth
* @param string $origin
* @param array $auth
*/
private function expectsAuthentication($origin, $auth)
{