Problem/Motivation

PHPStan reports some type-safety errors:

 ------ -----------------------------------------------------------------------------------------------------------------------------
  Line   web/modules/contrib/json_schema_validator/src/JsonSchemaValidator.php
 ------ -----------------------------------------------------------------------------------------------------------------------------
  73     Method Drupal\json_schema_validator\JsonSchemaValidator::validateJsonSchema() never returns false so the return type can be
         changed to true.
         🪪  return.tooWideBool
  86     Binary operation "." between mixed and '/' results in an error.
         🪪  binaryOp.invalid
  88     Binary operation "." between mixed and non-falsy-string results in an error.
         🪪  binaryOp.invalid
 ------ -----------------------------------------------------------------------------------------------------------------------------

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

  • phpstan_type_safety Comparechanges, plain diff MR !8
  • 1 hidden branch
  • 1.0.x Comparecompare

Comments

ptmkenny created an issue. See original summary.

ptmkenny’s picture

Title: Fix phpstan type-safety errors » Require drupal/phpstan v2 and fix phpstan type-safety errors

ptmkenny changed the visibility of the branch 1.0.x to hidden.

  • ptmkenny committed cd159ec2 on 1.0.x
    task: #3590992 Require drupal/phpstan v2 and fix phpstan type-safety...
ptmkenny’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.