File tree 2 files changed +2
-21
lines changed
2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,12 @@ public function detect(string $filename): SchemaDetectionResult
28
28
29
29
$ schemaFinder = new SchemaFinder ;
30
30
31
- $ tried = [];
32
-
33
31
foreach ($ schemaFinder ->available () as $ candidate ) {
34
32
$ schema = (new SchemaFinder )->find ($ candidate );
35
33
36
34
if (!(new Validator )->validate ($ document , $ schema )->hasValidationErrors ()) {
37
- return new SuccessfulSchemaDetectionResult ($ candidate, $ tried );
35
+ return new SuccessfulSchemaDetectionResult ($ candidate );
38
36
}
39
-
40
- $ tried [] = $ candidate ;
41
37
}
42
38
43
39
return new FailedSchemaDetectionResult ;
Original file line number Diff line number Diff line change @@ -21,19 +21,12 @@ final class SuccessfulSchemaDetectionResult extends SchemaDetectionResult
21
21
*/
22
22
private $ version ;
23
23
24
- /**
25
- * @psalm-var list<non-empty-string>
26
- */
27
- private $ tried ;
28
-
29
24
/**
30
25
* @psalm-param non-empty-string $version
31
- * @psalm-param list<non-empty-string> $tried
32
26
*/
33
- public function __construct (string $ version, array $ tried )
27
+ public function __construct (string $ version )
34
28
{
35
29
$ this ->version = $ version ;
36
- $ this ->tried = $ tried ;
37
30
}
38
31
39
32
/**
@@ -51,12 +44,4 @@ public function version(): string
51
44
{
52
45
return $ this ->version ;
53
46
}
54
-
55
- /**
56
- * @psalm-return list<non-empty-string>
57
- */
58
- public function tried (): array
59
- {
60
- return $ this ->tried ;
61
- }
62
47
}
You can’t perform that action at this time.
0 commit comments