Skip to content

Commit dbb1318

Browse files
committed
Add PHPStan PHPUnit extension
1 parent c270dbd commit dbb1318

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"require-dev": {
3434
"friendsofphp/php-cs-fixer": "^2.5",
3535
"phpstan/phpstan": "^0.9.1",
36+
"phpstan/phpstan-phpunit": "^0.9.1",
3637
"phpunit/phpunit": "^6.0",
3738
"scrutinizer/ocular": "^1.4",
3839
"symfony/expression-language": "^3.0||^4.0"

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ parameters:
22
ignoreErrors:
33
- '/Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface::/'
44
- '/Calling method \w+ on possibly null value of type Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface|null/'
5+
includes:
6+
- vendor/phpstan/phpstan-phpunit/extension.neon

src/DependencyInjection/Configuration.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Sentry\SentryBundle\EventListener\SentryExceptionListenerInterface;
88
use Sentry\SentryBundle\SentrySymfonyClient;
99
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
10-
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
1110
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1211
use Symfony\Component\Config\Definition\ConfigurationInterface;
1312
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

test/EventListener/ExceptionListenerTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,14 @@ class ExceptionListenerTest extends TestCase
2929
{
3030
private const LISTENER_TEST_PUBLIC_ALIAS = 'sentry.exception_listener.public_alias';
3131

32-
/** @var ContainerBuilder|\PHPUnit_Framework_MockObject_MockObject */
3332
private $containerBuilder;
3433

35-
/** @var \Raven_Client|\PHPUnit_Framework_MockObject_MockObject */
3634
private $mockSentryClient;
3735

38-
/** @var TokenStorageInterface|\PHPUnit_Framework_MockObject_MockObject */
3936
private $mockTokenStorage;
4037

41-
/** @var AuthorizationCheckerInterface|\PHPUnit_Framework_MockObject_MockObject */
4238
private $mockAuthorizationChecker;
4339

44-
/** @var EventDispatcherInterface|\PHPUnit_Framework_MockObject_MockObject */
4540
private $mockEventDispatcher;
4641

4742
public function setUp()
@@ -514,7 +509,7 @@ public function mockCommandProvider()
514509

515510
public function test_that_it_can_replace_client()
516511
{
517-
$replacementClient = $this->createMock('Raven_Client');
512+
$replacementClient = $this->createMock(\Raven_Client::class);
518513

519514
$reportableException = new \Exception();
520515

0 commit comments

Comments
 (0)