Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix word deprecated for faker/faker:1.4 #836

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/documenting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This package generates documentation from your code using mainly annotations (in doc block comments).

## Grouping endpoints
All endpoints are grouped for easy organization. Using `@group` in a controller doc block creates a Group within the API documentation. All routes handled by that controller will be grouped under this group in the table of conetns shown in the sidebar.
All endpoints are grouped for easy organization. Using `@group` in a controller doc block creates a Group within the API documentation. All routes handled by that controller will be grouped under this group in the table of contents shown in the sidebar.

The short description after the `@group` should be unique to allow anchor tags to navigate to this section. A longer description can be included below. Custom formatting and `<aside>` tags are also supported. (see the [Documentarian docs](http://marcelpociot.de/documentarian/installation/markdown_syntax))

Expand Down
2 changes: 1 addition & 1 deletion src/Extracting/ParamHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function generateDummyValue(string $type)
return $faker->boolean();
},
'string' => function () use ($faker) {
return $faker->word;
return $faker->word();
},
'array' => function () {
return [];
Expand Down
10 changes: 5 additions & 5 deletions src/Extracting/Strategies/Metadata/GetFromDocBlocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public function __invoke(Route $route, ReflectionClass $controller, ReflectionMe
list($routeGroupName, $routeGroupDescription, $routeTitle) = $this->getRouteGroupDescriptionAndTitle($methodDocBlock, $docBlocks['class']);

return [
'groupName' => $routeGroupName,
'groupDescription' => $routeGroupDescription,
'title' => $routeTitle ?: $methodDocBlock->getShortDescription(),
'description' => $methodDocBlock->getLongDescription()->getContents(),
'authenticated' => $this->getAuthStatusFromDocBlock($methodDocBlock->getTags()),
'groupName' => $routeGroupName,
'groupDescription' => $routeGroupDescription,
'title' => $routeTitle ?: $methodDocBlock->getShortDescription(),
'description' => $methodDocBlock->getLongDescription()->getContents(),
'authenticated' => $this->getAuthStatusFromDocBlock($methodDocBlock->getTags()),
];
}

Expand Down
26 changes: 13 additions & 13 deletions tests/Unit/GeneratorTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,21 +467,21 @@ public function can_parse_apiresourcecollection_tags_with_collection_class()
$content = json_decode($response['content'], true);
$this->assertIsArray($content);
$this->assertArraySubset([
'data' => [
[
'id' => 4,
'name' => 'Tested Again',
'email' => '[email protected]',
],
[
'id' => 4,
'name' => 'Tested Again',
'email' => '[email protected]',
],
'data' => [
[
'id' => 4,
'name' => 'Tested Again',
'email' => '[email protected]',
],
'links' => [
'self' => 'link-value',
[
'id' => 4,
'name' => 'Tested Again',
'email' => '[email protected]',
],
],
'links' => [
'self' => 'link-value',
],
], $content);
}

Expand Down