fix phpstan level 2 and below issues

This commit is contained in:
Daniel Seifert 2022-07-21 00:33:29 +02:00
parent ff0784ce46
commit c8ca412c14
Signed by: DanielS
GPG Key ID: 6A513E13AEE66170
6 changed files with 9 additions and 8 deletions

View File

@ -86,7 +86,7 @@ abstract class AbstractResponse extends ApiTestCase
*/
protected function checkProperties($expected, $propertyName, $methodName)
{
/** @var Response $response */
/** @var Response|MockObject $responseMock */
$responseMock = $this->getMockBuilder($this->testClassName)
->disableOriginalConstructor()
->onlyMethods(['getContent'])

View File

@ -29,7 +29,7 @@ use ReflectionException;
class SenderTest extends ApiTestCase
{
/** @var Sender */
/** @var Sender|MockObject */
public $sender;
private $phoneNumberFixture;
@ -48,7 +48,6 @@ class SenderTest extends ApiTestCase
$example = $phoneUtil->getExampleNumberForType($this->phoneCountryFixture, PhoneNumberType::MOBILE);
$this->phoneNumberFixture = $phoneUtil->format($example, PhoneNumberFormat::NATIONAL);
/** @var Sender|MockObject sender */
$this->sender = new Sender($this->phoneNumberFixture, $this->phoneCountryFixture);
}

View File

@ -26,11 +26,13 @@ use ReflectionException;
class ValueObjectTest extends ApiTestCase
{
/** @var ValueObject|MockObject */
public $value;
public function setUp(): void
{
parent::setUp();
/** @var ValueObject|MockObject value */
$this->value = $this->getMockBuilder(ValueObject::class)
->disableOriginalConstructor()
->getMock();

View File

@ -2,5 +2,5 @@ parameters:
paths:
- src
- Tests
level: 0
phpVersion: 70300
level: 2
phpVersion: 70300

View File

@ -38,7 +38,7 @@ class LoggerHandler
}
/**
* @param mixed $logger
* @param LoggerInterface $logger
*/
public function setLogger(LoggerInterface $logger)
{

View File

@ -422,7 +422,7 @@ abstract class Request implements RequestInterface
}
/**
* @return bool|null
* @return bool
*/
public function doSendAsFlashSms(): bool
{