public static function fromArray(Project $project, $array)
 {
     $method = new self($array['name'], $array['line']);
     $method->shortDesc = $array['short_desc'];
     $method->longDesc = $array['long_desc'];
     $method->hint = $array['hint'];
     $method->hintDesc = $array['hint_desc'];
     $method->tags = $array['tags'];
     $method->modifiers = $array['modifiers'];
     $method->byRef = $array['is_by_ref'];
     $method->exceptions = $array['exceptions'];
     $method->errors = $array['errors'];
     foreach ($array['parameters'] as $parameter) {
         $parameter = ParameterReflection::fromArray($project, $parameter);
         $method->addParameter($parameter);
     }
     return $method;
 }