@@ -136,7 +136,7 @@ function request(): Request
136136 * @return DB
137137 * @throws ConnectionException
138138 */
139- function db (string $ name = null , callable $ cb = null ): DB
139+ function db (? string $ name = null , ? callable $ cb = null ): DB
140140 {
141141 if (func_num_args () == 0 ) {
142142 return DB ::getInstance ();
@@ -195,7 +195,7 @@ function view(string $template, int|array $data = [], int $code = 200): View
195195 * @throws ConnectionException
196196 * @deprecated
197197 */
198- function table (string $ name , string $ connexion = null ): QueryBuilder
198+ function table (string $ name , ? string $ connexion = null ): QueryBuilder
199199 {
200200 if (is_string ($ connexion )) {
201201 db ($ connexion );
@@ -213,7 +213,7 @@ function table(string $name, string $connexion = null): QueryBuilder
213213 * @param string|null $name
214214 * @return int
215215 */
216- function get_last_insert_id (string $ name = null ): int
216+ function get_last_insert_id (? string $ name = null ): int
217217 {
218218 return DB ::lastInsertId ($ name );
219219 }
@@ -228,7 +228,7 @@ function get_last_insert_id(string $name = null): int
228228 * @return Bow\Database\QueryBuilder
229229 * @throws ConnectionException
230230 */
231- function db_table (string $ name , string $ connexion = null ): QueryBuilder
231+ function db_table (string $ name , ? string $ connexion = null ): QueryBuilder
232232 {
233233 if (is_string ($ connexion )) {
234234 db ($ connexion );
@@ -362,7 +362,7 @@ function sep(): string
362362 * @return ?array
363363 * @throws SessionException
364364 */
365- function create_csrf_token (int $ time = null ): ?array
365+ function create_csrf_token (? int $ time = null ): ?array
366366 {
367367 return Tokenize::csrf ($ time );
368368 }
@@ -463,7 +463,7 @@ function verify_csrf(string $token, bool $strict = false): bool
463463 * @return bool
464464 * @throws SessionException
465465 */
466- function csrf_time_is_expired (string $ time = null ): bool
466+ function csrf_time_is_expired (? string $ time = null ): bool
467467 {
468468 return Tokenize::csrfExpired ($ time );
469469 }
@@ -580,7 +580,7 @@ function get_header(string $key): ?string
580580 * @param string|null $path
581581 * @return Redirect
582582 */
583- function redirect (string $ path = null ): Redirect
583+ function redirect (? string $ path = null ): Redirect
584584 {
585585 $ redirect = Redirect::getInstance ();
586586
@@ -600,7 +600,7 @@ function redirect(string $path = null): Redirect
600600 * @param array $parameters
601601 * @return string
602602 */
603- function url (string |array $ url = null , array $ parameters = []): string
603+ function url (string |array | null $ url = null , array $ parameters = []): string
604604 {
605605 $ current = trim (request ()->url (), '/ ' );
606606
@@ -783,9 +783,9 @@ function flash(string $key, string $message): mixed
783783 * @return MailAdapterInterface|bool
784784 */
785785 function email (
786- string $ view = null ,
786+ ? string $ view = null ,
787787 array $ data = [],
788- callable $ cb = null
788+ ? callable $ cb = null
789789 ): MailAdapterInterface |bool {
790790 if ($ view === null ) {
791791 return Mail::getInstance ();
@@ -820,7 +820,7 @@ function raw_email(string $to, string $subject, string $message, array $headers
820820 * @return mixed
821821 * @throws SessionException
822822 */
823- function session (array |string $ value = null , mixed $ default = null ): mixed
823+ function session (array |string | null $ value = null , mixed $ default = null ): mixed
824824 {
825825 if ($ value == null ) {
826826 return Session::getInstance ();
@@ -849,7 +849,7 @@ function session(array|string $value = null, mixed $default = null): mixed
849849 * @return string|array|object|null
850850 */
851851 function cookie (
852- string $ key = null ,
852+ ? string $ key = null ,
853853 mixed $ data = null ,
854854 int $ expiration = 3600
855855 ): string |array |object |null {
@@ -990,7 +990,7 @@ function app_file_system(string $disk): DiskFilesystemService
990990 * @return mixed
991991 * @throws ErrorException
992992 */
993- function cache (string $ key = null , mixed $ value = null , int $ ttl = null ): mixed
993+ function cache (? string $ key = null , mixed $ value = null , ? int $ ttl = null ): mixed
994994 {
995995 $ instance = Cache::getInstance ();
996996
@@ -1039,7 +1039,7 @@ function app_now(): Carbon
10391039 * @param mixed $hash_value
10401040 * @return bool|string
10411041 */
1042- function app_hash (string $ data , string $ hash_value = null ): bool |string
1042+ function app_hash (string $ data , ? string $ hash_value = null ): bool |string
10431043 {
10441044 if (!is_null ($ hash_value )) {
10451045 return Hash::check ($ data , $ hash_value );
@@ -1058,7 +1058,7 @@ function app_hash(string $data, string $hash_value = null): bool|string
10581058 * @return bool|string
10591059 * @deprecated
10601060 */
1061- function bow_hash (string $ data , string $ hash_value = null ): bool |string
1061+ function bow_hash (string $ data , ? string $ hash_value = null ): bool |string
10621062 {
10631063 return app_hash ($ data , $ hash_value );
10641064 }
@@ -1074,7 +1074,7 @@ function bow_hash(string $data, string $hash_value = null): bool|string
10741074 * @return string|Translator
10751075 */
10761076 function app_trans (
1077- string $ key = null ,
1077+ ? string $ key = null ,
10781078 array $ data = [],
10791079 bool $ choose = false
10801080 ): string |Translator {
0 commit comments