@@ -7,13 +7,13 @@ |
||
7 | 7 | |
8 | 8 | class Epesi extends Facade |
9 | 9 | { |
10 | - /** |
|
11 | - * Get the registered name of the component. |
|
12 | - * |
|
13 | - * @return string |
|
14 | - */ |
|
15 | - protected static function getFacadeAccessor() |
|
16 | - { |
|
17 | - return App::class; |
|
18 | - } |
|
10 | + /** |
|
11 | + * Get the registered name of the component. |
|
12 | + * |
|
13 | + * @return string |
|
14 | + */ |
|
15 | + protected static function getFacadeAccessor() |
|
16 | + { |
|
17 | + return App::class; |
|
18 | + } |
|
19 | 19 | } |
@@ -2,35 +2,35 @@ |
||
2 | 2 | |
3 | 3 | if (! function_exists('epesi')) { |
4 | 4 | function epesi() : Epesi\Core\App |
5 | - { |
|
6 | - return resolve(Epesi\Core\App::class); |
|
7 | - } |
|
5 | + { |
|
6 | + return resolve(Epesi\Core\App::class); |
|
7 | + } |
|
8 | 8 | } |
9 | 9 | |
10 | 10 | if (! function_exists('eval_css')) { |
11 | 11 | function eval_css($css) |
12 | - { |
|
13 | - epesi()->addStyle($css); |
|
14 | - } |
|
12 | + { |
|
13 | + epesi()->addStyle($css); |
|
14 | + } |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | if (! function_exists('eval_js')) { |
18 | 18 | function eval_js($js, $args = []) |
19 | - { |
|
20 | - epesi()->addJS($js, $args); |
|
21 | - } |
|
19 | + { |
|
20 | + epesi()->addJS($js, $args); |
|
21 | + } |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | if (! function_exists('load_css')) { |
25 | 25 | function load_css($url) |
26 | - { |
|
27 | - return epesi()->requireCSS($url); |
|
28 | - } |
|
26 | + { |
|
27 | + return epesi()->requireCSS($url); |
|
28 | + } |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | if (! function_exists('load_js')) { |
32 | 32 | function load_js($url) |
33 | - { |
|
34 | - return epesi()->requireJS($url); |
|
35 | - } |
|
33 | + { |
|
34 | + return epesi()->requireJS($url); |
|
35 | + } |
|
36 | 36 | } |
@@ -1,34 +1,34 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if (! function_exists('epesi')) { |
|
3 | +if (!function_exists('epesi')) { |
|
4 | 4 | function epesi() : Epesi\Core\App |
5 | 5 | { |
6 | 6 | return resolve(Epesi\Core\App::class); |
7 | 7 | } |
8 | 8 | } |
9 | 9 | |
10 | -if (! function_exists('eval_css')) { |
|
10 | +if (!function_exists('eval_css')) { |
|
11 | 11 | function eval_css($css) |
12 | 12 | { |
13 | 13 | epesi()->addStyle($css); |
14 | 14 | } |
15 | 15 | } |
16 | 16 | |
17 | -if (! function_exists('eval_js')) { |
|
17 | +if (!function_exists('eval_js')) { |
|
18 | 18 | function eval_js($js, $args = []) |
19 | 19 | { |
20 | 20 | epesi()->addJS($js, $args); |
21 | 21 | } |
22 | 22 | } |
23 | 23 | |
24 | -if (! function_exists('load_css')) { |
|
24 | +if (!function_exists('load_css')) { |
|
25 | 25 | function load_css($url) |
26 | 26 | { |
27 | 27 | return epesi()->requireCSS($url); |
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | -if (! function_exists('load_js')) { |
|
31 | +if (!function_exists('load_js')) { |
|
32 | 32 | function load_js($url) |
33 | 33 | { |
34 | 34 | return epesi()->requireJS($url); |
@@ -6,26 +6,26 @@ discard block |
||
6 | 6 | |
7 | 7 | class DatabaseConnectionCommand extends Command |
8 | 8 | { |
9 | - /** |
|
10 | - * The name and signature of the console command. |
|
11 | - * |
|
12 | - * @var string |
|
13 | - */ |
|
14 | - protected $signature = 'epesi:database-connection {--connection= : DB connection settings}'; |
|
9 | + /** |
|
10 | + * The name and signature of the console command. |
|
11 | + * |
|
12 | + * @var string |
|
13 | + */ |
|
14 | + protected $signature = 'epesi:database-connection {--connection= : DB connection settings}'; |
|
15 | 15 | |
16 | - /** |
|
17 | - * The console command description. |
|
18 | - * |
|
19 | - * @var string |
|
20 | - */ |
|
21 | - protected $description = 'Update database connection for epesi application'; |
|
16 | + /** |
|
17 | + * The console command description. |
|
18 | + * |
|
19 | + * @var string |
|
20 | + */ |
|
21 | + protected $description = 'Update database connection for epesi application'; |
|
22 | 22 | |
23 | - /** |
|
24 | - * Execute the console command. |
|
25 | - */ |
|
26 | - public function handle() |
|
27 | - { |
|
28 | - $connection = $this->option('connection'); |
|
23 | + /** |
|
24 | + * Execute the console command. |
|
25 | + */ |
|
26 | + public function handle() |
|
27 | + { |
|
28 | + $connection = $this->option('connection'); |
|
29 | 29 | |
30 | 30 | $map = [ |
31 | 31 | 'driver' => 'DB_CONNECTION', |
@@ -48,10 +48,10 @@ discard block |
||
48 | 48 | return; |
49 | 49 | } |
50 | 50 | |
51 | - $this->call('epesi:env', [ |
|
52 | - 'name' => $env |
|
53 | - ]); |
|
51 | + $this->call('epesi:env', [ |
|
52 | + 'name' => $env |
|
53 | + ]); |
|
54 | 54 | |
55 | - $this->comment('DB connection settings updated!'); |
|
56 | - } |
|
55 | + $this->comment('DB connection settings updated!'); |
|
56 | + } |
|
57 | 57 | } |
@@ -38,7 +38,9 @@ |
||
38 | 38 | |
39 | 39 | $env = []; |
40 | 40 | foreach ($map as $key => $name) { |
41 | - if (!isset($connection[$key])) continue; |
|
41 | + if (!isset($connection[$key])) { |
|
42 | + continue; |
|
43 | + } |
|
42 | 44 | |
43 | 45 | $env[$name] = $connection[$key]; |
44 | 46 | } |
@@ -7,33 +7,33 @@ |
||
7 | 7 | |
8 | 8 | class ModuleInstallCommand extends Command |
9 | 9 | { |
10 | - /** |
|
11 | - * The name and signature of the console command. |
|
12 | - * |
|
13 | - * @var string |
|
14 | - */ |
|
15 | - protected $signature = 'epesi:module-install {module : The class name or alias of the module.}'; |
|
10 | + /** |
|
11 | + * The name and signature of the console command. |
|
12 | + * |
|
13 | + * @var string |
|
14 | + */ |
|
15 | + protected $signature = 'epesi:module-install {module : The class name or alias of the module.}'; |
|
16 | 16 | |
17 | - /** |
|
18 | - * The console command description. |
|
19 | - * |
|
20 | - * @var string |
|
21 | - */ |
|
22 | - protected $description = 'Install the epesi module'; |
|
17 | + /** |
|
18 | + * The console command description. |
|
19 | + * |
|
20 | + * @var string |
|
21 | + */ |
|
22 | + protected $description = 'Install the epesi module'; |
|
23 | 23 | |
24 | - /** |
|
25 | - * Execute the console command. |
|
26 | - */ |
|
27 | - public function handle() |
|
28 | - { |
|
29 | - try { |
|
30 | - ob_start(); |
|
31 | - ModuleManager::install($this->argument('module')); |
|
24 | + /** |
|
25 | + * Execute the console command. |
|
26 | + */ |
|
27 | + public function handle() |
|
28 | + { |
|
29 | + try { |
|
30 | + ob_start(); |
|
31 | + ModuleManager::install($this->argument('module')); |
|
32 | 32 | |
33 | - $this->alert(ob_get_clean()); |
|
34 | - } catch (\Exception $e) { |
|
35 | - $this->error($e->getMessage()); |
|
36 | - } |
|
37 | - } |
|
33 | + $this->alert(ob_get_clean()); |
|
34 | + } catch (\Exception $e) { |
|
35 | + $this->error($e->getMessage()); |
|
36 | + } |
|
37 | + } |
|
38 | 38 | |
39 | 39 | } |
@@ -8,58 +8,58 @@ |
||
8 | 8 | |
9 | 9 | class DatabaseCreateCommand extends Command |
10 | 10 | { |
11 | - /** |
|
12 | - * The name and signature of the console command. |
|
13 | - * |
|
14 | - * @var string |
|
15 | - */ |
|
16 | - protected $signature = 'epesi:database-create {name : The name of the database.} |
|
11 | + /** |
|
12 | + * The name and signature of the console command. |
|
13 | + * |
|
14 | + * @var string |
|
15 | + */ |
|
16 | + protected $signature = 'epesi:database-create {name : The name of the database.} |
|
17 | 17 | {--connection=mysql DB connection settings}'; |
18 | 18 | |
19 | - /** |
|
20 | - * The console command description. |
|
21 | - * |
|
22 | - * @var string |
|
23 | - */ |
|
24 | - protected $description = 'Create database for the epesi application'; |
|
19 | + /** |
|
20 | + * The console command description. |
|
21 | + * |
|
22 | + * @var string |
|
23 | + */ |
|
24 | + protected $description = 'Create database for the epesi application'; |
|
25 | 25 | |
26 | - protected $connection; |
|
26 | + protected $connection; |
|
27 | 27 | |
28 | - /** |
|
29 | - * Execute the console command. |
|
30 | - */ |
|
31 | - public function handle() |
|
32 | - { |
|
33 | - DB::connection($this->connection())->statement('CREATE DATABASE `' . $this->argument('name') . '`'); |
|
34 | - } |
|
28 | + /** |
|
29 | + * Execute the console command. |
|
30 | + */ |
|
31 | + public function handle() |
|
32 | + { |
|
33 | + DB::connection($this->connection())->statement('CREATE DATABASE `' . $this->argument('name') . '`'); |
|
34 | + } |
|
35 | 35 | |
36 | - /** |
|
37 | - * Creates the configuration for the connection and returns the key |
|
38 | - * |
|
39 | - * @return void |
|
40 | - */ |
|
41 | - protected function connection() |
|
42 | - { |
|
43 | - $connection = $this->option('connection'); |
|
36 | + /** |
|
37 | + * Creates the configuration for the connection and returns the key |
|
38 | + * |
|
39 | + * @return void |
|
40 | + */ |
|
41 | + protected function connection() |
|
42 | + { |
|
43 | + $connection = $this->option('connection'); |
|
44 | 44 | |
45 | - // Just get access to the config. |
|
46 | - $config = App::make('config'); |
|
45 | + // Just get access to the config. |
|
46 | + $config = App::make('config'); |
|
47 | 47 | |
48 | - // Will contain the array of connections that appear in our database config file. |
|
49 | - $connections = $config->get('database.connections'); |
|
48 | + // Will contain the array of connections that appear in our database config file. |
|
49 | + $connections = $config->get('database.connections'); |
|
50 | 50 | |
51 | - $driver = is_string($connection)? $connection: $connection['driver']; |
|
51 | + $driver = is_string($connection)? $connection: $connection['driver']; |
|
52 | 52 | |
53 | - $defaultConnection = $connections[$driver]?? $connections[$config->get('database.default')]; |
|
53 | + $defaultConnection = $connections[$driver]?? $connections[$config->get('database.default')]; |
|
54 | 54 | |
55 | - $newConnection = array_merge($defaultConnection, is_string($connection)? []: $connection); |
|
55 | + $newConnection = array_merge($defaultConnection, is_string($connection)? []: $connection); |
|
56 | 56 | |
57 | - // Do not select database |
|
58 | - $newConnection['database'] = ''; |
|
57 | + // Do not select database |
|
58 | + $newConnection['database'] = ''; |
|
59 | 59 | |
60 | - // This will add our new connection to the run-time configuration for the duration of the request. |
|
61 | - $config->set('database.connections.create-db', $newConnection); |
|
60 | + // This will add our new connection to the run-time configuration for the duration of the request. |
|
61 | + $config->set('database.connections.create-db', $newConnection); |
|
62 | 62 | |
63 | - return 'create-db'; |
|
64 | - } |
|
63 | + return 'create-db'; |
|
64 | + } |
|
65 | 65 | } |
@@ -48,11 +48,11 @@ |
||
48 | 48 | // Will contain the array of connections that appear in our database config file. |
49 | 49 | $connections = $config->get('database.connections'); |
50 | 50 | |
51 | - $driver = is_string($connection)? $connection: $connection['driver']; |
|
51 | + $driver = is_string($connection) ? $connection : $connection['driver']; |
|
52 | 52 | |
53 | 53 | $defaultConnection = $connections[$driver]?? $connections[$config->get('database.default')]; |
54 | 54 | |
55 | - $newConnection = array_merge($defaultConnection, is_string($connection)? []: $connection); |
|
55 | + $newConnection = array_merge($defaultConnection, is_string($connection) ? [] : $connection); |
|
56 | 56 | |
57 | 57 | // Do not select database |
58 | 58 | $newConnection['database'] = ''; |
@@ -8,24 +8,24 @@ discard block |
||
8 | 8 | |
9 | 9 | class EpesiCommand extends Command |
10 | 10 | { |
11 | - /** |
|
12 | - * The name and signature of the console command. |
|
13 | - * |
|
14 | - * @var string |
|
15 | - */ |
|
16 | - protected $signature = 'epesi'; |
|
17 | - |
|
18 | - /** |
|
19 | - * The console command description. |
|
20 | - * |
|
21 | - * @var string |
|
22 | - */ |
|
23 | - protected $description = 'List all epesi commands'; |
|
24 | - |
|
25 | - /** |
|
26 | - * @var string |
|
27 | - */ |
|
28 | - public static $logo = <<<LOGO |
|
11 | + /** |
|
12 | + * The name and signature of the console command. |
|
13 | + * |
|
14 | + * @var string |
|
15 | + */ |
|
16 | + protected $signature = 'epesi'; |
|
17 | + |
|
18 | + /** |
|
19 | + * The console command description. |
|
20 | + * |
|
21 | + * @var string |
|
22 | + */ |
|
23 | + protected $description = 'List all epesi commands'; |
|
24 | + |
|
25 | + /** |
|
26 | + * @var string |
|
27 | + */ |
|
28 | + public static $logo = <<<LOGO |
|
29 | 29 | ____ ____ ____ ____ __ |
30 | 30 | ( __)( _ \( __)/ ___)( ) |
31 | 31 | ) _) ) __/ ) _) \___ \ )( |
@@ -33,74 +33,74 @@ discard block |
||
33 | 33 | |
34 | 34 | LOGO; |
35 | 35 | |
36 | - /** |
|
37 | - * Execute the console command. |
|
38 | - */ |
|
39 | - public function handle() |
|
40 | - { |
|
41 | - $this->line(static::$logo); |
|
42 | - |
|
43 | - $this->comment(''); |
|
44 | - $this->comment('Available commands:'); |
|
45 | - |
|
46 | - $this->listEpesiCommands(); |
|
47 | - } |
|
48 | - |
|
49 | - /** |
|
50 | - * List all epesi commands. |
|
51 | - * |
|
52 | - * @return void |
|
53 | - */ |
|
54 | - protected function listEpesiCommands() |
|
55 | - { |
|
56 | - $commands = collect(Artisan::all())->mapWithKeys(function ($command, $key) { |
|
57 | - if (Str::startsWith($key, 'epesi:')) { |
|
58 | - return [$key => $command]; |
|
59 | - } |
|
60 | - |
|
61 | - return []; |
|
62 | - })->toArray(); |
|
63 | - |
|
64 | - $width = $this->getColumnWidth($commands); |
|
65 | - |
|
66 | - /** @var Command $command */ |
|
67 | - foreach ($commands as $command) { |
|
68 | - $this->line(sprintf(" %-{$width}s %s", $command->getName(), $command->getDescription())); |
|
69 | - } |
|
70 | - } |
|
71 | - |
|
72 | - /** |
|
73 | - * @param (Command|string)[] $commands |
|
74 | - * |
|
75 | - * @return int |
|
76 | - */ |
|
77 | - private function getColumnWidth(array $commands) |
|
78 | - { |
|
79 | - $widths = []; |
|
80 | - |
|
81 | - foreach ($commands as $command) { |
|
82 | - $widths[] = static::strlen($command->getName()); |
|
83 | - foreach ($command->getAliases() as $alias) { |
|
84 | - $widths[] = static::strlen($alias); |
|
85 | - } |
|
86 | - } |
|
87 | - |
|
88 | - return $widths ? max($widths) + 2 : 0; |
|
89 | - } |
|
90 | - |
|
91 | - /** |
|
92 | - * Returns the length of a string, using mb_strwidth if it is available. |
|
93 | - * |
|
94 | - * @param string $string The string to check its length |
|
95 | - * |
|
96 | - * @return int The length of the string |
|
97 | - */ |
|
98 | - public static function strlen($string) |
|
99 | - { |
|
100 | - if (false === $encoding = mb_detect_encoding($string, null, true)) { |
|
101 | - return strlen($string); |
|
102 | - } |
|
103 | - |
|
104 | - return mb_strwidth($string, $encoding); |
|
105 | - } |
|
36 | + /** |
|
37 | + * Execute the console command. |
|
38 | + */ |
|
39 | + public function handle() |
|
40 | + { |
|
41 | + $this->line(static::$logo); |
|
42 | + |
|
43 | + $this->comment(''); |
|
44 | + $this->comment('Available commands:'); |
|
45 | + |
|
46 | + $this->listEpesiCommands(); |
|
47 | + } |
|
48 | + |
|
49 | + /** |
|
50 | + * List all epesi commands. |
|
51 | + * |
|
52 | + * @return void |
|
53 | + */ |
|
54 | + protected function listEpesiCommands() |
|
55 | + { |
|
56 | + $commands = collect(Artisan::all())->mapWithKeys(function ($command, $key) { |
|
57 | + if (Str::startsWith($key, 'epesi:')) { |
|
58 | + return [$key => $command]; |
|
59 | + } |
|
60 | + |
|
61 | + return []; |
|
62 | + })->toArray(); |
|
63 | + |
|
64 | + $width = $this->getColumnWidth($commands); |
|
65 | + |
|
66 | + /** @var Command $command */ |
|
67 | + foreach ($commands as $command) { |
|
68 | + $this->line(sprintf(" %-{$width}s %s", $command->getName(), $command->getDescription())); |
|
69 | + } |
|
70 | + } |
|
71 | + |
|
72 | + /** |
|
73 | + * @param (Command|string)[] $commands |
|
74 | + * |
|
75 | + * @return int |
|
76 | + */ |
|
77 | + private function getColumnWidth(array $commands) |
|
78 | + { |
|
79 | + $widths = []; |
|
80 | + |
|
81 | + foreach ($commands as $command) { |
|
82 | + $widths[] = static::strlen($command->getName()); |
|
83 | + foreach ($command->getAliases() as $alias) { |
|
84 | + $widths[] = static::strlen($alias); |
|
85 | + } |
|
86 | + } |
|
87 | + |
|
88 | + return $widths ? max($widths) + 2 : 0; |
|
89 | + } |
|
90 | + |
|
91 | + /** |
|
92 | + * Returns the length of a string, using mb_strwidth if it is available. |
|
93 | + * |
|
94 | + * @param string $string The string to check its length |
|
95 | + * |
|
96 | + * @return int The length of the string |
|
97 | + */ |
|
98 | + public static function strlen($string) |
|
99 | + { |
|
100 | + if (false === $encoding = mb_detect_encoding($string, null, true)) { |
|
101 | + return strlen($string); |
|
102 | + } |
|
103 | + |
|
104 | + return mb_strwidth($string, $encoding); |
|
105 | + } |
|
106 | 106 | } |
@@ -53,7 +53,7 @@ |
||
53 | 53 | */ |
54 | 54 | protected function listEpesiCommands() |
55 | 55 | { |
56 | - $commands = collect(Artisan::all())->mapWithKeys(function ($command, $key) { |
|
56 | + $commands = collect(Artisan::all())->mapWithKeys(function($command, $key) { |
|
57 | 57 | if (Str::startsWith($key, 'epesi:')) { |
58 | 58 | return [$key => $command]; |
59 | 59 | } |
@@ -67,7 +67,9 @@ discard block |
||
67 | 67 | |
68 | 68 | public function addGroupResults($group, $testResults = [], $container = null) |
69 | 69 | { |
70 | - if (! $testResults) return; |
|
70 | + if (! $testResults) { |
|
71 | + return; |
|
72 | + } |
|
71 | 73 | |
72 | 74 | $container = $container?: $this; |
73 | 75 | |
@@ -153,8 +155,7 @@ discard block |
||
153 | 155 | $severity = 0; |
154 | 156 | if ($actualSizeBytes < $requiredSizeBytes) { |
155 | 157 | $severity = 2; |
156 | - } |
|
157 | - elseif ($actualSizeBytes == $requiredSizeBytes) { |
|
158 | + } elseif ($actualSizeBytes == $requiredSizeBytes) { |
|
158 | 159 | $severity = 1; |
159 | 160 | } |
160 | 161 |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | |
88 | 88 | public function addLegend($container = null) |
89 | 89 | { |
90 | - $container = $container?: $this; |
|
90 | + $container = $container ?: $this; |
|
91 | 91 | |
92 | 92 | $legend = $container->add(['Header', __('Scan of Environment Parameters')])->setStyle('margin-left', '2em'); |
93 | 93 | $legend = $container->add('View')->setStyle('margin-left', 'auto'); |
@@ -99,9 +99,9 @@ discard block |
||
99 | 99 | |
100 | 100 | public function addGroupResults($group, $testResults = [], $container = null) |
101 | 101 | { |
102 | - if (! $testResults) return; |
|
102 | + if (!$testResults) return; |
|
103 | 103 | |
104 | - $container = $container?: $this; |
|
104 | + $container = $container ?: $this; |
|
105 | 105 | |
106 | 106 | $container->add(['Header', $group]); |
107 | 107 | |
@@ -123,13 +123,13 @@ discard block |
||
123 | 123 | |
124 | 124 | @Schema::dropIfExists('test'); |
125 | 125 | |
126 | - @Schema::create('test', function (Blueprint $table) { |
|
126 | + @Schema::create('test', function(Blueprint $table) { |
|
127 | 127 | $table->increments('id'); |
128 | 128 | }); |
129 | 129 | |
130 | 130 | $create = Schema::hasTable('test'); |
131 | 131 | |
132 | - @Schema::table('test', function (Blueprint $table) { |
|
132 | + @Schema::table('test', function(Blueprint $table) { |
|
133 | 133 | $table->addColumn('TEXT', 'field_name'); |
134 | 134 | }); |
135 | 135 | |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | $delete = @DB::delete('DELETE FROM test'); |
141 | 141 | @Schema::dropIfExists('test'); |
142 | 142 | |
143 | - $drop = ! Schema::hasTable('test'); |
|
143 | + $drop = !Schema::hasTable('test'); |
|
144 | 144 | |
145 | 145 | ob_end_clean(); |
146 | 146 | |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | array_walk($result, function(& $testResult, $testName) { |
150 | 150 | $testResult = [ |
151 | 151 | 'name' => __(':permission permission', ['permission' => strtoupper($testName)]), |
152 | - 'result' => $testResult? __('OK'): __('Failed'), |
|
153 | - 'severity' => $testResult? 0: 2 |
|
152 | + 'result' => $testResult ? __('OK') : __('Failed'), |
|
153 | + 'severity' => $testResult ? 0 : 2 |
|
154 | 154 | ]; |
155 | 155 | }); |
156 | 156 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | protected function unitToInt($string) |
161 | 161 | { |
162 | - return (int) preg_replace_callback('/(\-?\d+)(.?)/', function ($m) { |
|
162 | + return (int) preg_replace_callback('/(\-?\d+)(.?)/', function($m) { |
|
163 | 163 | return $m[1] * pow(1024, strpos('BKMG', $m[2])); |
164 | 164 | }, strtoupper($string)); |
165 | 165 | } |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $ret[] = [ |
173 | 173 | 'name' => __('PHP version required :version', ['version' => $requiredPhpVersion]), |
174 | 174 | 'result' => PHP_VERSION, |
175 | - 'severity' => version_compare(PHP_VERSION, $requiredPhpVersion, '>=')? 0: 2 |
|
175 | + 'severity' => version_compare(PHP_VERSION, $requiredPhpVersion, '>=') ? 0 : 2 |
|
176 | 176 | ]; |
177 | 177 | } |
178 | 178 | |
@@ -208,8 +208,8 @@ discard block |
||
208 | 208 | $result = $callback($extension); |
209 | 209 | |
210 | 210 | $ret[] = array_merge($test, [ |
211 | - 'result' => $result? __('OK'): __('Missing'), |
|
212 | - 'severity' => $result? 0: $test['severity'] |
|
211 | + 'result' => $result ? __('OK') : __('Missing'), |
|
212 | + 'severity' => $result ? 0 : $test['severity'] |
|
213 | 213 | ]); |
214 | 214 | } |
215 | 215 | } |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | $joint = new $class(); |
26 | 26 | |
27 | - if (! $joint->access()) continue; |
|
27 | + if (!$joint->access()) continue; |
|
28 | 28 | |
29 | 29 | $ret->add($joint); |
30 | 30 | } |
@@ -29,7 +29,9 @@ |
||
29 | 29 | */ |
30 | 30 | $joint = new $class(); |
31 | 31 | |
32 | - if (! $joint->access()) continue; |
|
32 | + if (! $joint->access()) { |
|
33 | + continue; |
|
34 | + } |
|
33 | 35 | |
34 | 36 | $ret->add($joint); |
35 | 37 | } |
@@ -34,10 +34,10 @@ |
||
34 | 34 | */ |
35 | 35 | final public function displayModuleContent($method, $args) { |
36 | 36 | // if method not callbale abort to 'not found' |
37 | - if (! is_callable([$this, $method])) abort(404); |
|
37 | + if (!is_callable([$this, $method])) abort(404); |
|
38 | 38 | |
39 | 39 | // if user has no access abort 'no access' |
40 | - if (! $this->access()) abort(401); |
|
40 | + if (!$this->access()) abort(401); |
|
41 | 41 | |
42 | 42 | $args = $this->decodeArgs($args); |
43 | 43 |
@@ -34,10 +34,14 @@ |
||
34 | 34 | */ |
35 | 35 | final public function displayModuleContent($method, $args) { |
36 | 36 | // if method not callbale abort to 'not found' |
37 | - if (! is_callable([$this, $method])) abort(404); |
|
37 | + if (! is_callable([$this, $method])) { |
|
38 | + abort(404); |
|
39 | + } |
|
38 | 40 | |
39 | 41 | // if user has no access abort 'no access' |
40 | - if (! $this->access()) abort(401); |
|
42 | + if (! $this->access()) { |
|
43 | + abort(401); |
|
44 | + } |
|
41 | 45 | |
42 | 46 | $args = $this->decodeArgs($args); |
43 | 47 |