Skip to content

Commit

Permalink
Adjust to CS fixer v3.2 rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Oct 5, 2021
1 parent 4bf8f12 commit 0bff5ad
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion demos/basic/button.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
// Creating your own button component example

/** @var Button $forkButtonClass */
$forkButtonClass = get_class(new class(0) extends Button { // need 0 argument here for constructor
$forkButtonClass = get_class(new class(0) /* need 0 argument here for constructor */ extends Button {
public function __construct($n)
{
Icon::addTo(Button::addTo($this, ['Forks', 'blue']), ['fork']);
Expand Down
6 changes: 3 additions & 3 deletions src/Form/Control/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ protected function init(): void

if ($this->type === 'datetime' || $this->type === 'time') {
$this->options['enableTime'] = true;
$this->options['time_24hr'] = $this->options['time_24hr'] ?? $this->use24hrTimeFormat($this->options['altFormat'] ?? $this->options['dateFormat']);
$this->options['time_24hr'] ??= $this->use24hrTimeFormat($this->options['altFormat'] ?? $this->options['dateFormat']);
$this->options['noCalendar'] = ($this->type === 'time');

// Add seconds picker if set
$this->options['enableSeconds'] = $this->options['enableSeconds'] ?? $this->useSeconds($this->options['altFormat'] ?? $this->options['dateFormat']);
$this->options['enableSeconds'] ??= $this->useSeconds($this->options['altFormat'] ?? $this->options['dateFormat']);

// Allow edit if microseconds is set.
$this->options['allowInput'] = $this->options['allowInput'] ?? $this->allowMicroSecondsInput($this->options['altFormat'] ?? $this->options['dateFormat']);
$this->options['allowInput'] ??= $this->allowMicroSecondsInput($this->options['altFormat'] ?? $this->options['dateFormat']);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Control/Multiline.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ protected function getLookupProps(Field $field): array
$props['config']['search'] = true;
}

$props['config']['placeholder'] = $props['config']['placeholder'] ?? 'Select ' . $field->getCaption();
$props['config']['placeholder'] ??= 'Select ' . $field->getCaption();

$this->valuePropsBinding[$field->short_name] = [__CLASS__, 'setLookupOptionValue'];

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Control/ScopeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ protected function getLookupProps(Field $field): array
$props['search'] = true;
}

$props['placeholder'] = $props['placeholder'] ?? 'Select ' . $field->getCaption();
$props['placeholder'] ??= 'Select ' . $field->getCaption();

return $props;
}
Expand Down
2 changes: 1 addition & 1 deletion src/JsSse.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function sendBlock(string $id, string $data, string $name = null): void
}

$this->output('id: ' . $id . "\n");
if (strlen($name) > 0) {
if ($name !== null) {
$this->output('event: ' . $name . "\n");
}
$this->output($this->wrapData($data) . "\n");
Expand Down
2 changes: 1 addition & 1 deletion src/Table/Column/ColorRating.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private function createGradientSingle(&$gradients, $hexFrom, $hexTo, $steps)

public function getTagAttributes($position, array $attr = []): array
{
$attr['style'] = $attr['style'] ?? '';
$attr['style'] ??= '';
$attr['style'] .= '{$_' . $this->short_name . '_color_rating}';

return parent::getTagAttributes($position, $attr);
Expand Down
2 changes: 1 addition & 1 deletion src/UserAction/ConfirmationExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function setAction(Model\UserAction $action): Modal
$this->action = $action;
$this->afterActionInit($action);

$this->title = $this->title ?? $action->getDescription();
$this->title ??= $action->getDescription();
$this->step = $this->stickyGet('step');

$this->actionInitialized = true;
Expand Down
2 changes: 1 addition & 1 deletion src/UserAction/ModalExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function setAction(Model\UserAction $action): View

// get necessary step need prior to execute action.
if ($this->steps = $this->getSteps($action)) {
$this->title = $this->title ?? $action->getDescription();
$this->title ??= $action->getDescription();

// get current step.
$this->step = $this->stickyGet('step') ?? $this->steps[0];
Expand Down

0 comments on commit 0bff5ad

Please sign in to comment.