Code Duplication    Length = 6-6 lines in 2 locations

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

@@ 160-165 (lines=6) @@
157
			// They must (at least) have a comment describing why
158
			// the default case is being ignored.
159
			$foundContent = FALSE;
160
			for ($i = ($this->tokens[$nextCase]['scope_opener'] + 1); $i < $nextBreak; $i++) {
161
				if ($this->tokens[$i]['type'] !== 'T_WHITESPACE') {
162
					$foundContent = TRUE;
163
					break;
164
				}
165
			}
166
			if ($foundContent === FALSE) {
167
				$error = 'Comment required for empty DEFAULT case';
168
				$this->file->addError($error, $nextCase, 'EmptyDefault');
@@ 238-243 (lines=6) @@
235
	{
236
		$caseLine = $this->tokens[$nextCase]['line'];
237
		$nextLine = $this->tokens[$nextBreak]['line'];
238
		for ($i = ($opener + 1); $i < $nextBreak; $i++) {
239
			if ($this->tokens[$i]['type'] !== 'T_WHITESPACE') {
240
				$nextLine = $this->tokens[$i]['line'];
241
				break;
242
			}
243
		}
244
		if ($nextLine !== ($caseLine + 1)) {
245
			$error = 'Blank lines are not allowed after ' . strtoupper($type) . ' statements';
246
			$this->file->addError($error, $nextCase, 'SpacingAfter' . $type);