@@ -211,7 +211,7 @@ |
||
| 211 | 211 | private function replacePlaceholders(string $content): string |
| 212 | 212 | { |
| 213 | 213 | $placeholders = [ |
| 214 | - '{{MODULE_NAMESPACE}}' => $this->getBaseNamespace() .'\\' . $this->getModuleName(), |
|
| 214 | + '{{MODULE_NAMESPACE}}' => $this->getBaseNamespace() . '\\' . $this->getModuleName(), |
|
| 215 | 215 | '{{MODULE_NAME}}' => $this->getModuleName(), |
| 216 | 216 | ]; |
| 217 | 217 | |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($route) { |
|
| 3 | +return function($route) { |
|
| 4 | 4 | $route->get('/', 'MainController', 'index'); |
| 5 | 5 | }; |
| 6 | 6 | \ No newline at end of file |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | ]); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - /** |
|
| 49 | + /** |
|
| 50 | 50 | * Action - display home page |
| 51 | 51 | * @param Response $response |
| 52 | 52 | * @param ViewFactory $view |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($route) { |
|
| 3 | +return function($route) { |
|
| 4 | 4 | $route->get('/', 'MainController', 'index'); |
| 5 | 5 | }; |
| 6 | 6 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function apply(Request $request, Response $response, Closure $next) |
| 38 | 38 | { |
| 39 | - $postId = (string)route_param('id'); |
|
| 39 | + $postId = (string) route_param('id'); |
|
| 40 | 40 | |
| 41 | 41 | $post = ServiceFactory::get(PostService::class)->getPost($postId); |
| 42 | 42 | |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $this->validator = new Validator(); |
| 44 | 44 | |
| 45 | - $this->validator->addValidation('uniqueUser', function ($value) { |
|
| 45 | + $this->validator->addValidation('uniqueUser', function($value) { |
|
| 46 | 46 | $userModel = ModelFactory::get(User::class); |
| 47 | 47 | return empty($userModel->findOneBy('email', $value)->asArray()); |
| 48 | 48 | }); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | */ |
| 109 | 109 | public function myPosts(Response $response, PostTransformer $transformer) |
| 110 | 110 | { |
| 111 | - $myPosts = $this->postService->getMyPosts((int)auth()->user()->id); |
|
| 111 | + $myPosts = $this->postService->getMyPosts((int) auth()->user()->id); |
|
| 112 | 112 | |
| 113 | 113 | $response->json([ |
| 114 | 114 | 'status' => 'success', |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | public function create(Request $request, Response $response) |
| 125 | 125 | { |
| 126 | 126 | $postData = [ |
| 127 | - 'user_id' => (int)auth()->user()->id, |
|
| 127 | + 'user_id' => (int) auth()->user()->id, |
|
| 128 | 128 | 'title' => $request->get('title', null, true), |
| 129 | 129 | 'content' => $request->get('content', null, true), |
| 130 | 130 | 'image' => '', |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | public function verify(Request $request, Response $response) |
| 158 | 158 | { |
| 159 | 159 | try { |
| 160 | - auth()->verifyOtp((int)$request->get('otp'), $request->get('code')); |
|
| 160 | + auth()->verifyOtp((int) $request->get('otp'), $request->get('code')); |
|
| 161 | 161 | |
| 162 | 162 | $response->json([ |
| 163 | 163 | 'status' => self::STATUS_SUCCESS |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($route) { |
|
| 3 | +return function($route) { |
|
| 4 | 4 | $route->get('[:alpha:2]?/posts', 'PostController', 'posts')->name('posts'); |
| 5 | 5 | $route->get('[:alpha:2]?/post/[id=:any]', 'PostController', 'post'); |
| 6 | 6 | |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | $route->get('[:alpha:2]?/resend/[code=:any]', 'AuthController', 'resend')->middlewares(['Resend']); |
| 13 | 13 | $route->post('[:alpha:2]?/verify', 'AuthController', 'verify')->middlewares(['Verify']); |
| 14 | 14 | |
| 15 | - $route->group('auth', function ($route) { |
|
| 15 | + $route->group('auth', function($route) { |
|
| 16 | 16 | $route->get('[:alpha:2]?/me', 'AuthController', 'me'); |
| 17 | 17 | $route->get('[:alpha:2]?/signout', 'AuthController', 'signout')->middlewares(['Signout']); |
| 18 | 18 | $route->get('[:alpha:2]?/my-posts', 'PostController', 'myPosts')->middlewares(['Editor']); |