diff --git a/src/Action.php b/src/Action.php index f6a8b94..9d88824 100644 --- a/src/Action.php +++ b/src/Action.php @@ -25,7 +25,7 @@ class Action extends Section /** * Parent resource of the action. * - * @var \Dingo\Blueprint\Resource + * @var \Dingo\Blueprint\RestResource */ protected $resource; @@ -178,11 +178,11 @@ public function getMethod() /** * Set the parent resource on the action. * - * @param \Dingo\Blueprint\Resource $resource + * @param \Dingo\Blueprint\RestResource $resource * * @return void */ - public function setResource(Resource $resource) + public function setResource(RestResource $resource) { $this->resource = $resource; } diff --git a/src/Blueprint.php b/src/Blueprint.php index b95a66e..e1a12fa 100644 --- a/src/Blueprint.php +++ b/src/Blueprint.php @@ -108,7 +108,7 @@ public function generate(Collection $controllers, $name, $version, $includePath $annotations = new Collection($this->reader->getClassAnnotations($controller)); - return new Resource($controller->getName(), $controller, $annotations, $actions); + return new RestResource($controller->getName(), $controller, $annotations, $actions); }); $contents = $this->generateContentsFromResources($resources, $name); @@ -268,11 +268,11 @@ protected function appendParameters(&$contents, Collection $parameters) * * @param string $contents * @param \Dingo\Blueprint\Annotation\Response $response - * @param \Dingo\Blueprint\Resource $resource + * @param \Dingo\Blueprint\RestResource $resource * * @return void */ - protected function appendResponse(&$contents, Annotation\Response $response, Resource $resource) + protected function appendResponse(&$contents, Annotation\Response $response, RestResource $resource) { $this->appendSection($contents, sprintf('Response %s', $response->statusCode)); @@ -298,11 +298,11 @@ protected function appendResponse(&$contents, Annotation\Response $response, Res * * @param string $contents * @param \Dingo\Blueprint\Annotation\Request $request - * @param \Dingo\Blueprint\Resource $resource + * @param \Dingo\Blueprint\RestResource $resource * * @return void */ - protected function appendRequest(&$contents, $request, Resource $resource) + protected function appendRequest(&$contents, $request, RestResource $resource) { $this->appendSection($contents, 'Request'); diff --git a/src/Resource.php b/src/RestResource.php similarity index 99% rename from src/Resource.php rename to src/RestResource.php index 103e40e..fe6194b 100644 --- a/src/Resource.php +++ b/src/RestResource.php @@ -5,7 +5,7 @@ use Illuminate\Support\Collection; use ReflectionClass; -class Resource extends Section +class RestResource extends Section { /** * Resource identifier.