Skip to content

Commit 0bf4d90

Browse files
Revert "Store schema versions for which the validation failed"
This reverts commit 05ae98b.
1 parent 05ae98b commit 0bf4d90

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

src/Util/Xml/SchemaDetector.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,12 @@ public function detect(string $filename): SchemaDetectionResult
2828

2929
$schemaFinder = new SchemaFinder;
3030

31-
$tried = [];
32-
3331
foreach ($schemaFinder->available() as $candidate) {
3432
$schema = (new SchemaFinder)->find($candidate);
3533

3634
if (!(new Validator)->validate($document, $schema)->hasValidationErrors()) {
37-
return new SuccessfulSchemaDetectionResult($candidate, $tried);
35+
return new SuccessfulSchemaDetectionResult($candidate);
3836
}
39-
40-
$tried[] = $candidate;
4137
}
4238

4339
return new FailedSchemaDetectionResult;

src/Util/Xml/SuccessfulSchemaDetectionResult.php

+1-16
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,12 @@ final class SuccessfulSchemaDetectionResult extends SchemaDetectionResult
2121
*/
2222
private $version;
2323

24-
/**
25-
* @psalm-var list<non-empty-string>
26-
*/
27-
private $tried;
28-
2924
/**
3025
* @psalm-param non-empty-string $version
31-
* @psalm-param list<non-empty-string> $tried
3226
*/
33-
public function __construct(string $version, array $tried)
27+
public function __construct(string $version)
3428
{
3529
$this->version = $version;
36-
$this->tried = $tried;
3730
}
3831

3932
/**
@@ -51,12 +44,4 @@ public function version(): string
5144
{
5245
return $this->version;
5346
}
54-
55-
/**
56-
* @psalm-return list<non-empty-string>
57-
*/
58-
public function tried(): array
59-
{
60-
return $this->tried;
61-
}
6247
}

0 commit comments

Comments
 (0)