File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ namespace Arkitect \CLI ;
5+
6+ use Arkitect \Rules \ParsingErrors ;
7+ use Arkitect \Rules \Violations ;
8+
9+ class AnalysisResult
10+ {
11+ private Violations $ violations ;
12+
13+ private ParsingErrors $ parsingErrors ;
14+
15+ public function __construct (Violations $ violations , ParsingErrors $ parsingErrors )
16+ {
17+ $ this ->violations = $ violations ;
18+ $ this ->parsingErrors = $ parsingErrors ;
19+ }
20+
21+ public function getViolations (): Violations
22+ {
23+ return $ this ->violations ;
24+ }
25+
26+ public function getParsingErrors (): ParsingErrors
27+ {
28+ return $ this ->parsingErrors ;
29+ }
30+
31+ public function hasErrors (): bool
32+ {
33+ return $ this ->hasViolations () || $ this ->hasParsingErrors ();
34+ }
35+
36+ public function hasViolations (): bool
37+ {
38+ return $ this ->violations ->count () > 0 ;
39+ }
40+
41+ public function hasParsingErrors (): bool
42+ {
43+ return $ this ->parsingErrors ->count () > 0 ;
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments