Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable PHPStan bleeding edge mode #69

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

COil
Copy link
Member

@COil COil commented Oct 4, 2024

@COil COil added enhancement UX User eXperience labels Oct 4, 2024
@COil COil self-assigned this Oct 4, 2024
$percentage = min(100, max(0, (int) $argv[2]));

if (!file_exists($inputFile)) {
throw new InvalidArgumentException('Invalid input file provided');
}

if (!is_int($percentage)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detected by PHPStan bleeding edge:

------ ----------------------------------------------------------------------------------------------------------------------
  Line   bin/coverage-checker.php
 ------ ----------------------------------------------------------------------------------------------------------------------
  14     Call to function is_int() with int<0, 100> will always evaluate to true.
         🪪  function.alreadyNarrowedType
         💡 Because the type is coming from a PHPDoc, you can turn off this check by setting treatPhpDocTypesAsCertain: false
            in your phpstan.neon.
 ------ ----------------------------------------------------------------------------------------------------------------------

@@ -18,6 +19,8 @@

/**
* @see RegisterFormDto
*
* @extends AbstractType<RegisterFormDto>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detected by PHPStan bleeding edge:

------ ----------------------------------------------------------------------------------------------------------------------------------
  Line   src/Form/Type/RegisterForm.php
 ------ ----------------------------------------------------------------------------------------------------------------------------------
  22     Class App\Form\Type\RegisterForm extends generic class Symfony\Component\Form\AbstractType but does not specify its types: TData
         🪪  missingType.generics
 ------ ----------------------------------------------------------------------------------------------------------------------------------

@COil COil merged commit cea66d0 into main Oct 4, 2024
3 checks passed
@COil COil deleted the phpstan-bleedingedge branch October 4, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX User eXperience
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant