Code Duplication    Length = 16-16 lines in 2 locations

MO4/Sniffs/Arrays/MultiLineArraySniff.php 2 locations

@@ 84-99 (lines=16) @@
81
            return;
82
        }
83
84
        if ($tokens[($start + 2)]['line'] === $tokens[$start]['line']) {
85
            $fixable = $phpcsFile->addFixableError(
86
                sprintf(
87
                    'opening %s of multi line array must be followed by newline',
88
                    $arrayType
89
                ),
90
                $start,
91
                'OpeningMustBeFollowedByNewline'
92
            );
93
94
            if ($fixable === true) {
95
                $phpcsFile->fixer->beginChangeset();
96
                $phpcsFile->fixer->addNewline($start);
97
                $phpcsFile->fixer->endChangeset();
98
            }
99
        }
100
101
        if ($tokens[($end - 2)]['line'] === $tokens[$end]['line']) {
102
            $fixable = $phpcsFile->addFixableError(
@@ 101-116 (lines=16) @@
98
            }
99
        }
100
101
        if ($tokens[($end - 2)]['line'] === $tokens[$end]['line']) {
102
            $fixable = $phpcsFile->addFixableError(
103
                sprintf(
104
                    'closing %s of multi line array must in own line',
105
                    $arrayType
106
                ),
107
                $end,
108
                'ClosingMustBeInOwnLine'
109
            );
110
111
            if ($fixable === true) {
112
                $phpcsFile->fixer->beginChangeset();
113
                $phpcsFile->fixer->addNewlineBefore($end);
114
                $phpcsFile->fixer->endChangeset();
115
            }
116
        }
117
118
    }//end process()
119