diff --git a/app/Configurations/ApplicationConfiguration.php b/app/Configurations/ApplicationConfiguration.php
index fe047b6..c918d8c 100644
--- a/app/Configurations/ApplicationConfiguration.php
+++ b/app/Configurations/ApplicationConfiguration.php
@@ -10,7 +10,7 @@ class ApplicationConfiguration extends Configuration
/**
* Launch configuration
*
- * @param Loader $config
+ * @param Loader $config
* @return void
*/
public function create(Loader $config): void
diff --git a/app/Controllers/Controller.php b/app/Controllers/Controller.php
index 5a0a755..8b0176e 100644
--- a/app/Controllers/Controller.php
+++ b/app/Controllers/Controller.php
@@ -89,8 +89,8 @@ public function config(?string $key = null, mixed $setting = null)
/**
* Get Database Instance
*
- * @param ?string $name
- * @param ?callable $cb
+ * @param ?string $name
+ * @param ?callable $cb
* @return Database
*/
public function db(?string $name = null, ?callable $cb = null)
@@ -101,8 +101,8 @@ public function db(?string $name = null, ?callable $cb = null)
/**
* Alias of table
*
- * @param $name
- * @param string $connexion
+ * @param $name
+ * @param string $connexion
* @return QueryBuilder
*/
public function table(string $name, ?string $connexion = null): QueryBuilder
@@ -133,8 +133,8 @@ public function getToken(): string
/**
* Make validation
*
- * @param Request $request
- * @param array $rule
+ * @param Request $request
+ * @param array $rule
* @return Validate
*/
protected function validate(Request $request, array $rule): Validate
@@ -147,10 +147,10 @@ protected function validate(Request $request, array $rule): Validate
/**
* Format API response
*
- * @param string $message
- * @param string $code
- * @param array $data
- * @param int $status
+ * @param string $message
+ * @param string $code
+ * @param array $data
+ * @param int $status
* @return array
*/
public function nativeApiErrorResponse(
@@ -170,7 +170,7 @@ public function nativeApiErrorResponse(
/**
* Fire Event
*
- * @param string $event
+ * @param string $event
* @return void
*/
public function emit($event)
diff --git a/app/Controllers/WelcomeController.php b/app/Controllers/WelcomeController.php
index 100d24d..21ae328 100644
--- a/app/Controllers/WelcomeController.php
+++ b/app/Controllers/WelcomeController.php
@@ -10,7 +10,7 @@ class WelcomeController extends Controller
/**
* Show index
*
- * @param Request $request
+ * @param Request $request
* @return string|null
*/
public function __invoke(Request $request): ?string
diff --git a/app/Exceptions/ErrorHandle.php b/app/Exceptions/ErrorHandle.php
index ac3a254..9885c0f 100644
--- a/app/Exceptions/ErrorHandle.php
+++ b/app/Exceptions/ErrorHandle.php
@@ -12,7 +12,7 @@ class ErrorHandle extends BaseErrorHandler
/**
* handle the error
*
- * @param Exception $exception
+ * @param Exception $exception
* @return mixed|string
*/
public function handle(Exception $exception): mixed
@@ -22,20 +22,26 @@ public function handle(Exception $exception): mixed
}
if (
- $exception instanceof ModelNotFoundException
+ $exception instanceof ModelNotFoundException
|| $exception instanceof HttpException
) {
$code = $exception->getStatusCode();
- return $this->render('errors.' . $code, [
+ return $this->render(
+ 'errors.' . $code,
+ [
'code' => 404,
'exception' => $exception
- ]);
+ ]
+ );
}
- return $this->render('errors.500', [
+ return $this->render(
+ 'errors.500',
+ [
'code' => 404,
'exception' => $exception
- ]);
+ ]
+ );
}
}
diff --git a/app/Kernel.php b/app/Kernel.php
index f73090e..b328a26 100644
--- a/app/Kernel.php
+++ b/app/Kernel.php
@@ -38,6 +38,7 @@ public function namespaces(): array
'exception' => 'App\\Exceptions',
'producer' => 'App\\Producers',
'command' => 'App\\Commands',
+ 'messaging' => 'App\\Messaging',
];
}
diff --git a/app/Middlewares/GuestMiddleware.php b/app/Middlewares/GuestMiddleware.php
index 336dd88..956eef6 100644
--- a/app/Middlewares/GuestMiddleware.php
+++ b/app/Middlewares/GuestMiddleware.php
@@ -11,9 +11,9 @@ class GuestMiddleware implements BaseMiddleware
/**
* Launch function of the middleware.
*
- * @param Request $request
+ * @param Request $request
* @param callable $next
- * @param array $args
+ * @param array $args
* @return mixed
*/
public function process(Request $request, callable $next, array $args = []): mixed
diff --git a/app/Services/UserService.php b/app/Services/UserService.php
index 69b03d5..d51e031 100644
--- a/app/Services/UserService.php
+++ b/app/Services/UserService.php
@@ -35,9 +35,9 @@ public function fetchAll(): ?Collection
/**
* Create new user
*
- * @param string $name
- * @param string $lastname
- * @param string $email
+ * @param string $name
+ * @param string $lastname
+ * @param string $email
* @return User|null
*/
public function create(string $name, string $lastname, string $email): ?User
diff --git a/config/helpers.php b/config/helpers.php
index 3cd0606..6f0358b 100644
--- a/config/helpers.php
+++ b/config/helpers.php
@@ -4,7 +4,7 @@
/**
* Get mix file chunk hash version
*
- * @param string $path
+ * @param string $path
* @return string
* @throws Exception
*/
@@ -32,7 +32,7 @@ function mix(string $path)
/**
* Get public directory
*
- * @param string $path
+ * @param string $path
* @return string
*/
function public_path(string $path = ''): string
@@ -45,7 +45,7 @@ function public_path(string $path = ''): string
/**
* Get frontend directory
*
- * @param string $path
+ * @param string $path
* @return string
*/
function frontend_path(string $path = '')
@@ -58,7 +58,7 @@ function frontend_path(string $path = '')
/**
* Get storages directory
*
- * @param string $path
+ * @param string $path
* @return string
*/
function storage_path(string $path = '')
@@ -84,7 +84,7 @@ function base_path($path = ''): string
* Generate a random code.
* Can be used to hide the name of form fields.
*
- * @param int $len
+ * @param int $len
* @return string
*/
function gen_slix(int $len = 4): string
diff --git a/migrations/Version20170407084225CreateUsersTable.php b/migrations/Version20170407084225CreateUsersTable.php
index 82cff06..43e0bca 100644
--- a/migrations/Version20170407084225CreateUsersTable.php
+++ b/migrations/Version20170407084225CreateUsersTable.php
@@ -10,15 +10,18 @@ class Version20170407084225CreateUsersTable extends Migration
*/
public function up(): void
{
- $this->create("users", function (SQLGenerator $table) {
- $table->addIncrement('id');
- $table->addString('name');
- $table->addString('email', ['unique' => true]);
- $table->addString('description', ['nullable' => true]);
- $table->addString('password');
- $table->addTimestamps();
- $table->withEngine('InnoDB');
- });
+ $this->create(
+ "users",
+ function (SQLGenerator $table) {
+ $table->addIncrement('id');
+ $table->addString('name');
+ $table->addString('email', ['unique' => true]);
+ $table->addString('description', ['nullable' => true]);
+ $table->addString('password');
+ $table->addTimestamps();
+ $table->withEngine('InnoDB');
+ }
+ );
}
/**
diff --git a/readme.md b/readme.md
index 88e19a7..0cbf327 100644
--- a/readme.md
+++ b/readme.md
@@ -1,4 +1,4 @@
-
+
## Bow Framework
diff --git a/routes/console.php b/routes/console.php
index cecf8f9..585e17e 100644
--- a/routes/console.php
+++ b/routes/console.php
@@ -3,6 +3,9 @@
use Bow\Console\Color;
use Bow\Console\Argument;
-$console->addCommand('hello', function (Argument $argument) {
- echo Color::green("hello, bow task runner.");
-});
+$console->addCommand(
+ 'hello',
+ function (Argument $argument) {
+ echo Color::green("hello, bow task runner.");
+ }
+);
diff --git a/seeders/_database.php b/seeders/_database.php
index aba6a35..953a9ad 100644
--- a/seeders/_database.php
+++ b/seeders/_database.php
@@ -1,6 +1,6 @@