Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aktualisiere PHP-CS-Fixer auf v3.62.0 #40

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fix-cs-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
ref: ${{ github.head_ref }}

- name: Run PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:3.11.0
uses: docker://ghcr.io/webfactory/php-cs-fixer:3.62.0

- name: Commit and push back changes
uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
8 changes: 4 additions & 4 deletions src/Build/TreeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public function __construct(
ConfigCacheFactoryInterface $configCacheFactory,
$cacheFile,
ContainerInterface $container,
EventDispatcherInterface $eventDispatcher = null,
LoggerInterface $logger = null,
Stopwatch $stopwatch = null
?EventDispatcherInterface $eventDispatcher = null,
?LoggerInterface $logger = null,
?Stopwatch $stopwatch = null
) {
$this->configCacheFactory = $configCacheFactory;
$this->cacheFile = $cacheFile;
Expand All @@ -80,7 +80,7 @@ protected function startTiming(string $sectionName): ?StopwatchEvent
return null;
}

protected function stopTiming(StopwatchEvent $watch = null): void
protected function stopTiming(?StopwatchEvent $watch = null): void
{
if ($watch) {
$watch->stop();
Expand Down
16 changes: 2 additions & 14 deletions src/Tree/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Node implements \ArrayAccess
/**
* @var Node|null
*/
protected $parent = null;
protected $parent;

protected $data = ['visible' => false, 'breadcrumbsVisible' => true, 'url' => false, 'caption' => ''];

Expand All @@ -34,7 +34,7 @@ class Node implements \ArrayAccess
*
* @return Node returns the given or newly created node, for use in fluent notations
*/
public function addChild(self $n = null): self
public function addChild(?self $n = null): self
{
if (null === $n) {
$n = new self();
Expand Down Expand Up @@ -243,17 +243,12 @@ public function isActivePath(): bool
return $this === $ap || $this->hasDescendant($ap);
}

/**
* @param mixed $offset
*/
public function offsetExists($offset): bool
{
return isset($this->data[$offset]);
}

/**
* @param mixed $offset
*
* @return mixed|null
*/
#[\ReturnTypeWillChange]
Expand All @@ -262,18 +257,11 @@ public function offsetGet($offset)
return $this->get($offset);
}

/**
* @param mixed $offset
* @param mixed $value
*/
public function offsetSet($offset, $value): void
{
$this->set($offset, $value);
}

/**
* @param mixed $offset
*/
public function offsetUnset($offset): void
{
unset($this->data[$offset]);
Expand Down
6 changes: 3 additions & 3 deletions src/Tree/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Tree
*
* @var Node|null
*/
protected $activeNode = null;
protected $activeNode;

/**
* The "closest to active" node in this tree.
Expand All @@ -30,14 +30,14 @@ class Tree
*
* @var ?Node
*/
protected $activePath = null;
protected $activePath;

public function __construct()
{
$this->finder = new Finder();
}

public function addRoot(Node $r = null): Node
public function addRoot(?Node $r = null): Node
{
if (null === $r) {
$r = new Node();
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/NavigationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function getPowerSet(array $baseSet): array
$members = 2 ** $count;
$powerSet = [];
for ($i = 0; $i < $members; ++$i) {
$b = sprintf('%0'.$count.'b', $i);
$b = \sprintf('%0'.$count.'b', $i);
$out = [];
for ($j = 0; $j < $count; ++$j) {
if ('1' == $b[$j]) {
Expand Down