Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
[BUILD] Cleanup phpstan errors
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Mar 20, 2019
1 parent fc38fb0 commit 3402fe2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 2 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ parameters:
- vendor-bin/test/vendor/autoload.php

includes:
- vendor-bin/phpstan/vendor/jangregor/phpstan-prophecy/src/extension.neon
- vendor-bin/phpstan/vendor/localheinz/phpstan-rules/rules.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-deprecation-rules/rules.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/extension.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-phpunit/rules.neon
- vendor-bin/phpstan/vendor/phpstan/phpstan-strict-rules/rules.neon

ignoreErrors:
# PHPUnit
- '#Parameter \#1 \$formMapper of method Core23\\FacebookBundle\\Block\\Service\\PageFeedBlockService::buildEditForm\(\) expects Sonata\\AdminBundle\\Form\\FormMapper, PHPUnit\\Framework\\MockObject\\MockObject given.#'

# Symfony DI
- '#Cannot call method scalarNode\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null.#'
2 changes: 2 additions & 0 deletions tests/Block/Service/PageFeedBlockServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Facebook\FacebookApp;
use Facebook\FacebookResponse;
use Facebook\GraphNodes\GraphEdge;
use PHPUnit\Framework\MockObject\MockObject;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\BlockBundle\Block\BlockContext;
use Sonata\BlockBundle\Model\Block;
Expand Down Expand Up @@ -111,6 +112,7 @@ public function testBuildEditForm(): void

$block = new Block();

/** @var MockObject&FormMapper $formMapper */
$formMapper = $this->createMock(FormMapper::class);
$formMapper->expects($this->once())->method('add');

Expand Down
2 changes: 2 additions & 0 deletions vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"require": {
"jangregor/phpstan-prophecy": "^0.3",
"localheinz/phpstan-rules": "^0.7",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpstan/phpstan-strict-rules": "^0.11"
Expand Down

0 comments on commit 3402fe2

Please sign in to comment.