@@ -21,14 +21,14 @@ discard block |
||
21 | 21 | ['locale', InputArgument::REQUIRED, 'Locale to be dumped'], |
22 | 22 | ['path', InputArgument::REQUIRED, 'Export path'], |
23 | 23 | ]; |
24 | - protected const OPTIONS = [ |
|
24 | + protected const OPTIONS = [ |
|
25 | 25 | ['dumper', 'd', InputOption::VALUE_OPTIONAL, 'Dumper name', 'php'], |
26 | 26 | ['fallback', 'f', InputOption::VALUE_NONE, 'Merge messages from fallback catalogue'], |
27 | 27 | ]; |
28 | 28 | |
29 | 29 | public function perform(TranslatorConfig $config, CatalogueManager $manager): int |
30 | 30 | { |
31 | - if (!$config->hasDumper($this->option('dumper'))) { |
|
31 | + if (!$config->hasDumper($this->option('dumper'))){ |
|
32 | 32 | $this->writeln("<fg=red>Undefined dumper '{$this->option('dumper')}'.</fg=red>"); |
33 | 33 | |
34 | 34 | return self::FAILURE; |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $manager->get($this->argument('locale')) |
41 | 41 | ); |
42 | 42 | |
43 | - if ($this->isVerbose() && !empty($mc->getDomains())) { |
|
43 | + if ($this->isVerbose() && !empty($mc->getDomains())){ |
|
44 | 44 | $this->sprintf( |
45 | 45 | "<info>Exporting domain(s):</info> %s\n", |
46 | 46 | \implode(',', $mc->getDomains()) |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | ] |
59 | 59 | ); |
60 | 60 | |
61 | - $this->writeln('Export successfully completed using <info>' . $dumper::class . '</info>'); |
|
62 | - $this->writeln('Output: <comment>' . \realpath($this->argument('path')) . '</comment>'); |
|
61 | + $this->writeln('Export successfully completed using <info>'.$dumper::class.'</info>'); |
|
62 | + $this->writeln('Output: <comment>'.\realpath($this->argument('path')).'</comment>'); |
|
63 | 63 | |
64 | 64 | return self::SUCCESS; |
65 | 65 | } |
@@ -74,10 +74,10 @@ discard block |
||
74 | 74 | $catalogue->getData() |
75 | 75 | ); |
76 | 76 | |
77 | - if ($this->option('fallback')) { |
|
78 | - foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages) { |
|
79 | - foreach ($messages as $id => $message) { |
|
80 | - if (!$messageCatalogue->defines($id, $domain)) { |
|
77 | + if ($this->option('fallback')){ |
|
78 | + foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages){ |
|
79 | + foreach ($messages as $id => $message){ |
|
80 | + if (!$messageCatalogue->defines($id, $domain)){ |
|
81 | 81 | $messageCatalogue->set($id, $message, $domain); |
82 | 82 | } |
83 | 83 | } |
@@ -28,7 +28,8 @@ discard block |
||
28 | 28 | |
29 | 29 | public function perform(TranslatorConfig $config, CatalogueManager $manager): int |
30 | 30 | { |
31 | - if (!$config->hasDumper($this->option('dumper'))) { |
|
31 | + if (!$config->hasDumper($this->option('dumper'))) |
|
32 | + { |
|
32 | 33 | $this->writeln("<fg=red>Undefined dumper '{$this->option('dumper')}'.</fg=red>"); |
33 | 34 | |
34 | 35 | return self::FAILURE; |
@@ -40,7 +41,8 @@ discard block |
||
40 | 41 | $manager->get($this->argument('locale')) |
41 | 42 | ); |
42 | 43 | |
43 | - if ($this->isVerbose() && !empty($mc->getDomains())) { |
|
44 | + if ($this->isVerbose() && !empty($mc->getDomains())) |
|
45 | + { |
|
44 | 46 | $this->sprintf( |
45 | 47 | "<info>Exporting domain(s):</info> %s\n", |
46 | 48 | \implode(',', $mc->getDomains()) |
@@ -74,10 +76,14 @@ discard block |
||
74 | 76 | $catalogue->getData() |
75 | 77 | ); |
76 | 78 | |
77 | - if ($this->option('fallback')) { |
|
78 | - foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages) { |
|
79 | - foreach ($messages as $id => $message) { |
|
80 | - if (!$messageCatalogue->defines($id, $domain)) { |
|
79 | + if ($this->option('fallback')) |
|
80 | + { |
|
81 | + foreach ($manager->get($config->getFallbackLocale())->getData() as $domain => $messages) |
|
82 | + { |
|
83 | + foreach ($messages as $id => $message) |
|
84 | + { |
|
85 | + if (!$messageCatalogue->defines($id, $domain)) |
|
86 | + { |
|
81 | 87 | $messageCatalogue->set($id, $message, $domain); |
82 | 88 | } |
83 | 89 | } |
@@ -17,20 +17,20 @@ discard block |
||
17 | 17 | public function perform(FilesInterface $files, DirectoriesInterface $directories): int |
18 | 18 | { |
19 | 19 | $cacheDirectory = $directories->get('cache'); |
20 | - if (!$files->exists($cacheDirectory)) { |
|
20 | + if (!$files->exists($cacheDirectory)){ |
|
21 | 21 | $this->writeln('Cache directory is missing, no cache to be cleaned.'); |
22 | 22 | |
23 | 23 | return self::FAILURE; |
24 | 24 | } |
25 | 25 | |
26 | - if ($this->isVerbose()) { |
|
26 | + if ($this->isVerbose()){ |
|
27 | 27 | $this->writeln('<info>Cleaning application cache:</info>'); |
28 | 28 | } |
29 | 29 | |
30 | - foreach ($files->getFiles($cacheDirectory) as $filename) { |
|
31 | - try { |
|
30 | + foreach ($files->getFiles($cacheDirectory) as $filename){ |
|
31 | + try{ |
|
32 | 32 | $files->delete($filename); |
33 | - } catch (\Throwable $e) { |
|
33 | + }catch (\Throwable $e){ |
|
34 | 34 | // @codeCoverageIgnoreStart |
35 | 35 | $this->sprintf( |
36 | 36 | "<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>\n", |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | // @codeCoverageIgnoreEnd |
43 | 43 | } |
44 | 44 | |
45 | - if ($this->isVerbose()) { |
|
45 | + if ($this->isVerbose()){ |
|
46 | 46 | $this->sprintf( |
47 | 47 | "<fg=green>[deleted]</fg=green> `%s`\n", |
48 | 48 | $files->relativePath($filename, $cacheDirectory) |
@@ -17,20 +17,26 @@ discard block |
||
17 | 17 | public function perform(FilesInterface $files, DirectoriesInterface $directories): int |
18 | 18 | { |
19 | 19 | $cacheDirectory = $directories->get('cache'); |
20 | - if (!$files->exists($cacheDirectory)) { |
|
20 | + if (!$files->exists($cacheDirectory)) |
|
21 | + { |
|
21 | 22 | $this->writeln('Cache directory is missing, no cache to be cleaned.'); |
22 | 23 | |
23 | 24 | return self::FAILURE; |
24 | 25 | } |
25 | 26 | |
26 | - if ($this->isVerbose()) { |
|
27 | + if ($this->isVerbose()) |
|
28 | + { |
|
27 | 29 | $this->writeln('<info>Cleaning application cache:</info>'); |
28 | 30 | } |
29 | 31 | |
30 | - foreach ($files->getFiles($cacheDirectory) as $filename) { |
|
31 | - try { |
|
32 | + foreach ($files->getFiles($cacheDirectory) as $filename) |
|
33 | + { |
|
34 | + try |
|
35 | + { |
|
32 | 36 | $files->delete($filename); |
33 | - } catch (\Throwable $e) { |
|
37 | + } |
|
38 | + catch (\Throwable $e) |
|
39 | + { |
|
34 | 40 | // @codeCoverageIgnoreStart |
35 | 41 | $this->sprintf( |
36 | 42 | "<fg=red>[errored]</fg=red> `%s`: <fg=red>%s</fg=red>\n", |
@@ -42,7 +48,8 @@ discard block |
||
42 | 48 | // @codeCoverageIgnoreEnd |
43 | 49 | } |
44 | 50 | |
45 | - if ($this->isVerbose()) { |
|
51 | + if ($this->isVerbose()) |
|
52 | + { |
|
46 | 53 | $this->sprintf( |
47 | 54 | "<fg=green>[deleted]</fg=green> `%s`\n", |
48 | 55 | $files->relativePath($filename, $cacheDirectory) |
@@ -40,15 +40,15 @@ discard block |
||
40 | 40 | $this->sprintf("<info>New encryption key:</info> <fg=cyan>%s</fg=cyan>\n", $key); |
41 | 41 | |
42 | 42 | $file = $this->option('mount'); |
43 | - if ($file === null) { |
|
43 | + if ($file === null){ |
|
44 | 44 | return self::SUCCESS; |
45 | 45 | } |
46 | 46 | |
47 | - if (!$confirmation->confirmToProceed()) { |
|
47 | + if (!$confirmation->confirmToProceed()){ |
|
48 | 48 | return self::FAILURE; |
49 | 49 | } |
50 | 50 | |
51 | - if (!$files->exists($file)) { |
|
51 | + if (!$files->exists($file)){ |
|
52 | 52 | $this->error(\sprintf('Unable to find `%s`.', $file)); |
53 | 53 | |
54 | 54 | return self::FAILURE; |
@@ -56,10 +56,10 @@ discard block |
||
56 | 56 | |
57 | 57 | $content = $files->read($file); |
58 | 58 | |
59 | - try { |
|
59 | + try{ |
|
60 | 60 | $content = \str_replace($this->option('placeholder'), $key, $content); |
61 | 61 | $content = \str_replace($enc->getKey(), $key, $content); |
62 | - } catch (\Throwable) { |
|
62 | + }catch (\Throwable){ |
|
63 | 63 | // current keys is not set |
64 | 64 | } |
65 | 65 |
@@ -40,15 +40,18 @@ discard block |
||
40 | 40 | $this->sprintf("<info>New encryption key:</info> <fg=cyan>%s</fg=cyan>\n", $key); |
41 | 41 | |
42 | 42 | $file = $this->option('mount'); |
43 | - if ($file === null) { |
|
43 | + if ($file === null) |
|
44 | + { |
|
44 | 45 | return self::SUCCESS; |
45 | 46 | } |
46 | 47 | |
47 | - if (!$confirmation->confirmToProceed()) { |
|
48 | + if (!$confirmation->confirmToProceed()) |
|
49 | + { |
|
48 | 50 | return self::FAILURE; |
49 | 51 | } |
50 | 52 | |
51 | - if (!$files->exists($file)) { |
|
53 | + if (!$files->exists($file)) |
|
54 | + { |
|
52 | 55 | $this->error(\sprintf('Unable to find `%s`.', $file)); |
53 | 56 | |
54 | 57 | return self::FAILURE; |
@@ -56,10 +59,13 @@ discard block |
||
56 | 59 | |
57 | 60 | $content = $files->read($file); |
58 | 61 | |
59 | - try { |
|
62 | + try |
|
63 | + { |
|
60 | 64 | $content = \str_replace($this->option('placeholder'), $key, $content); |
61 | 65 | $content = \str_replace($enc->getKey(), $key, $content); |
62 | - } catch (\Throwable) { |
|
66 | + } |
|
67 | + catch (\Throwable) |
|
68 | + { |
|
63 | 69 | // current keys is not set |
64 | 70 | } |
65 | 71 |
@@ -40,13 +40,13 @@ |
||
40 | 40 | |
41 | 41 | public function __construct( |
42 | 42 | private readonly ConfiguratorInterface $config |
43 | - ) { |
|
43 | + ){ |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function init(EnvironmentInterface $env, DirectoriesInterface $dirs, DebugMode $debugMode): void |
47 | 47 | { |
48 | - if (!$dirs->has('locale')) { |
|
49 | - $dirs->set('locale', $dirs->get('app') . 'locale/'); |
|
48 | + if (!$dirs->has('locale')){ |
|
49 | + $dirs->set('locale', $dirs->get('app').'locale/'); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | $this->config->setDefaults( |
@@ -45,7 +45,8 @@ |
||
45 | 45 | |
46 | 46 | public function init(EnvironmentInterface $env, DirectoriesInterface $dirs, DebugMode $debugMode): void |
47 | 47 | { |
48 | - if (!$dirs->has('locale')) { |
|
48 | + if (!$dirs->has('locale')) |
|
49 | + { |
|
49 | 50 | $dirs->set('locale', $dirs->get('app') . 'locale/'); |
50 | 51 | } |
51 | 52 |
@@ -37,8 +37,8 @@ |
||
37 | 37 | FilesInterface $files |
38 | 38 | ): FileSnapshot { |
39 | 39 | return new FileSnapshot( |
40 | - $dirs->get('runtime') . '/snapshots/', |
|
41 | - (int) $env->get('SNAPSHOT_MAX_FILES', self::MAX_SNAPSHOTS), |
|
40 | + $dirs->get('runtime').'/snapshots/', |
|
41 | + (int)$env->get('SNAPSHOT_MAX_FILES', self::MAX_SNAPSHOTS), |
|
42 | 42 | Verbosity::tryFrom((int)($env->get('SNAPSHOT_VERBOSITY') ?? Verbosity::VERBOSE->value)), |
43 | 43 | new PlainRenderer(), |
44 | 44 | $files |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | public function __construct( |
30 | 30 | private readonly FactoryInterface $factory |
31 | - ) { |
|
31 | + ){ |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -36,8 +36,8 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function getActor(TokenInterface $token): ?object |
38 | 38 | { |
39 | - foreach ($this->getProviders() as $provider) { |
|
40 | - if (!$provider instanceof ActorProviderInterface) { |
|
39 | + foreach ($this->getProviders() as $provider){ |
|
40 | + if (!$provider instanceof ActorProviderInterface){ |
|
41 | 41 | throw new AuthException( |
42 | 42 | \sprintf( |
43 | 43 | 'Expected `ActorProviderInterface`, got `%s`', |
@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | $actor = $provider->getActor($token); |
50 | - if ($actor !== null) { |
|
50 | + if ($actor !== null){ |
|
51 | 51 | return $actor; |
52 | 52 | } |
53 | 53 | } |
54 | 54 | |
55 | - if ($this->actorProvider === []) { |
|
55 | + if ($this->actorProvider === []){ |
|
56 | 56 | throw new AuthException('No actor provider'); |
57 | 57 | } |
58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * Register new actor provider. |
64 | 64 | */ |
65 | - public function addActorProvider(ActorProviderInterface|Autowire|string $actorProvider): void |
|
65 | + public function addActorProvider(ActorProviderInterface | Autowire | string $actorProvider): void |
|
66 | 66 | { |
67 | 67 | $this->actorProvider[] = $actorProvider; |
68 | 68 | } |
@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | */ |
73 | 73 | private function getProviders(): \Generator |
74 | 74 | { |
75 | - foreach ($this->actorProvider as $provider) { |
|
76 | - if ($provider instanceof Autowire) { |
|
75 | + foreach ($this->actorProvider as $provider){ |
|
76 | + if ($provider instanceof Autowire){ |
|
77 | 77 | yield $provider->resolve($this->factory); |
78 | 78 | continue; |
79 | 79 | } |
80 | 80 | |
81 | - if (\is_object($provider)) { |
|
81 | + if (\is_object($provider)){ |
|
82 | 82 | yield $provider; |
83 | 83 | continue; |
84 | 84 | } |
@@ -36,8 +36,10 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function getActor(TokenInterface $token): ?object |
38 | 38 | { |
39 | - foreach ($this->getProviders() as $provider) { |
|
40 | - if (!$provider instanceof ActorProviderInterface) { |
|
39 | + foreach ($this->getProviders() as $provider) |
|
40 | + { |
|
41 | + if (!$provider instanceof ActorProviderInterface) |
|
42 | + { |
|
41 | 43 | throw new AuthException( |
42 | 44 | \sprintf( |
43 | 45 | 'Expected `ActorProviderInterface`, got `%s`', |
@@ -47,12 +49,14 @@ discard block |
||
47 | 49 | } |
48 | 50 | |
49 | 51 | $actor = $provider->getActor($token); |
50 | - if ($actor !== null) { |
|
52 | + if ($actor !== null) |
|
53 | + { |
|
51 | 54 | return $actor; |
52 | 55 | } |
53 | 56 | } |
54 | 57 | |
55 | - if ($this->actorProvider === []) { |
|
58 | + if ($this->actorProvider === []) |
|
59 | + { |
|
56 | 60 | throw new AuthException('No actor provider'); |
57 | 61 | } |
58 | 62 | |
@@ -72,13 +76,16 @@ discard block |
||
72 | 76 | */ |
73 | 77 | private function getProviders(): \Generator |
74 | 78 | { |
75 | - foreach ($this->actorProvider as $provider) { |
|
76 | - if ($provider instanceof Autowire) { |
|
79 | + foreach ($this->actorProvider as $provider) |
|
80 | + { |
|
81 | + if ($provider instanceof Autowire) |
|
82 | + { |
|
77 | 83 | yield $provider->resolve($this->factory); |
78 | 84 | continue; |
79 | 85 | } |
80 | 86 | |
81 | - if (\is_object($provider)) { |
|
87 | + if (\is_object($provider)) |
|
88 | + { |
|
82 | 89 | yield $provider; |
83 | 90 | continue; |
84 | 91 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function __construct( |
14 | 14 | private readonly ConfiguratorInterface $config |
15 | - ) { |
|
15 | + ){ |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function init(HttpBootloader $http): void |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function appBooting(\Closure ...$callbacks): void |
38 | 38 | { |
39 | - foreach ($callbacks as $callback) { |
|
39 | + foreach ($callbacks as $callback){ |
|
40 | 40 | $this->bootingCallbacks[] = $callback; |
41 | 41 | } |
42 | 42 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | */ |
52 | 52 | public function appBooted(\Closure ...$callbacks): void |
53 | 53 | { |
54 | - foreach ($callbacks as $callback) { |
|
54 | + foreach ($callbacks as $callback){ |
|
55 | 55 | $this->bootedCallbacks[] = $callback; |
56 | 56 | } |
57 | 57 | } |
@@ -89,29 +89,29 @@ discard block |
||
89 | 89 | */ |
90 | 90 | protected function mapDirectories(array $directories): array |
91 | 91 | { |
92 | - if (!isset($directories['root'])) { |
|
92 | + if (!isset($directories['root'])){ |
|
93 | 93 | throw new BootException('Missing required directory `root`'); |
94 | 94 | } |
95 | 95 | |
96 | - if (!isset($directories['app'])) { |
|
97 | - $directories['app'] = $directories['root'] . '/app/'; |
|
96 | + if (!isset($directories['app'])){ |
|
97 | + $directories['app'] = $directories['root'].'/app/'; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | return \array_merge( |
101 | 101 | [ |
102 | 102 | // public root |
103 | - 'public' => $directories['root'] . '/public/', |
|
103 | + 'public' => $directories['root'].'/public/', |
|
104 | 104 | |
105 | 105 | // vendor libraries |
106 | - 'vendor' => $directories['root'] . '/vendor/', |
|
106 | + 'vendor' => $directories['root'].'/vendor/', |
|
107 | 107 | |
108 | 108 | // data directories |
109 | - 'runtime' => $directories['root'] . '/runtime/', |
|
110 | - 'cache' => $directories['root'] . '/runtime/cache/', |
|
109 | + 'runtime' => $directories['root'].'/runtime/', |
|
110 | + 'cache' => $directories['root'].'/runtime/cache/', |
|
111 | 111 | |
112 | 112 | // application directories |
113 | - 'config' => $directories['app'] . '/config/', |
|
114 | - 'resources' => $directories['app'] . '/resources/', |
|
113 | + 'config' => $directories['app'].'/config/', |
|
114 | + 'resources' => $directories['app'].'/resources/', |
|
115 | 115 | ], |
116 | 116 | $directories |
117 | 117 | ); |
@@ -36,7 +36,8 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function appBooting(\Closure ...$callbacks): void |
38 | 38 | { |
39 | - foreach ($callbacks as $callback) { |
|
39 | + foreach ($callbacks as $callback) |
|
40 | + { |
|
40 | 41 | $this->bootingCallbacks[] = $callback; |
41 | 42 | } |
42 | 43 | } |
@@ -51,7 +52,8 @@ discard block |
||
51 | 52 | */ |
52 | 53 | public function appBooted(\Closure ...$callbacks): void |
53 | 54 | { |
54 | - foreach ($callbacks as $callback) { |
|
55 | + foreach ($callbacks as $callback) |
|
56 | + { |
|
55 | 57 | $this->bootedCallbacks[] = $callback; |
56 | 58 | } |
57 | 59 | } |
@@ -89,11 +91,13 @@ discard block |
||
89 | 91 | */ |
90 | 92 | protected function mapDirectories(array $directories): array |
91 | 93 | { |
92 | - if (!isset($directories['root'])) { |
|
94 | + if (!isset($directories['root'])) |
|
95 | + { |
|
93 | 96 | throw new BootException('Missing required directory `root`'); |
94 | 97 | } |
95 | 98 | |
96 | - if (!isset($directories['app'])) { |
|
99 | + if (!isset($directories['app'])) |
|
100 | + { |
|
97 | 101 | $directories['app'] = $directories['root'] . '/app/'; |
98 | 102 | } |
99 | 103 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | public function __construct( |
21 | 21 | private readonly ContainerInterface $container, |
22 | 22 | private readonly FactoryInterface $factory |
23 | - ) { |
|
23 | + ){ |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function createPaginator(string $parameter, int $limit = 25): PaginatorInterface |
30 | 30 | { |
31 | - if (!$this->container->has(ServerRequestInterface::class)) { |
|
31 | + if (!$this->container->has(ServerRequestInterface::class)){ |
|
32 | 32 | throw new ScopeException('Unable to create paginator, no request scope found'); |
33 | 33 | } |
34 | 34 | /** |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | //Getting page number |
40 | 40 | $page = 0; |
41 | - if (!empty($query[$parameter]) && \is_scalar($query[$parameter])) { |
|
41 | + if (!empty($query[$parameter]) && \is_scalar($query[$parameter])){ |
|
42 | 42 | $page = (int)$query[$parameter]; |
43 | 43 | } |
44 | 44 |
@@ -28,7 +28,8 @@ discard block |
||
28 | 28 | */ |
29 | 29 | public function createPaginator(string $parameter, int $limit = 25): PaginatorInterface |
30 | 30 | { |
31 | - if (!$this->container->has(ServerRequestInterface::class)) { |
|
31 | + if (!$this->container->has(ServerRequestInterface::class)) |
|
32 | + { |
|
32 | 33 | throw new ScopeException('Unable to create paginator, no request scope found'); |
33 | 34 | } |
34 | 35 | /** |
@@ -38,7 +39,8 @@ discard block |
||
38 | 39 | |
39 | 40 | //Getting page number |
40 | 41 | $page = 0; |
41 | - if (!empty($query[$parameter]) && \is_scalar($query[$parameter])) { |
|
42 | + if (!empty($query[$parameter]) && \is_scalar($query[$parameter])) |
|
43 | + { |
|
42 | 44 | $page = (int)$query[$parameter]; |
43 | 45 | } |
44 | 46 |