Skip to content

Commit 7699c1b

Browse files
committed
Update PHPStan
1 parent 56c95d1 commit 7699c1b

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ parameters:
2929
- '#Call to function is_string\(\) with string will always evaluate to true.#'
3030
- '#Call to function is_array\(\) with array(<.*>)? will always evaluate to true.#'
3131
- '#Instanceof between (.*) and (.*) will always evaluate to true.#'
32-
- "#Casting to int something that's already int.#"
3332
- '#should be contravariant with parameter#'
3433
- '#should be covariant with return type#'
3534
- "#Casting to bool something that's already bool.#"

phpstan.tests.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ parameters:
88
- identifier: missingType.iterableValue
99
- '#Access to an undefined property Netgen\\TagsBundle\\API\\Repository\\Values\\Tags\\Tag::\$notDefined.#'
1010
- '#Missing call to parent::setUp\(\) method.#'
11+
- "#Call to static method PHPUnit\\\\Framework\\\\Assert::assertSame\\(\\) with 'some_value' and 'some_value' will always evaluate to true.#"

tests/Core/Event/TagsServiceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,12 +756,12 @@ public function testNewTagUpdateStruct(): void
756756
*/
757757
public function testSudo(): void
758758
{
759-
$callback = static function (): void {};
759+
$callback = static function (): string { return 'some_value'; };
760760

761761
$this->tagsService
762762
->expects(self::once())
763763
->method('sudo')
764-
->willReturn('some_value');
764+
->willReturn($callback());
765765

766766
$eventDispatchingService = $this->getEventDispatchingService();
767767
$value = $eventDispatchingService->sudo($callback);

0 commit comments

Comments
 (0)