/** * @return \Illuminate\Support\Collection */ public function getScopes() { $methods = $this->class_parser->getMethods(); $scopes = collect(); foreach ($methods as $method) { if (substr($method->name, 0, 5) !== 'scope') { continue; } $scopes->push(camel_case(substr($method->name, 5))); } return $scopes; }
/** * @param string $method * * @return \stdClass */ public function parseMethod($method) { return $this->class_parser->getMethod($method); // if (!is_null($this->statements)) { // // $return = @$this->methodStatementsReturns[$method] ?: []; // } }
/** * @param ClassParser $class * @param string $method */ public function __construct($class, $method) { $this->class = $class; $this->method = $method; $this->reflector = $this->class->getReflector()->getMethod($this->method); }