Skip to content

Commit

Permalink
Merge pull request #47 from seanmangar/master
Browse files Browse the repository at this point in the history
Rename Resource class name
  • Loading branch information
thilanga authored Sep 16, 2017
2 parents 690bdf0 + 8b4d52c commit 5db7985
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Action extends Section
/**
* Parent resource of the action.
*
* @var \Dingo\Blueprint\Resource
* @var \Dingo\Blueprint\RestResource
*/
protected $resource;

Expand Down Expand Up @@ -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;
}
Expand Down
10 changes: 5 additions & 5 deletions src/Blueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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));

Expand All @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion src/Resource.php → src/RestResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Illuminate\Support\Collection;
use ReflectionClass;

class Resource extends Section
class RestResource extends Section
{
/**
* Resource identifier.
Expand Down

0 comments on commit 5db7985

Please sign in to comment.