@@ -18,6 +18,6 @@ |
||
| 18 | 18 | Cli::printer("Enter password: ", "magneta"); |
| 19 | 19 | $password = trim(fgets(fopen("php://stdin", "r"))); |
| 20 | 20 | |
| 21 | - Cli::printer(Auth::bcrypt($password) . PHP_EOL, "cyan", ); |
|
| 21 | + Cli::printer(Auth::bcrypt($password) . PHP_EOL, "cyan",); |
|
| 22 | 22 | } |
| 23 | 23 | } |
@@ -19,9 +19,9 @@ |
||
| 19 | 19 | $yaml = Yaml::dump($array); |
| 20 | 20 | file_put_contents("config/$filename.yml", $yaml); |
| 21 | 21 | |
| 22 | - Cli::printer("Yml was created" . PHP_EOL, "cyan", ); |
|
| 22 | + Cli::printer("Yml was created" . PHP_EOL, "cyan",); |
|
| 23 | 23 | } catch (Exception $e) { |
| 24 | - echo 'Exception: ', $e->getMessage(), "\n"; |
|
| 24 | + echo 'Exception: ', $e->getMessage(), "\n"; |
|
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | } |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class PgSQL |
| 8 | 8 | { |
| 9 | - public function __construct(protected $table){} |
|
| 9 | + public function __construct(protected $table) {} |
|
| 10 | 10 | |
| 11 | 11 | public function isTable() |
| 12 | 12 | { |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class SQLite |
| 8 | 8 | { |
| 9 | - public function __construct(protected $table){} |
|
| 9 | + public function __construct(protected $table) {} |
|
| 10 | 10 | |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
@@ -6,7 +6,7 @@ |
||
| 6 | 6 | |
| 7 | 7 | class MySQL |
| 8 | 8 | { |
| 9 | - public function __construct(protected $table){} |
|
| 9 | + public function __construct(protected $table) {} |
|
| 10 | 10 | |
| 11 | 11 | public function isTable() |
| 12 | 12 | { |
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | if (php_sapi_name() != "cli") { |
| 6 | 6 | Router::get([ |
| 7 | 7 | 'url' => "callable/:name", |
| 8 | - 'controller' => function ($name) { |
|
| 8 | + 'controller' => function($name) { |
|
| 9 | 9 | echo "Hello $name!"; |
| 10 | 10 | } |
| 11 | 11 | ]); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | |
| 20 | 20 | 'services' => [ |
| 21 | 21 | // 'factory' => StdFactory::class, |
| 22 | - 'callable' => function (){ |
|
| 22 | + 'callable' => function() { |
|
| 23 | 23 | $std = new stdClass; |
| 24 | 24 | $std->method = __METHOD__ . '::Created from waiting'; |
| 25 | 25 | |
@@ -1,33 +1,33 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -return array ( |
|
| 2 | +return array( |
|
| 3 | 3 | 0 => |
| 4 | - array ( |
|
| 4 | + array( |
|
| 5 | 5 | 0 => |
| 6 | - array ( |
|
| 6 | + array( |
|
| 7 | 7 | 'url' => '', |
| 8 | 8 | 'controller' => 'App\\Containers\\Demo\\Controller\\IndexController', |
| 9 | 9 | 'action' => 'attributes', |
| 10 | 10 | 'middleware' => |
| 11 | - array ( |
|
| 11 | + array( |
|
| 12 | 12 | 'before' => |
| 13 | - array ( |
|
| 13 | + array( |
|
| 14 | 14 | 0 => |
| 15 | - array ( |
|
| 15 | + array( |
|
| 16 | 16 | 0 => 'App\\Containers\\Demo\\Middleware\\FirstMiddleware', |
| 17 | 17 | ), |
| 18 | 18 | 1 => |
| 19 | - array ( |
|
| 19 | + array( |
|
| 20 | 20 | 0 => 'App\\Containers\\Demo\\Middleware\\SecondMiddleware', |
| 21 | 21 | ), |
| 22 | 22 | ), |
| 23 | 23 | 'after' => |
| 24 | - array ( |
|
| 24 | + array( |
|
| 25 | 25 | 0 => |
| 26 | - array ( |
|
| 26 | + array( |
|
| 27 | 27 | 0 => 'App\\Containers\\Demo\\Middleware\\FirstMiddleware', |
| 28 | 28 | ), |
| 29 | 29 | 1 => |
| 30 | - array ( |
|
| 30 | + array( |
|
| 31 | 31 | 0 => 'App\\Containers\\Demo\\Middleware\\SecondMiddleware', |
| 32 | 32 | ), |
| 33 | 33 | ), |
@@ -36,33 +36,33 @@ discard block |
||
| 36 | 36 | ), |
| 37 | 37 | ), |
| 38 | 38 | 1 => |
| 39 | - array ( |
|
| 39 | + array( |
|
| 40 | 40 | 0 => |
| 41 | - array ( |
|
| 41 | + array( |
|
| 42 | 42 | 'url' => 'name/:[\\d]{1,3}', |
| 43 | 43 | 'controller' => 'App\\Containers\\Demo\\Controller\\IndexController', |
| 44 | 44 | 'action' => 'attributes', |
| 45 | 45 | 'middleware' => |
| 46 | - array ( |
|
| 46 | + array( |
|
| 47 | 47 | 'before' => |
| 48 | - array ( |
|
| 48 | + array( |
|
| 49 | 49 | 0 => |
| 50 | - array ( |
|
| 50 | + array( |
|
| 51 | 51 | 0 => 'App\\Containers\\Demo\\Middleware\\FirstMiddleware', |
| 52 | 52 | ), |
| 53 | 53 | 1 => |
| 54 | - array ( |
|
| 54 | + array( |
|
| 55 | 55 | 0 => 'App\\Containers\\Demo\\Middleware\\SecondMiddleware', |
| 56 | 56 | ), |
| 57 | 57 | ), |
| 58 | 58 | 'after' => |
| 59 | - array ( |
|
| 59 | + array( |
|
| 60 | 60 | 0 => |
| 61 | - array ( |
|
| 61 | + array( |
|
| 62 | 62 | 0 => 'App\\Containers\\Demo\\Middleware\\FirstMiddleware', |
| 63 | 63 | ), |
| 64 | 64 | 1 => |
| 65 | - array ( |
|
| 65 | + array( |
|
| 66 | 66 | 0 => 'App\\Containers\\Demo\\Middleware\\SecondMiddleware', |
| 67 | 67 | ), |
| 68 | 68 | ), |
@@ -71,14 +71,14 @@ discard block |
||
| 71 | 71 | ), |
| 72 | 72 | ), |
| 73 | 73 | 2 => |
| 74 | - array ( |
|
| 74 | + array( |
|
| 75 | 75 | 0 => |
| 76 | - array ( |
|
| 76 | + array( |
|
| 77 | 77 | 'url' => 'autowire', |
| 78 | 78 | 'controller' => 'App\\Containers\\Demo\\Controller\\IndexController', |
| 79 | 79 | 'action' => 'autowire', |
| 80 | 80 | 'middleware' => |
| 81 | - array ( |
|
| 81 | + array( |
|
| 82 | 82 | ), |
| 83 | 83 | 'method' => 'GET', |
| 84 | 84 | ), |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | #[Middleware(name: 'App\Containers\Demo\Middleware\SecondMiddleware')] |
| 25 | 25 | #[AfterMiddleware(name: 'App\Containers\Demo\Middleware\FirstMiddleware')] |
| 26 | 26 | #[AfterMiddleware(name: 'App\Containers\Demo\Middleware\SecondMiddleware')] |
| 27 | - public function attributes(stdClass $std, stdClass $asd,stdClass $asw,string $name = 'John'): void |
|
| 27 | + public function attributes(stdClass $std, stdClass $asd, stdClass $asw, string $name = 'John'): void |
|
| 28 | 28 | { |
| 29 | 29 | data([ |
| 30 | 30 | "content" => cache(['mainpage', $this->cache_time['templates']]) ?? view(["index", 'mainpage']), |
@@ -38,13 +38,13 @@ discard block |
||
| 38 | 38 | // dump(Rudra::get('factory')); |
| 39 | 39 | // dump(Rudra::get('callable')); |
| 40 | 40 | |
| 41 | - Rudra::set(['one', [new StdFactory()]]); |
|
| 41 | + Rudra::set(['one', [new StdFactory()]]); |
|
| 42 | 42 | dump(Rudra::get('one')); |
| 43 | 43 | |
| 44 | - Rudra::set(['two', [fn() => (new StdFactory())->create()]]); |
|
| 44 | + Rudra::set(['two', [fn() => (new StdFactory())->create()]]); |
|
| 45 | 45 | dump(Rudra::get('two')); |
| 46 | 46 | |
| 47 | - Rudra::set(['three', [StdFactory::class]]); |
|
| 47 | + Rudra::set(['three', [StdFactory::class]]); |
|
| 48 | 48 | dump(Rudra::get('three')); |
| 49 | 49 | |
| 50 | 50 | render("layout", data()); |