Skip to content

Commit

Permalink
[TASK] Use error identifiers for @phpstan-ignore-* annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Jul 17, 2024
1 parent 18edfa6 commit ff32227
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Helper/FilesystemHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static function getPackageDirectory(): string

public static function getWorkingDirectory(): string
{
/* @phpstan-ignore-next-line */
/* @phpstan-ignore-next-line function.alreadyNarrowedType */
if (method_exists(Util\Platform::class, 'getCwd')) {
// Composer >= 2.3
$cwd = Util\Platform::getCwd(true);
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Fixtures/InvalidConsoleIO.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function __construct(InputInterface $input, OutputInterface $output, Help
parent::__construct($input, $output, $helperSet);

// Intended invalid property assignment to test the behavior of AccessibleConsoleIO
/* @phpstan-ignore-next-line */
/* @phpstan-ignore-next-line assign.propertyType */
$this->input = null;
}
}
6 changes: 3 additions & 3 deletions tests/src/Helper/ArrayHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function setValueByPathSetsValueAtGivenPath(): void

self::assertSame('hello world!', Src\Helper\ArrayHelper::getValueByPath($subject, 'bar'));
self::assertNull(Src\Helper\ArrayHelper::getValueByPath($subject, 'foobar'));
/* @phpstan-ignore-next-linestaticMethod.impossibleType */
/* @phpstan-ignore-next-line staticMethod.impossibleType */
self::assertSame(
[
'foo' => [
Expand All @@ -107,7 +107,7 @@ public function removeByPathDoesNothingIfGivenPathDoesNotExist(): void

Src\Helper\ArrayHelper::removeByPath($subject, 'foo.hello.world');

/* @phpstan-ignore-next-linestaticMethod.impossibleType */
/* @phpstan-ignore-next-line staticMethod.impossibleType */
self::assertSame(
[
'foo' => [
Expand All @@ -129,7 +129,7 @@ public function removeByPathRemovesGivenPathInSubject(): void

Src\Helper\ArrayHelper::removeByPath($subject, 'foo.bar');

/* @phpstan-ignore-next-linestaticMethod.impossibleType */
/* @phpstan-ignore-next-line staticMethod.impossibleType */
self::assertSame(
[
'foo' => [],
Expand Down

0 comments on commit ff32227

Please sign in to comment.