Problem/Motivation


8) web/modules/orig/json_schema_validator/src/JsonSchemaValidator.php:385

    ---------- begin diff ----------
@@ Line 385 @@
    *   The shared validator.
    */
   private function getValidator(string $schema_base_url, string $schema_directory_path): Validator {
-    if ($this->validator === NULL || $this->registeredPrefix !== [$schema_base_url, $schema_directory_path]) {
+    if (!$this->validator instanceof Validator || $this->registeredPrefix !== [$schema_base_url, $schema_directory_path]) {
       $validator = new Validator();
       $resolver = $validator->loader()->resolver();
       if (!$resolver instanceof SchemaResolver) {
    ----------- end diff -----------

Applied rules:
 * ProtectedStaticModulesPropertyRector
 * FlipTypeControlToUseExclusiveTypeRector


9) web/modules/orig/json_schema_validator/src/SanitizationResult.php:9

    ---------- begin diff ----------
@@ Line 9 @@
  *
  * @see \Drupal\json_schema_validator\JsonSchemaValidator::validateAndUseDefaultsWhenInvalid()
  */
-final class SanitizationResult {
+final readonly class SanitizationResult {

   /**
    * Constructs a SanitizationResult object.
@@ Line 27 @@
    *   - default: the default that was applied.
    */
   public function __construct(
-    private readonly array $data,
-    private readonly string $json,
-    private readonly array $corrections,
+    private array $data,
+    private string $json,
+    private array $corrections,
   ) {}

   /**
    ----------- end diff -----------

Applied rules:
 * ReadOnlyClassRector

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:

Comments

ptmkenny created an issue. See original summary.

  • ptmkenny committed bb5faa10 on 1.0.x
    task: #3607659 Rector fixes July 2026
    
    By: ptmkenny
    
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.