@@ -37,7 +37,7 @@ class CreatedDataFromOutsideActionGroupCheck implements StaticCheckInterface
37
37
{
38
38
const ACTIONGROUP_REGEX_PATTERN = '/\$(\$)*([\w.]+)(\$)*\$/ ' ;
39
39
const ERROR_LOG_FILENAME = 'create-data-from-outside-action-group ' ;
40
- const ERROR_LOG_MESSAGE = 'Created Data From Outside Action Group ' ;
40
+ const ERROR_MESSAGE = 'Created Data From Outside Action Group ' ;
41
41
42
42
/**
43
43
* Array containing all errors found after running the execute() function
@@ -60,13 +60,6 @@ class CreatedDataFromOutsideActionGroupCheck implements StaticCheckInterface
60
60
*/
61
61
private $ scriptUtil ;
62
62
63
- /**
64
- * Action group xml files to scan
65
- *
66
- * @var Finder|array
67
- */
68
- private $ actionGroupXmlFiles = [];
69
-
70
63
/**
71
64
* Checks test dependencies, determined by references in tests versus the dependencies listed in the Magento module
72
65
*
@@ -79,11 +72,12 @@ public function execute(InputInterface $input)
79
72
$ this ->scriptUtil = new ScriptUtil ();
80
73
$ this ->loadAllXmlFiles ($ input );
81
74
$ this ->errors = [];
82
- $ this ->errors += $ this ->findReferenceErrorsInActionFiles ($ this ->actionGroupXmlFiles );
75
+ $ this ->errors += $ this ->findReferenceErrorsInActionFiles ($ this ->actionGroupXmlFile );
76
+ // hold on to the output and print any errors to a file
83
77
$ this ->output = $ this ->scriptUtil ->printErrorsToFile (
84
78
$ this ->errors ,
85
79
StaticChecksList::getErrorFilesPath () . DIRECTORY_SEPARATOR . self ::ERROR_LOG_FILENAME . '.txt ' ,
86
- self ::ERROR_LOG_MESSAGE
80
+ self ::ERROR_MESSAGE
87
81
);
88
82
}
89
83
@@ -118,7 +112,6 @@ public function getOutput()
118
112
private function loadAllXmlFiles ($ input )
119
113
{
120
114
$ modulePaths = [];
121
- $ includeRootPath = true ;
122
115
$ path = $ input ->getOption ('path ' );
123
116
if ($ path ) {
124
117
if (!realpath ($ path )) {
@@ -132,15 +125,14 @@ private function loadAllXmlFiles($input)
132
125
true
133
126
);
134
127
$ modulePaths [] = realpath ($ path );
135
- $ includeRootPath = false ;
136
128
} else {
137
129
$ modulePaths = $ this ->scriptUtil ->getAllModulePaths ();
138
130
}
139
131
140
132
// These files can contain references to other entities
141
- $ this ->actionGroupXmlFiles = $ this ->scriptUtil ->getModuleXmlFilesByScope ($ modulePaths , 'ActionGroup ' );
133
+ $ this ->actionGroupXmlFile = $ this ->scriptUtil ->getModuleXmlFilesByScope ($ modulePaths , 'ActionGroup ' );
142
134
143
- if (empty ($ this ->actionGroupXmlFiles )) {
135
+ if (empty ($ this ->actionGroupXmlFile )) {
144
136
if ($ path ) {
145
137
throw new InvalidArgumentException (
146
138
'Invalid --path option: '
0 commit comments