Skip to content

Commit

Permalink
remove @psalm-suppress annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmajor committed Apr 5, 2024
1 parent 0531f4c commit c01bf6a
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion dev/Helpers/CldrData.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public static function get(string $package, string $locale, string $key): mixed
throw new InvalidArgumentException('Key should be in a dot notation.');
}

/** @psalm-suppress PossiblyUndefinedArrayOffset */
[$filename, $keys] = explode('.', $key, 2);

$path = self::path($package, "{$locale}/{$filename}.json");
Expand Down
4 changes: 0 additions & 4 deletions src/Formatters/LocaleData.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@

/**
* @internal
*
* @psalm-suppress UnresolvableInclude
*/
final class LocaleData
{
Expand Down Expand Up @@ -89,8 +87,6 @@ private static function splitLocale(string $locale): array

/**
* @return list<non-empty-string>
*
* @psalm-suppress LessSpecificReturnStatement, MoreSpecificReturnType
*/
private static function getFiles(string $type, string $language): array
{
Expand Down
7 changes: 0 additions & 7 deletions src/Formatters/Number/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
*/
final class Options
{
/**
* @psalm-suppress DocblockTypeContradiction
*/
public function __construct(
/** @var 'decimal'|'currency'|'percent'|'unit' */
public string $style = 'decimal',
Expand All @@ -29,7 +26,6 @@ public function __construct(
/** @var 'long'|'short'|'narrow' */
public string $unitDisplay = 'short',
) {
/** @psalm-suppress DocblockTypeContradiction */
if (! in_array($style, ['decimal', 'currency', 'percent', 'unit'], true)) {
throw new InvalidArgumentException('Allowed styles are decimal, currency, percent and unit.');
}
Expand Down Expand Up @@ -87,9 +83,6 @@ private function fillForSignificant(): void
$this->maximumSignificantDigits ??= 21;
}

/**
* @psalm-suppress PossiblyNullPropertyFetch
*/
private function fillForOther(?Currency $currency): void
{
$this->minimumIntegerDigits ??= 1;
Expand Down
1 change: 0 additions & 1 deletion src/Resolver/PatternResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function __construct(
/** @var array<string, mixed> */
private array $arguments,
) {
/** @psalm-suppress PropertyTypeCoercion */
$this->dirty = new WeakMap();

$this->variantMatcher = new VariantMatcher($this->bundle->getLocale());
Expand Down
2 changes: 0 additions & 2 deletions tests/Formatters/Number/NumberFormatterTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ final public function testCorrectPatterns(): void
}

/**
* @psalm-suppress InvalidScalarArgument
*
* @param O $options
*/
final protected static function assertNumberFormat(
Expand Down
1 change: 0 additions & 1 deletion tests/Parser/CursorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ public function testTake(): void

private function cursor(string $string): Cursor
{
/** @psalm-suppress InternalClass */
return new class ($string) extends Cursor { };
}
}
1 change: 0 additions & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ abstract class TestCase extends BaseTestCase
use AstAssertions;
use TranslationAssertions;

/** @psalm-suppress MissingConstructor */
protected FluentBundle $bundle;

protected function setUp(): void
Expand Down

0 comments on commit c01bf6a

Please sign in to comment.