@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\ApiSkeleton\Serialization; |
| 6 | 6 | |
@@ -66,10 +66,10 @@ discard block |
||
| 66 | 66 | public function getLinkMappings(): array |
| 67 | 67 | { |
| 68 | 68 | return [ |
| 69 | - new LinkMapping('self', new CallbackLinkSerializer(function (Request $request) { |
|
| 69 | + new LinkMapping('self', new CallbackLinkSerializer(function(Request $request) { |
|
| 70 | 70 | return $this->linkGenerator->generateLink($request, 'index'); |
| 71 | 71 | })), |
| 72 | - new LinkMapping('courses', new CallbackLinkSerializer(function (Request $request) { |
|
| 72 | + new LinkMapping('courses', new CallbackLinkSerializer(function(Request $request) { |
|
| 73 | 73 | return $this->linkGenerator->generateLink($request, 'course_search'); |
| 74 | 74 | })), |
| 75 | 75 | ]; |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\ApiSkeleton\Serialization; |
| 6 | 6 | |
@@ -77,17 +77,17 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | return [ |
| 79 | 79 | new LinkMapping('read', new CallbackLinkSerializer( |
| 80 | - function (Request $request, Course $course) { |
|
| 80 | + function(Request $request, Course $course) { |
|
| 81 | 81 | return $this->linkGenerator->generateLink($request, 'course_read', ['id' => $course->getId()]); |
| 82 | 82 | } |
| 83 | 83 | )), |
| 84 | 84 | new LinkMapping('update', new CallbackLinkSerializer( |
| 85 | - function (Request $request, Course $course) { |
|
| 85 | + function(Request $request, Course $course) { |
|
| 86 | 86 | return $this->linkGenerator->generateLink($request, 'course_update', ['id' => $course->getId()]); |
| 87 | 87 | } |
| 88 | 88 | )), |
| 89 | 89 | new LinkMapping('delete', new CallbackLinkSerializer( |
| 90 | - function (Request $request, Course $course) { |
|
| 90 | + function(Request $request, Course $course) { |
|
| 91 | 91 | return $this->linkGenerator->generateLink($request, 'course_delete', ['id' => $course->getId()]); |
| 92 | 92 | } |
| 93 | 93 | )), |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\ApiSkeleton\Serialization; |
| 6 | 6 | |
@@ -87,12 +87,12 @@ discard block |
||
| 87 | 87 | { |
| 88 | 88 | return [ |
| 89 | 89 | new LinkMapping('self', new CallbackLinkSerializer( |
| 90 | - function (Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 90 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 91 | 91 | return $this->linkGenerator->generateLink($request, 'course_search', [], $fields); |
| 92 | 92 | } |
| 93 | 93 | )), |
| 94 | 94 | new LinkMapping('prev', new CallbackLinkSerializer( |
| 95 | - function (Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 95 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 96 | 96 | if ($courseSearch->getPage() > 1) { |
| 97 | 97 | $fields['page'] -= 1; |
| 98 | 98 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | )), |
| 105 | 105 | new LinkMapping('next', new CallbackLinkSerializer( |
| 106 | - function (Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 106 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 107 | 107 | if ($fields['page'] < $courseSearch->getPages()) { |
| 108 | 108 | $fields['page'] += 1; |
| 109 | 109 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | )), |
| 116 | 116 | new LinkMapping('create', new CallbackLinkSerializer( |
| 117 | - function (Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 117 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 118 | 118 | return $this->linkGenerator->generateLink($request, 'course_create'); |
| 119 | 119 | } |
| 120 | 120 | )), |