From 0ff6598ac8f00e87a245992b5bb642148e179005 Mon Sep 17 00:00:00 2001 From: John Fitzpatrick Date: Thu, 7 Dec 2017 22:54:50 +1100 Subject: [PATCH] Minor fixes from static analysis. --- src/yaml-lint.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/yaml-lint.php b/src/yaml-lint.php index 8365de3..0081cc9 100755 --- a/src/yaml-lint.php +++ b/src/yaml-lint.php @@ -99,13 +99,13 @@ // Do the thing (now accommodates changes to the Yaml::parse method introduced in v3) $yamlParseMethod = new ReflectionMethod('\Symfony\Component\Yaml\Yaml', 'parse'); $yamlParseParams = $yamlParseMethod->getParameters(); - switch ($yamlParseParams[1]->getName()) { - case YAML_PARSE_PARAM_NAME_EXCEPTION_ON_INVALID_TYPE; + switch ($yamlParseParams[1]->name) { + case YAML_PARSE_PARAM_NAME_EXCEPTION_ON_INVALID_TYPE: // Maintains original behaviour in ^2 Yaml::parse($content, true); break; case YAML_PARSE_PARAM_NAME_FLAGS: - // Implements same behaviour in ^3|^4 + // Implements same behaviour in ^3 and ^4 Yaml::parse($content, Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE); break; default: