/**
  * Returns class methods.
  *
  * @param integer $filter Methods filter
  * @return array
  */
 public function getMethods($filter = null)
 {
     if (null === $this->methods) {
         $broker = $this->broker;
         $this->methods = array_map(function (InternalReflectionMethod $method) use($broker) {
             return ReflectionMethod::create($method, $broker);
         }, parent::getMethods());
     }
     if (null === $filter) {
         return $this->methods;
     }
     return array_filter($this->methods, function (ReflectionMethod $method) use($filter) {
         return (bool) ($method->getModifiers() & $filter);
     });
 }
 /**
  * Returns class constructor reflection.
  *
  * @return \TokenReflection\Php\ReflectionClass|null
  */
 public function getConstructor()
 {
     return ReflectionMethod::create(parent::getConstructor(), $this->broker);
 }