Skip to content

Commit 125ca3e

Browse files
committed
Merge branch 'develop'
2 parents 1bd2a35 + 6f37601 commit 125ca3e

File tree

5 files changed

+166
-2
lines changed

5 files changed

+166
-2
lines changed

DashboardPanel.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ final public function render($options, $key = -1)
224224
}
225225

226226
// Update style with default options after setup
227-
$this->style = $this->style ?? $this->getStyleOptions() ?? [];
227+
$this->style ??= $this->getStyleOptions() ?? [];
228228

229229
// Include scripts and stylesheets
230230
$this->includeFiles();

DashboardPanelCollection.module

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,12 @@ class DashboardPanelCollection extends DashboardPanel
128128
$class = $column->class;
129129

130130
$field = $this->fields->get($markup);
131-
$fieldtype = $field ? "$field->type" : null;
131+
$fieldtype = is_object($field)
132+
? "$field->type"
133+
: (is_string($field)
134+
? $field
135+
: null);
136+
132137
$content = null;
133138

134139
// Special case: action links

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require-dev": {
3+
"rector/rector": "^2.0"
4+
}
5+
}

composer.lock

Lines changed: 136 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rector.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Rector\Config\RectorConfig;
6+
7+
return RectorConfig::configure()
8+
->withPaths([__DIR__])
9+
->withSkip([__DIR__ . '/vendor'])
10+
->withPhpSets(php83: true)
11+
->withRules([
12+
// TypedPropertyFromStrictConstructorRector::class
13+
])
14+
// here we can define, what prepared sets of rules will be applied
15+
->withPreparedSets(
16+
// deadCode: true,
17+
// codeQuality: true
18+
);

0 commit comments

Comments
 (0)