Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 106-119 (lines=14) @@
103
104
        $returnPtr = $phpcsFile->findNext(T_RETURN, $openBracePtr, $closeBracePtr);
105
106
        if ($returnPtr === false) {
107
            $fixNoReturnFound = $phpcsFile->addFixableError(
108
                self::ERROR_NO_RETURN_FOUND,
109
                $stackPtr,
110
                self::CODE_NO_RETURN_FOUND,
111
                $errorData
112
            );
113
114
            if ($fixNoReturnFound) {
115
                $this->fixNoReturnFound($phpcsFile, $closeBracePtr);
116
            }
117
118
            return;
119
        }
120
121
        $nextReturnPtr = $phpcsFile->findNext(
122
            T_RETURN,
@@ 139-152 (lines=14) @@
136
137
        $thisVariablePtr = $phpcsFile->findNext(T_VARIABLE, $returnPtr, null, false, '$this', true);
138
139
        if ($thisVariablePtr === false) {
140
            $fixMustReturnThis = $phpcsFile->addFixableError(
141
                self::ERROR_MUST_RETURN_THIS,
142
                $stackPtr,
143
                self::CODE_MUST_RETURN_THIS,
144
                $errorData
145
            );
146
147
            if ($fixMustReturnThis) {
148
                $this->fixMustReturnThis($phpcsFile, $returnPtr);
149
            }
150
151
            return;
152
        }
153
    }
154
155
    /**