Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Oct 13, 2022
1 parent ef62458 commit a015d07
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion src/DI/Definitions/Statement.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function __construct($entity, array $arguments = [])
|| $entity[0] instanceof self
|| $entity[0] instanceof Reference
|| $entity[0] instanceof Definition)
)) {
)) {
throw new Nette\InvalidArgumentException('Argument is not valid Statement entity.');
}

Expand Down
3 changes: 2 additions & 1 deletion src/DI/DependencyChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ public static function isExpired(
array $classes,
array $functions,
string $hash
): bool {
): bool
{
try {
$currentFiles = @array_map('filemtime', array_combine($tmp = array_keys($files), $tmp)); // @ - files may not exist
$origPhpFiles = $phpFiles;
Expand Down
2 changes: 1 addition & 1 deletion src/DI/Extensions/ServicesExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private function loadDefinition(?string $name, \stdClass $config): void

$def = $this->retrieveDefinition($name, $config);

static $methods = [
$methods = [
Definitions\ServiceDefinition::class => 'updateServiceDefinition',
Definitions\AccessorDefinition::class => 'updateAccessorDefinition',
Definitions\FactoryDefinition::class => 'updateFactoryDefinition',
Expand Down
3 changes: 2 additions & 1 deletion src/DI/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,8 @@ public static function autowireArguments(
\ReflectionFunctionAbstract $method,
array $arguments,
callable $getter
): array {
): array
{
$optCount = 0;
$useName = false;
$num = -1;
Expand Down
3 changes: 2 additions & 1 deletion tests/DI/ContainerBuilder.enum.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ use Tester\Assert;
require __DIR__ . '/../bootstrap.php';


enum Suit {
enum Suit
{
case Clubs;
case Diamonds;
case Hearts;
Expand Down
3 changes: 1 addition & 2 deletions tests/DI/ContainerBuilder.factory.resolveClass.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ namespace C
}
}

namespace
{
namespace {
use Nette\DI;
use Tester\Assert;

Expand Down
2 changes: 1 addition & 1 deletion tests/DI/Definitions.AccessorDefinition.render.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function createServiceAbc(): Good2
};
}
XX
,
,
$method->__toString()
);
});
2 changes: 1 addition & 1 deletion tests/DI/Definitions.ImportedDefinition.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function createServiceAbc(): void
throw new Nette\DI\ServiceCreationException('Unable to create imported service \'abc\', it must be added using addService()');
}
XX
,
,
$method->__toString()
);
});
2 changes: 1 addition & 1 deletion tests/DI/Definitions.LocatorDefinition.render.create.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function createServiceAbc(): Good
};
}
XX
,
,
$method->__toString()
);
});
2 changes: 1 addition & 1 deletion tests/DI/Definitions.LocatorDefinition.render.get.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function createServiceAbc(): Good
};
}
XX
,
,
$method->__toString()
);
});
2 changes: 1 addition & 1 deletion tests/DI/Definitions.LocatorDefinition.render.multi.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function createServiceAbc(): Good
};
}
XX
,
,
$method->__toString()
);
});
3 changes: 1 addition & 2 deletions tests/DI/InjectExtension.getInjectProperties().php74.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ namespace A
}
}

namespace
{
namespace {
use Nette\DI\Extensions\InjectExtension;
use Tester\Assert;

Expand Down
3 changes: 1 addition & 2 deletions tests/DI/InjectExtension.getInjectProperties().phpt
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ namespace C
}
}

namespace
{
namespace {
use Nette\DI\Extensions\InjectExtension;
use Tester\Assert;

Expand Down
3 changes: 1 addition & 2 deletions tests/DI/InjectExtension.getInjectProperties().traits.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ namespace C
}
}

namespace
{
namespace {
use Nette\DI\Extensions\InjectExtension;
use Tester\Assert;

Expand Down
2 changes: 1 addition & 1 deletion tests/DI/NeonAdapter.basic.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ services:
- Lorem(1)::foo()

EOD
, $adapter->dump($data));
, $adapter->dump($data));
4 changes: 2 additions & 2 deletions tests/DI/NeonAdapter.preprocess.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Assert::match(<<<'EOD'
- ent(2)::inner(3, 4)
- ent(3)::inner(5)
EOD
, $adapter->dump($data));
, $adapter->dump($data));


// references
Expand All @@ -58,7 +58,7 @@ Assert::match(<<<'EOD'
a: @foo::method(@bar)
b: @foo()
EOD
, $adapter->dump($data));
, $adapter->dump($data));


// _
Expand Down
2 changes: 1 addition & 1 deletion tests/DI/PhpAdapter.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ return [
],
];
EOD
, file_get_contents(TEMP_FILE));
, file_get_contents(TEMP_FILE));

0 comments on commit a015d07

Please sign in to comment.