Skip to content

Commit 5d1c0e3

Browse files
committed
cs
1 parent 47aeec1 commit 5d1c0e3

File tree

10 files changed

+28
-12
lines changed

10 files changed

+28
-12
lines changed

ncs.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Custom" namespace="Nette">
3+
<rule ref="$presets/php72.xml"/>
4+
5+
<rule ref="Squiz.Commenting.FunctionComment.ExtraParamComment">
6+
<exclude-pattern>./src/Application/UI/Control.php</exclude-pattern>
7+
<exclude-pattern>./src/Application/UI/Presenter.php</exclude-pattern>
8+
</rule>
9+
</ruleset>

src/Application/UI/Presenter.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,8 @@ protected function createRequest(
780780
string $destination,
781781
array $args,
782782
string $mode
783-
): ?string {
783+
): ?string
784+
{
784785
// note: createRequest supposes that saveState(), run() & tryCall() behaviour is final
785786

786787
$this->lastCreatedRequest = $this->lastCreatedRequestFlag = null;
@@ -1034,7 +1035,8 @@ public static function argsToParams(
10341035
array &$args,
10351036
array $supplemental = [],
10361037
?array &$missing = null
1037-
): void {
1038+
): void
1039+
{
10381040
$i = 0;
10391041
$rm = new \ReflectionMethod($class, $method);
10401042
foreach ($rm->getParameters() as $param) {

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ private function findPresenters(): array
211211
public static function initializeBlueScreenPanel(
212212
Tracy\BlueScreen $blueScreen,
213213
Nette\Application\Application $application
214-
): void {
214+
): void
215+
{
215216
$blueScreen->addPanel(function (?\Throwable $e) use ($application, $blueScreen): ?array {
216217
$dumper = $blueScreen->getDumper();
217218
return $e ? null : [

src/Bridges/ApplicationLatte/TemplateFactory.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ private function setupLatte2(
132132
?UI\Control $control,
133133
?UI\Presenter $presenter,
134134
Template $template
135-
): void {
135+
): void
136+
{
136137
if ($latte->onCompile instanceof \Traversable) {
137138
$latte->onCompile = iterator_to_array($latte->onCompile);
138139
}

src/Bridges/ApplicationTracy/RoutingPanel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ private function analyse(
9292
?string $path = null,
9393
int $level = -1,
9494
int $flag = 0
95-
): void {
95+
): void
96+
{
9697
if ($router instanceof Routing\RouteList) {
9798
if ($httpRequest) {
9899
try {

tests/Bridges.Latte2/UIMacros.link.2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ link:['login']
9191
<a href="link:['default!#hash',10,20]"></a>
9292
EOD
9393

94-
, strtr($latte->renderToString(<<<'EOD'
94+
, strtr($latte->renderToString(<<<'EOD'
9595
{plink Homepage:}
9696
9797
{plink Homepage: }
@@ -122,4 +122,4 @@ EOD
122122
123123
<a n:href="default!#hash 10, 20"></a>
124124
EOD
125-
, $params), ['&#039;' => "'", '&apos;' => "'", '&#123;' => '{']));
125+
, $params), ['&#039;' => "'", '&apos;' => "'", '&#123;' => '{']));

tests/Bridges.Latte3/{control}.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Assert::match(
5151
$ʟ_tmp->renderType() /* line 1 */;
5252
%A%
5353
XX
54-
,
54+
,
5555
$latte->compile('{control form:type}'),
5656
);
5757

tests/Bridges.Latte3/{link}.2.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Assert::match(<<<'EOD'
9090
<a href="link:['default!#hash',10,20]"></a>
9191
EOD
9292

93-
, strtr($latte->renderToString(<<<'EOD'
93+
, strtr($latte->renderToString(<<<'EOD'
9494
{plink Homepage:}
9595
9696
{plink Homepage: }
@@ -121,4 +121,4 @@ Assert::match(<<<'EOD'
121121
122122
<a n:href="default!#hash 10, 20"></a>
123123
EOD
124-
, $params), ['&#039;' => "'", '&apos;' => "'", '&#123;' => '{']));
124+
, $params), ['&#039;' => "'", '&apos;' => "'", '&#123;' => '{']));

tests/UI/Component.isLinkCurrent().asserts.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ function callIsComponentLinkCurrent(
2424
Application\Request $request,
2525
$destination,
2626
array $args
27-
): bool {
27+
): bool
28+
{
2829
$url = new Http\UrlScript('http://localhost/index.php', '/index.php');
2930
$presenterFactory = Mockery::mock(Nette\Application\IPresenterFactory::class);
3031
$presenterFactory->shouldReceive('getPresenterClass')->andReturn('TestPresenter');

tests/UI/Presenter.storeRequest().phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ class MockSession extends Http\Session
3636
public function getSection(
3737
string $section,
3838
string $class = Nette\Http\SessionSection::class
39-
): Nette\Http\SessionSection {
39+
): Nette\Http\SessionSection
40+
{
4041
return $this->testSection;
4142
}
4243
}

0 commit comments

Comments
 (0)