function __construct(WebRequest $request, $content, $key) { parent::__construct($request); $this->webRequest = $request; $this->content = $content; $this->key = $key; }
/** * @param Request $request * @param object $object * @param Factory $factory <- */ function __construct(Request $request, $object, Factory $factory) { parent::__construct($request); $this->object = $object; $this->factory = $factory; $this->filters = $factory->getInstance(FilterRegistry::class); $this->parameterInjectionFilter = function (\ReflectionParameter $parameter) { $pattern = '/@param.+\\$' . $parameter->getName() . '.+' . DefaultProvider::INJECTION_TOKEN . '/'; return preg_match($pattern, $parameter->getDeclaringFunction()->getDocComment()); }; }
private function whenIRouteTheRequest() { $this->target = $this->router->route($this->request->request); $this->response = $this->target->respond(); }
/** * @param Request $request * @param callable $callback */ function __construct(Request $request, $callback) { parent::__construct($request); $this->callback = $callback; }
function __construct(Request $request, Responding $object) { parent::__construct($request); $this->object = $object; }
/** * @param $str */ private function thenTheTargetShouldRespond($str) { $this->assertEquals($str, $this->target->respond()); }