Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2k
[Rector] Apply BooleanInIfConditionRuleFixerRector#7951
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
83ebb798e288d241ecd8b2d3327f8be0e01eb8d382594fcc211fcb7a9c49724e73893f534d9178f015f89cb0fba201f4a0ca30ea66f2c5ff3803fbcfaa0c99031724531ed124File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1194,7 +1194,7 @@ public function paginate(?int $perPage = null, string $group = 'default', ?int $ | ||
| // Since multiple models may use the Pager, the Pager must be shared. | ||
| $pager = Services::pager(); | ||
| if ($segment) { | ||
| if ($segment !== 0) { | ||
| $pager->setSegment($segment, $group); | ||
| } | ||
| @@ -1656,8 +1656,10 @@ protected function objectToArray($data, bool $onlyChanged = true, bool $recursiv | ||
| { | ||
| $properties = $this->objectToRawArray($data, $onlyChanged, $recursive); | ||
| assert(is_array($properties)); | ||
| // Convert any Time instances to appropriate $dateFormat | ||
| if ($properties) { | ||
| if ($properties !== []) { | ||
samsonasik marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| $properties = array_map(function ($value) { | ||
| if ($value instanceof Time) { | ||
| return $this->timeToDate($value); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -267,7 +267,7 @@ public static function prompt(string $field, $options = null, $validation = null | ||
| // Read the input from keyboard. | ||
| $input = trim(static::input()) ?: $default; | ||
| if ($validation) { | ||
| if ($validation !== []) { | ||
| while (! static::validate('"' . trim($field) . '"', $input, $validation)) { | ||
| $input = static::prompt($field, $options, $validation); | ||
| } | ||
| @@ -1088,7 +1088,7 @@ public static function table(array $tbody, array $thead = []) | ||
| foreach ($tableRows[$row] as $col) { | ||
| $diff = $maxColsLengths[$column] - static::strlen($col); | ||
| if ($diff) { | ||
| if ($diff !== 0) { | ||
samsonasik marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| $tableRows[$row][$column] .= str_repeat(' ', $diff); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -133,7 +133,7 @@ public function save(string $key, $value, int $ttl = 60) | ||
| return false; | ||
| } | ||
| if ($ttl) { | ||
| if ($ttl !== 0) { | ||
samsonasik marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| $this->redis->expireat($key, Time::now()->getTimestamp() + $ttl); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -159,7 +159,7 @@ public function save(string $key, $value, int $ttl = 60) | ||
| return false; | ||
| } | ||
| if ($ttl) { | ||
| if ($ttl !== 0) { | ||
samsonasik marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| $this->redis->expireAt($key, Time::now()->getTimestamp() + $ttl); | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.