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

style: run cs-fix after rules shorthand operator #7953

Merged
merged 1 commit into from
Sep 19, 2023
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
6 changes: 3 additions & 3 deletions system/BaseModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -1439,8 +1439,8 @@ public function setValidationRule(string $field, $fieldRules)
if (is_string($rules)) {
[$rules, $customErrors] = $this->validation->loadRuleGroup($rules);

$this->validationRules = $rules;
$this->validationMessages = $this->validationMessages + $customErrors;
$this->validationRules = $rules;
$this->validationMessages += $customErrors;
}

$this->validationRules[$field] = $fieldRules;
Expand Down Expand Up @@ -1510,7 +1510,7 @@ public function getValidationRules(array $options = []): array
if (is_string($rules)) {
[$rules, $customErrors] = $this->validation->loadRuleGroup($rules);

$this->validationMessages = $this->validationMessages + $customErrors;
$this->validationMessages += $customErrors;
}

if (isset($options['except'])) {
Expand Down
4 changes: 2 additions & 2 deletions system/CLI/CLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ public static function wrap(?string $string = null, int $max = 0, int $padLeft =
$max = self::getWidth();
}

$max = $max - $padLeft;
$max -= $padLeft;

$lines = wordwrap($string, $max, PHP_EOL);

Expand Down Expand Up @@ -1079,7 +1079,7 @@ public static function table(array $tbody, array $thead = [])
$diff = $maxColsLengths[$column] - static::strlen($col);

if ($diff) {
$tableRows[$row][$column] = $tableRows[$row][$column] . str_repeat(' ', $diff);
$tableRows[$row][$column] .= str_repeat(' ', $diff);
}

$column++;
Expand Down
2 changes: 1 addition & 1 deletion system/Format/JSONFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function format($data)
$config = new Format();

$options = $config->formatterOptions['application/json'] ?? JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
$options = $options | JSON_PARTIAL_OUTPUT_ON_ERROR;
$options |= JSON_PARTIAL_OUTPUT_ON_ERROR;

$options = ENVIRONMENT === 'production' ? $options : $options | JSON_PRETTY_PRINT;

Expand Down
4 changes: 2 additions & 2 deletions system/Images/Handlers/GDHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@ protected function _text(string $text, array $options = [])
// offset flips itself automatically

if ($options['vAlign'] === 'bottom') {
$options['vOffset'] = $options['vOffset'] * -1;
$options['vOffset'] *= -1;
}

if ($options['hAlign'] === 'right') {
$options['hOffset'] = $options['hOffset'] * -1;
$options['hOffset'] *= -1;
}

// Set font width and height
Expand Down
4 changes: 2 additions & 2 deletions system/Images/Handlers/ImageMagickHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,11 @@ protected function _text(string $text, array $options = [])
// invert the offset. Note: The horizontal
// offset flips itself automatically
if ($options['vAlign'] === 'bottom') {
$options['vOffset'] = $options['vOffset'] * -1;
$options['vOffset'] *= -1;
}

if ($options['hAlign'] === 'right') {
$options['hOffset'] = $options['hOffset'] * -1;
$options['hOffset'] *= -1;
}

// Font
Expand Down
2 changes: 1 addition & 1 deletion system/Throttle/Throttler.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function check(string $key, int $capacity, int $seconds, int $cost = 1):
// If $tokens >= 1, then we are safe to perform the action, but
// we need to decrement the number of available tokens.
if ($tokens >= 1) {
$tokens = $tokens - $cost;
$tokens -= $cost;
$this->cache->save($tokenName, $tokens, $seconds);
$this->cache->save($tokenName . 'Time', $this->time(), $seconds);

Expand Down
2 changes: 1 addition & 1 deletion tests/_support/View/Cells/MultiplierCell.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ class MultiplierCell extends Cell

public function mount(): void
{
$this->value = $this->value * $this->multiplier;
$this->value *= $this->multiplier;
}
}
Loading