protected function getConstants() { $const = $this->reflection->getConstantReflections(); $classname = $this->reflection->getName(); if ($this->skip_inherited_attr) { $const = array_filter($const, function ($prop) use($classname) { return $classname == $prop->getDeclaringClassName(); }); } return array_map(function ($v) { return new ConstantElement($v); }, $const); }
protected function getConstants() { return array_map(function ($v) { return new ConstantElement($v); }, $this->reflection->getConstantReflections()); }