@@ -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; |
| 6 | 6 | |
@@ -16,9 +16,9 @@ discard block |
||
| 16 | 16 | /* @var App $app */ |
| 17 | 17 | /* @var Container $container */ |
| 18 | 18 | |
| 19 | -$app->group('/api', function () use ($app, $container) { |
|
| 19 | +$app->group('/api', function() use ($app, $container) { |
|
| 20 | 20 | $app->get('', IndexController::class)->setName('index'); |
| 21 | - $app->group('/samples', function () use ($app, $container) { |
|
| 21 | + $app->group('/samples', function() use ($app, $container) { |
|
| 22 | 22 | $app->get('', SampleSearchController::class)->setName('sample_search'); |
| 23 | 23 | $app->post('', SampleCreateController::class)->setName('sample_create'); |
| 24 | 24 | $app->get('/{id}', SampleReadController::class)->setName('sample_read'); |
@@ -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\Error; |
| 6 | 6 | |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function createByValidationErrors(array $errors, string $locale, string $scope, string $type): Error |
| 51 | 51 | { |
| 52 | - $nestedErrorMessage = new NestedErrorMessages($errors, function (string $key, array $arguments) use ($locale) { |
|
| 52 | + $nestedErrorMessage = new NestedErrorMessages($errors, function(string $key, array $arguments) use ($locale) { |
|
| 53 | 53 | return $this->translator->translate($locale, $key, $arguments); |
| 54 | 54 | }); |
| 55 | 55 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\ApiSkeleton\Error; |
| 6 | 6 | |
@@ -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 | |
@@ -64,10 +64,10 @@ discard block |
||
| 64 | 64 | public function getLinkMappings(): array |
| 65 | 65 | { |
| 66 | 66 | return [ |
| 67 | - new LinkMapping('self', new CallbackLinkSerializer(function () { |
|
| 67 | + new LinkMapping('self', new CallbackLinkSerializer(function() { |
|
| 68 | 68 | return $this->linkGenerator->generateLink('index'); |
| 69 | 69 | })), |
| 70 | - new LinkMapping('samples', new CallbackLinkSerializer(function () { |
|
| 70 | + new LinkMapping('samples', new CallbackLinkSerializer(function() { |
|
| 71 | 71 | return $this->linkGenerator->generateLink('sample_search'); |
| 72 | 72 | })), |
| 73 | 73 | ]; |
@@ -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 | |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | return [ |
| 88 | 88 | new LinkMapping('self', new CallbackLinkSerializer( |
| 89 | - function (Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 89 | + function(Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 90 | 90 | return $this->linkGenerator->generateLink('sample_search', [], $fields); |
| 91 | 91 | } |
| 92 | 92 | )), |
| 93 | 93 | new LinkMapping('prev', new CallbackLinkSerializer( |
| 94 | - function (Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 94 | + function(Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 95 | 95 | if ($sampleSearch->getPage() > 1) { |
| 96 | 96 | $fields['page'] -= 1; |
| 97 | 97 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | } |
| 103 | 103 | )), |
| 104 | 104 | new LinkMapping('next', new CallbackLinkSerializer( |
| 105 | - function (Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 105 | + function(Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 106 | 106 | if ($fields['page'] < $sampleSearch->getPages()) { |
| 107 | 107 | $fields['page'] += 1; |
| 108 | 108 | |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | } |
| 114 | 114 | )), |
| 115 | 115 | new LinkMapping('create', new CallbackLinkSerializer( |
| 116 | - function (Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 116 | + function(Request $request, SampleSearch $sampleSearch, array $fields) { |
|
| 117 | 117 | return $this->linkGenerator->generateLink('sample_create'); |
| 118 | 118 | } |
| 119 | 119 | )), |
@@ -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 | |
@@ -69,17 +69,17 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | return [ |
| 71 | 71 | new LinkMapping('read', new CallbackLinkSerializer( |
| 72 | - function (Request $request, Sample $sample) { |
|
| 72 | + function(Request $request, Sample $sample) { |
|
| 73 | 73 | return $this->linkGenerator->generateLink('sample_read', ['id' => $sample->getId()]); |
| 74 | 74 | } |
| 75 | 75 | )), |
| 76 | 76 | new LinkMapping('update', new CallbackLinkSerializer( |
| 77 | - function (Request $request, Sample $sample) { |
|
| 77 | + function(Request $request, Sample $sample) { |
|
| 78 | 78 | return $this->linkGenerator->generateLink('sample_update', ['id' => $sample->getId()]); |
| 79 | 79 | } |
| 80 | 80 | )), |
| 81 | 81 | new LinkMapping('delete', new CallbackLinkSerializer( |
| 82 | - function (Request $request, Sample $sample) { |
|
| 82 | + function(Request $request, Sample $sample) { |
|
| 83 | 83 | return $this->linkGenerator->generateLink('sample_delete', ['id' => $sample->getId()]); |
| 84 | 84 | } |
| 85 | 85 | )), |
@@ -1,6 +1,6 @@ |
||
| 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 | |
@@ -1,6 +1,6 @@ |
||
| 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 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace Chubbyphp\ApiSkeleton\Search; |
| 6 | 6 | |