Code Duplication    Length = 6-6 lines in 2 locations

src/ZenifyCodingStandard/Sniffs/ControlStructures/SwitchDeclarationSniff.php 2 locations

@@ 149-154 (lines=6) @@
146
			// They must (at least) have a comment describing why
147
			// the default case is being ignored.
148
			$foundContent = FALSE;
149
			for ($i = ($this->tokens[$nextCase]['scope_opener'] + 1); $i < $nextBreak; $i++) {
150
				if ($this->tokens[$i]['type'] !== 'T_WHITESPACE') {
151
					$foundContent = TRUE;
152
					break;
153
				}
154
			}
155
			if ($foundContent === FALSE) {
156
				$error = 'Comment required for empty DEFAULT case';
157
				$this->file->addError($error, $nextCase, 'EmptyDefault');
@@ 222-227 (lines=6) @@
219
	{
220
		$caseLine = $this->tokens[$nextCase]['line'];
221
		$nextLine = $this->tokens[$nextBreak]['line'];
222
		for ($i = ($opener + 1); $i < $nextBreak; $i++) {
223
			if ($this->tokens[$i]['type'] !== 'T_WHITESPACE') {
224
				$nextLine = $this->tokens[$i]['line'];
225
				break;
226
			}
227
		}
228
		if ($nextLine !== ($caseLine + 1)) {
229
			$error = 'Blank lines are not allowed after ' . strtoupper($type) . ' statements';
230
			$this->file->addError($error, $nextCase, 'SpacingAfter' . $type);