Unverified Commit 1bdc29a4 authored by Klaus Purer's avatar Klaus Purer Committed by GitHub
Browse files

tests(travis): Enable testing on PHP 7.4

parent b7020a52
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ matrix:
    - php: 7.1
    - php: 7.2
    - php: 7.3
    - php: 7.4snapshot

before_install:
  # Speed up build time by disabling Xdebug when its not needed.
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ class FunctionCommentSniff implements Sniff
                }

                // Starts with a capital letter and ends with a fullstop.
                $firstChar = $comment{0};
                $firstChar = $comment[0];
                if (strtoupper($firstChar) !== $firstChar) {
                    $error = '@throws tag comment must start with a capital letter';
                    $phpcsFile->addError($error, $throwStart, 'ThrowsNotCapital');
+1 −1
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ class InlineCommentSniff implements Sniff
            }
        }//end if

        if ($tokens[$stackPtr]['content']{0} === '#') {
        if ($tokens[$stackPtr]['content'][0] === '#') {
            $error = 'Perl-style comments are not allowed; use "// Comment" instead';
            $fix   = $phpcsFile->addFixableError($error, $stackPtr, 'WrongStyle');
            if ($fix === true) {
+1 −1
Original line number Diff line number Diff line
@@ -112,7 +112,7 @@ class ValidGlobalSniff implements Sniff
        while (($varToken = $phpcsFile->findNext($ignore, ($varToken + 1), null, true, null, true)) !== false) {
            if ($tokens[$varToken]['code'] === T_VARIABLE
                && in_array($tokens[$varToken]['content'], $this->coreGlobals) === false
                && $tokens[$varToken]['content']{1} !== '_'
                && $tokens[$varToken]['content'][1] !== '_'
            ) {
                $error = 'global variables should start with a single underscore followed by the module and another underscore';
                $phpcsFile->addError($error, $varToken, 'GlobalUnderScore');
+2 −2
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@ class FunctionTSniff extends FunctionCall

        // Check if there is a backslash escaped single quote in the string and
        // if the string makes use of double quotes.
        if ($string{0} === "'" && strpos($string, "\'") !== false
        if ($string[0] === "'" && strpos($string, "\'") !== false
            && strpos($string, '"') === false
        ) {
            $warn = 'Avoid backslash escaping in translatable strings when possible, use "" quotes instead';
@@ -126,7 +126,7 @@ class FunctionTSniff extends FunctionCall
            return;
        }

        if ($string{0} === '"' && strpos($string, '\"') !== false
        if ($string[0] === '"' && strpos($string, '\"') !== false
            && strpos($string, "'") === false
        ) {
            $warn = "Avoid backslash escaping in translatable strings when possible, use '' quotes instead";
Loading