@@ -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\Model; |
| 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\Repository; |
| 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 | |
@@ -86,12 +86,12 @@ discard block |
||
| 86 | 86 | { |
| 87 | 87 | return [ |
| 88 | 88 | new LinkMapping('self', new CallbackLinkSerializer( |
| 89 | - function (Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 89 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 90 | 90 | return $this->linkGenerator->generateLink('course_search', [], $this->getQueryFields($fields)); |
| 91 | 91 | } |
| 92 | 92 | )), |
| 93 | 93 | new LinkMapping('prev', new CallbackLinkSerializer( |
| 94 | - function (Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 94 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 95 | 95 | if ($courseSearch->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, CourseSearch $courseSearch, array $fields) { |
|
| 105 | + function(Request $request, CourseSearch $courseSearch, array $fields) { |
|
| 106 | 106 | if ($fields['page'] < $courseSearch->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 () { |
|
| 116 | + function() { |
|
| 117 | 117 | return $this->linkGenerator->generateLink('course_create'); |
| 118 | 118 | } |
| 119 | 119 | )), |
@@ -88,7 +88,7 @@ |
||
| 88 | 88 | new Error( |
| 89 | 89 | $path.'[_all]', |
| 90 | 90 | 'constraint.uniquemodel.notunique', |
| 91 | - ['uniqueProperties' => 'name'] |
|
| 91 | + ['uniqueProperties' => 'name'] |
|
| 92 | 92 | ), |
| 93 | 93 | ]; |
| 94 | 94 | } |
@@ -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\Validation; |
| 6 | 6 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | new PropertyMapping('active', [new NotNullConstraint(), new NotBlankConstraint()]), |
| 76 | 76 | new PropertyMapping('documents', [ |
| 77 | 77 | new ModelCollectionConstraint(), |
| 78 | - new CallbackConstraint(function (string $path, $collection) { |
|
| 78 | + new CallbackConstraint(function(string $path, $collection) { |
|
| 79 | 79 | if (!$collection instanceof ModelCollectionInterface) { |
| 80 | 80 | return []; |
| 81 | 81 | } |
@@ -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 | |
@@ -21,11 +21,11 @@ discard block |
||
| 21 | 21 | $container->register(new SwiftmailerServiceProvider()); |
| 22 | 22 | |
| 23 | 23 | // extend providers |
| 24 | -$container['api-http.response.factory'] = function () { |
|
| 24 | +$container['api-http.response.factory'] = function() { |
|
| 25 | 25 | return new ResponseFactory(); |
| 26 | 26 | }; |
| 27 | 27 | |
| 28 | -$container->extend('translator.providers', function (array $providers) use ($container) { |
|
| 28 | +$container->extend('translator.providers', function(array $providers) use ($container) { |
|
| 29 | 29 | $providers[] = new LocaleTranslationProvider( |
| 30 | 30 | 'de', |
| 31 | 31 | array_replace( |
@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | require_once __DIR__.'/services/deserialization.php'; |
| 52 | 52 | |
| 53 | 53 | // error |
| 54 | -$container[ErrorManager::class] = function () use ($container) { |
|
| 54 | +$container[ErrorManager::class] = function() use ($container) { |
|
| 55 | 55 | return new ErrorManager($container['translator']); |
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | 58 | // http |
| 59 | -$container[ContentNegotiator::class] = function () { |
|
| 59 | +$container[ContentNegotiator::class] = function() { |
|
| 60 | 60 | return new ContentNegotiator(); |
| 61 | 61 | }; |
| 62 | 62 | |
@@ -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 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | |
| 20 | 20 | $container->register(new ValidationProvider()); |
| 21 | 21 | |
| 22 | -$container->extend('validator.objectmappings', function (array $objectMappings) use ($container) { |
|
| 22 | +$container->extend('validator.objectmappings', function(array $objectMappings) use ($container) { |
|
| 23 | 23 | $objectMappings[] = new LazyObjectMapping( |
| 24 | 24 | $container, |
| 25 | 25 | CourseMapping::class, |
@@ -41,14 +41,14 @@ discard block |
||
| 41 | 41 | return $objectMappings; |
| 42 | 42 | }); |
| 43 | 43 | |
| 44 | -$container[CourseMapping::class] = function () use ($container) { |
|
| 44 | +$container[CourseMapping::class] = function() use ($container) { |
|
| 45 | 45 | return new CourseMapping($container[Resolver::class]); |
| 46 | 46 | }; |
| 47 | 47 | |
| 48 | -$container[CourseSearchMapping::class] = function () { |
|
| 48 | +$container[CourseSearchMapping::class] = function() { |
|
| 49 | 49 | return new CourseSearchMapping(); |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | -$container[DocumentMapping::class] = function () use ($container) { |
|
| 52 | +$container[DocumentMapping::class] = function() use ($container) { |
|
| 53 | 53 | return new DocumentMapping(); |
| 54 | 54 | }; |