Skip to content

Commit f167834

Browse files
committed
MQE-610:[PHPMD] Reduce Cyclomatic Complexity in Problem Methods
fixed unit tests
1 parent 7fa1e22 commit f167834

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Magento/FunctionalTestingFramework/Suite/Util/SuiteObjectExtractor.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function parseSuiteDataIntoObjects($parsedSuiteData)
8080
$suiteHooks = $this->parseObjectHooks($parsedSuite);
8181

8282
//throw an exception if suite is empty
83-
if ($this->isSuiteEmpty($suiteHooks, $includeTests, $excludeTests)){
83+
if ($this->isSuiteEmpty($suiteHooks, $includeTests, $excludeTests)) {
8484
throw new XmlException(sprintf(
8585
"Suites must not be empty. Suite: \"%s\"",
8686
$parsedSuite[self::NAME]
@@ -133,7 +133,6 @@ private function validateSuiteName($parsedSuite)
133133
"Suite: \"{$suiteName}\" also exists as a group annotation in: \n{$testGroupConflictsFileNames}";
134134
throw new XmlException($exceptionmessage);
135135
}
136-
137136
}
138137

139138
/**
@@ -163,7 +162,6 @@ private function parseObjectHooks($parsedSuite)
163162
}
164163

165164
if (count($suiteHooks) == 1) {
166-
167165
throw new XmlException(sprintf(
168166
"Suites that contain hooks must contain both a 'before' and an 'after' hook. Suite: \"%s\"",
169167
$parsedSuite[self::NAME]
@@ -190,7 +188,7 @@ private function isSuiteEmpty($suiteHooks, $includeTests, $excludeTests)
190188
);
191189

192190
if ($noHooks && empty($includeTests) && empty($excludeTests)) {
193-
return true;
191+
return true;
194192
}
195193
return false;
196194
}

0 commit comments

Comments
 (0)