Mercurial > hg > isophonics-drupal-site
diff vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 5fb285c0d0e3 |
children |
line wrap: on
line diff
--- a/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php Thu Feb 28 13:21:36 2019 +0000 @@ -2,8 +2,6 @@ namespace PhpParser; -use PhpParser\Node; - abstract class NodeAbstract implements Node, \JsonSerializable { protected $attributes; @@ -159,11 +157,11 @@ } public function getAttribute(string $key, $default = null) { - if (!array_key_exists($key, $this->attributes)) { - return $default; - } else { + if (array_key_exists($key, $this->attributes)) { return $this->attributes[$key]; } + + return $default; } public function getAttributes() : array {