Mercurial > hg > isophonics-drupal-site
diff vendor/squizlabs/php_codesniffer/src/Util/Common.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
line wrap: on
line diff
--- a/vendor/squizlabs/php_codesniffer/src/Util/Common.php Thu Feb 28 13:21:36 2019 +0000 +++ b/vendor/squizlabs/php_codesniffer/src/Util/Common.php Thu May 09 15:33:08 2019 +0100 @@ -226,31 +226,31 @@ public static function prepareForOutput($content, $exclude=[]) { if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { - if (in_array("\r", $exclude) === false) { + if (in_array("\r", $exclude, true) === false) { $content = str_replace("\r", '\r', $content); } - if (in_array("\n", $exclude) === false) { + if (in_array("\n", $exclude, true) === false) { $content = str_replace("\n", '\n', $content); } - if (in_array("\t", $exclude) === false) { + if (in_array("\t", $exclude, true) === false) { $content = str_replace("\t", '\t', $content); } } else { - if (in_array("\r", $exclude) === false) { + if (in_array("\r", $exclude, true) === false) { $content = str_replace("\r", "\033[30;1m\\r\033[0m", $content); } - if (in_array("\n", $exclude) === false) { + if (in_array("\n", $exclude, true) === false) { $content = str_replace("\n", "\033[30;1m\\n\033[0m", $content); } - if (in_array("\t", $exclude) === false) { + if (in_array("\t", $exclude, true) === false) { $content = str_replace("\t", "\033[30;1m\\t\033[0m", $content); } - if (in_array(' ', $exclude) === false) { + if (in_array(' ', $exclude, true) === false) { $content = str_replace(' ', "\033[30;1m·\033[0m", $content); } }//end if @@ -384,9 +384,9 @@ /** - * Returns a valid variable type for param/var tag. + * Returns a valid variable type for param/var tags. * - * If type is not one of the standard type, it must be a custom type. + * If type is not one of the standard types, it must be a custom type. * Returns the correct type name suggestion if type name is invalid. * * @param string $varType The variable type to process. @@ -399,7 +399,7 @@ return ''; } - if (in_array($varType, self::$allowedTypes) === true) { + if (in_array($varType, self::$allowedTypes, true) === true) { return $varType; } else { $lowerVarType = strtolower($varType); @@ -445,7 +445,7 @@ } else { return 'array'; }//end if - } else if (in_array($lowerVarType, self::$allowedTypes) === true) { + } else if (in_array($lowerVarType, self::$allowedTypes, true) === true) { // A valid type, but not lower cased. return $lowerVarType; } else {