Skip to content

Commit

Permalink
Drop Psalm (#129)
Browse files Browse the repository at this point in the history
As per our decision during the Hackathon
  • Loading branch information
greg0ire authored Dec 2, 2024
1 parent 1204767 commit e0abe83
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 90 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@
/phpcs.xml.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
4 changes: 1 addition & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
- composer.*
- src/**
- phpstan*
- psalm*
- tests/**
push:
branches:
Expand All @@ -20,10 +19,9 @@ on:
- composer.*
- src/**
- phpstan*
- psalm*
- tests/**

jobs:
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/static-analysis[email protected]"
uses: "doctrine/.github/.github/workflows/phpstan[email protected]"
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
"require-dev": {
"doctrine/coding-standard": "^12",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.5",
"psalm/plugin-phpunit": "^0.18.3",
"vimeo/psalm": "^5.21"
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand Down
73 changes: 0 additions & 73 deletions psalm.xml

This file was deleted.

6 changes: 3 additions & 3 deletions src/AbstractLexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getInputUntilPosition(int $position)
*
* @return bool
*
* @psalm-assert-if-true !=null $this->lookahead
* @phpstan-assert-if-true !=null $this->lookahead
*/
public function isNextToken(int|string|UnitEnum $type)
{
Expand All @@ -152,7 +152,7 @@ public function isNextToken(int|string|UnitEnum $type)
*
* @return bool
*
* @psalm-assert-if-true !=null $this->lookahead
* @phpstan-assert-if-true !=null $this->lookahead
*/
public function isNextTokenAny(array $types)
{
Expand All @@ -164,7 +164,7 @@ public function isNextTokenAny(array $types)
*
* @return bool
*
* @psalm-assert-if-true !null $this->lookahead
* @phpstan-assert-if-true !null $this->lookahead
*/
public function moveNext()
{
Expand Down
14 changes: 7 additions & 7 deletions tests/AbstractLexerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function tearDown(): void
setlocale(LC_ALL, null);
}

/** @psalm-return list<array{string, list<Token<string, string|int>>}> */
/** @phpstan-return list<array{string, list<Token<string, string|int>>}> */
public static function dataProvider(): array
{
return [
Expand Down Expand Up @@ -83,7 +83,7 @@ public function testResetPosition(): void
$this->assertEquals($expectedTokens[0], $this->concreteLexer->lookahead);
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testMoveNext(string $input, array $expectedTokens): void
{
Expand Down Expand Up @@ -124,7 +124,7 @@ public function testUtf8Mismatch(): void
);
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testPeek(string $input, array $expectedTokens): void
{
Expand All @@ -141,7 +141,7 @@ public function testPeek(string $input, array $expectedTokens): void
$this->assertNull($this->concreteLexer->peek());
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testGlimpse(string $input, array $expectedTokens): void
{
Expand All @@ -161,7 +161,7 @@ public function testGlimpse(string $input, array $expectedTokens): void
$this->assertNull($this->concreteLexer->peek());
}

/** @psalm-return list<array{string, int, string}> */
/** @phpstan-return list<array{string, int, string}> */
public static function inputUntilPositionDataProvider(): array
{
return [
Expand All @@ -180,7 +180,7 @@ public function testGetInputUntilPosition(
$this->assertSame($expectedInput, $this->concreteLexer->getInputUntilPosition($position));
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testIsNextToken(string $input, array $expectedTokens): void
{
Expand All @@ -194,7 +194,7 @@ public function testIsNextToken(string $input, array $expectedTokens): void
}
}

/** @psalm-param list<Token<string, string|int>> $expectedTokens */
/** @phpstan-param list<Token<string, string|int>> $expectedTokens */
#[DataProvider('dataProvider')]
public function testIsNextTokenAny(string $input, array $expectedTokens): void
{
Expand Down

0 comments on commit e0abe83

Please sign in to comment.