Skip to content

Commit

Permalink
Minor fixes from static analysis.
Browse files Browse the repository at this point in the history
  • Loading branch information
j13k committed Dec 7, 2017
1 parent 343be41 commit 0ff6598
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/yaml-lint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0ff6598

Please sign in to comment.