Code Duplication    Length = 13-14 lines in 2 locations

Sniffs/PHP/DeprecatedFunctionsSniff.php 1 location

@@ 731-744 (lines=14) @@
728
                }
729
            }
730
        }
731
        if (strlen($error) > 0) {
732
            $error = 'The use of function ' . $function . ' is ' . $error;
733
            $error = substr($error, 0, strlen($error) - 5);
734
735
            if ($this->forbiddenFunctions[$pattern]['alternative'] !== null) {
736
                $error .= '; use ' . $this->forbiddenFunctions[$pattern]['alternative'] . ' instead';
737
            }
738
739
            if ($isError === true) {
740
                $phpcsFile->addError($error, $stackPtr);
741
            } else {
742
                $phpcsFile->addWarning($error, $stackPtr);
743
            }
744
        }
745
746
    }//end addError()
747

Sniffs/PHP/DeprecatedIniDirectivesSniff.php 1 location

@@ 253-265 (lines=13) @@
250
            }
251
        }
252
253
        if (strlen($error) > 0) {
254
            $error = "INI directive '" . $filteredToken . "' is" . $error;
255
            $error = substr($error, 0, strlen($error) - 4) . ".";
256
            if (isset($this->deprecatedIniDirectives[$filteredToken]['alternative'])) {
257
                $error .= " Use '" . $this->deprecatedIniDirectives[$filteredToken]['alternative'] . "' instead.";
258
            }
259
260
            if ($isError === true) {
261
                $phpcsFile->addError($error, $stackPtr);
262
            } else {
263
                $phpcsFile->addWarning($error, $stackPtr);
264
            }
265
        }
266
267
    }//end process()
268