Skip to content

Commit

Permalink
Fix all PHPStan level 8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Ribeiro committed Jun 7, 2024
1 parent 70cd013 commit ab8b4a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
6 changes: 2 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ parameters:

excludePaths:

checkMissingIterableValueType: false

universalObjectCratesClasses:

ignoreErrors:
- identifier: missingType.generics
- identifier: missingType.iterableValue

reportUnmatchedIgnoredErrors: false

checkGenericClassInNonGenericObjectType: false
4 changes: 2 additions & 2 deletions src/Repositories/TwillFeatureFlagRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getFeature(string $code): bool
return false;
}

if (blank($featureFlag) || blank($featureFlag?->published) || $featureFlag?->published === false) {
if (blank($featureFlag) || blank($featureFlag->published) || $featureFlag->published === false) {
return false;
}

Expand Down Expand Up @@ -74,7 +74,7 @@ public function featureList(bool $all = false): array
private function isPubliclyAvailableToCurrentUser(TwillFeatureFlag $featureFlag): bool
{
return $this->isPubliclyAvailableToIpAddresses($featureFlag) ||
$this->isPubliclyAvailableToTwillUsers($featureFlag);
$this->isPubliclyAvailableToTwillUsers($featureFlag);
}

private function bootCache(): void
Expand Down
3 changes: 0 additions & 3 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use A17\Twill\Facades\TwillCapsules;
use A17\Twill\TwillPackageServiceProvider;
use A17\TwillFeatureFlags\Services\Helpers;
use A17\TwillFeatureFlags\Support\TwillFeatureFlags;

class ServiceProvider extends TwillPackageServiceProvider
{
Expand All @@ -31,7 +30,5 @@ protected function registerThisCapsule(): void
$namespace,
$this->getPackageDirectory() . '/src',
);

app()->singleton(TwillFeatureFlags::class, fn() => new TwillFeatureFlags());
}
}
14 changes: 0 additions & 14 deletions src/Support/Facades/TwillHttpBasicAuth.php

This file was deleted.

0 comments on commit ab8b4a0

Please sign in to comment.