Skip to content

Commit 42ab306

Browse files
committed
coding style
1 parent 66c40dd commit 42ab306

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/Application/LinkGenerator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public function link(string $dest, array $params = []): string
5959
if ($action === '') {
6060
$action = UI\Presenter::DEFAULT_ACTION;
6161
}
62-
if (method_exists($class, $method = $class::formatActionMethod($action))
62+
if (
63+
method_exists($class, $method = $class::formatActionMethod($action))
6364
|| method_exists($class, $method = $class::formatRenderMethod($action))
6465
) {
6566
UI\Presenter::argsToParams($class, $method, $params, [], $missing);

src/Application/UI/ComponentReflection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public function saveState(Component $component, array &$params): void
9696
if (isset($params[$name])) {
9797
// injected value
9898

99-
} elseif (array_key_exists($name, $params) // nulls are skipped
99+
} elseif (
100+
array_key_exists($name, $params) // nulls are skipped
100101
|| (isset($meta['since']) && !$component instanceof $meta['since']) // not related
101102
|| !isset($component->$name)
102103
) {

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,11 @@ private function findPresenters(): array
151151

152152
$presenters = [];
153153
foreach (array_unique($classes) as $class) {
154-
if (strpos($class, $config['scanFilter']) !== false && class_exists($class)
155-
&& ($rc = new \ReflectionClass($class)) && $rc->implementsInterface(Nette\Application\IPresenter::class)
154+
if (
155+
strpos($class, $config['scanFilter']) !== false
156+
&& class_exists($class)
157+
&& ($rc = new \ReflectionClass($class))
158+
&& $rc->implementsInterface(Nette\Application\IPresenter::class)
156159
&& !$rc->isAbstract()
157160
) {
158161
$presenters[] = $rc->getName();

src/Bridges/ApplicationLatte/UIRuntime.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ public static function initialize(Latte\Runtime\Template $template, &$parentName
2525
{
2626
$providers = $template->global;
2727
$blocks = array_filter(array_keys($blocks), function ($s) { return $s[0] !== '_'; });
28-
if ($parentName === null && $blocks && !$template->getReferringTemplate()
28+
if (
29+
$parentName === null
30+
&& $blocks
31+
&& !$template->getReferringTemplate()
2932
&& ($providers->uiControl ?? null) instanceof Nette\Application\UI\Presenter
3033
) {
3134
$parentName = $providers->uiControl->findLayoutTemplateFile();

0 commit comments

Comments
 (0)