Code Duplication    Length = 13-14 lines in 2 locations

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

Sniffs/PHP/DeprecatedFunctionsSniff.php 1 location

@@ 723-736 (lines=14) @@
720
                }
721
            }
722
        }
723
        if (strlen($error) > 0) {
724
            $error = 'The use of function ' . $function . ' is ' . $error;
725
            $error = substr($error, 0, strlen($error) - 5);
726
727
            if ($this->forbiddenFunctions[$pattern]['alternative'] !== null) {
728
                $error .= '; use ' . $this->forbiddenFunctions[$pattern]['alternative'] . ' instead';
729
            }
730
731
            if ($isError === true) {
732
                $phpcsFile->addError($error, $stackPtr);
733
            } else {
734
                $phpcsFile->addWarning($error, $stackPtr);
735
            }
736
        }
737
738
    }//end addError()
739