Code Duplication    Length = 14-14 lines in 2 locations

src/Standards/BestIt/Sniffs/Functions/FluentSetterSniff.php 2 locations

@@ 100-113 (lines=14) @@
97
98
        $returnPtr = $phpcsFile->findNext(T_RETURN, $openBracePtr, $closeBracePtr);
99
100
        if ($returnPtr === false) {
101
            $fixNoReturnFound = $phpcsFile->addFixableError(
102
                self::ERROR_NO_RETURN_FOUND,
103
                $stackPtr,
104
                self::CODE_NO_RETURN_FOUND,
105
                $errorData
106
            );
107
108
            if ($fixNoReturnFound) {
109
                $this->fixNoReturnFound($phpcsFile, $closeBracePtr);
110
            }
111
112
            return;
113
        }
114
115
        $nextReturnPtr = $phpcsFile->findNext(
116
            T_RETURN,
@@ 133-146 (lines=14) @@
130
131
        $thisVariablePtr = $phpcsFile->findNext(T_VARIABLE, $returnPtr, null, false, '$this', true);
132
133
        if ($thisVariablePtr === false) {
134
            $fixMustReturnThis = $phpcsFile->addFixableError(
135
                self::ERROR_MUST_RETURN_THIS,
136
                $stackPtr,
137
                self::CODE_MUST_RETURN_THIS,
138
                $errorData
139
            );
140
141
            if ($fixMustReturnThis) {
142
                $this->fixMustReturnThis($phpcsFile, $returnPtr);
143
            }
144
145
            return;
146
        }
147
    }
148
149
    /**