mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix many PHPStan issues and update baseline
This commit is contained in:
parent
6ed3aeb343
commit
96486d81cb
21 changed files with 252 additions and 361 deletions
|
@ -59,15 +59,15 @@ class RepositoryManagerTest extends TestCase
|
|||
* @param array<string, mixed> $options
|
||||
* @param class-string<\Throwable>|null $exception
|
||||
*/
|
||||
public function testRepoCreation($type, $options, $exception = null)
|
||||
public function testRepoCreation($type, $options, ?string $exception = null)
|
||||
{
|
||||
if ($exception) {
|
||||
if ($exception !== null) {
|
||||
self::expectException($exception);
|
||||
}
|
||||
|
||||
$rm = new RepositoryManager(
|
||||
$this->getMockBuilder('Composer\IO\IOInterface')->getMock(),
|
||||
$config = $this->getMockBuilder('Composer\Config')->setMethods(array('get'))->getMock(),
|
||||
$config = $this->getMockBuilder('Composer\Config')->onlyMethods(array('get'))->getMock(),
|
||||
$this->getMockBuilder('Composer\Util\HttpDownloader')->disableOriginalConstructor()->getMock(),
|
||||
$this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock()
|
||||
);
|
||||
|
@ -119,7 +119,7 @@ class RepositoryManagerTest extends TestCase
|
|||
{
|
||||
$rm = new RepositoryManager(
|
||||
$this->getMockBuilder('Composer\IO\IOInterface')->getMock(),
|
||||
$config = $this->getMockBuilder('Composer\Config')->setMethods(array('get'))->getMock(),
|
||||
$config = $this->getMockBuilder('Composer\Config')->onlyMethods(array('get'))->getMock(),
|
||||
$this->getMockBuilder('Composer\Util\HttpDownloader')->disableOriginalConstructor()->getMock(),
|
||||
$this->getMockBuilder('Composer\EventDispatcher\EventDispatcher')->disableOriginalConstructor()->getMock()
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue