Skip to content

Commit

Permalink
Fix code styling
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored and github-actions[bot] committed Sep 8, 2023
1 parent c59734c commit d6a1b43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/SelectPrompt.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function __construct(

// If the default is not visible, scroll and center it.
// If it's near the end of the list, we just scroll to the end.
if($this->highlighted >= $this->scroll){
if ($this->highlighted >= $this->scroll) {
$optionsLeft = count($this->options) - $this->highlighted - 1;
$halfScroll = (int) floor($this->scroll / 2);
$endOffset = max(0, $halfScroll - $optionsLeft);
Expand All @@ -61,7 +61,7 @@ public function __construct(
// in order to take the highlighted option into account.
// Since when the scroll is odd the halfScroll is floored,
// we don't need to do anything.
if($this->scroll % 2 === 0){
if ($this->scroll % 2 === 0) {
$endOffset--;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/Feature/SelectPromptTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
'Pink',
'Brown',
'Black',
]
],
],
'even' => [
'scroll' => 6,
Expand All @@ -206,6 +206,6 @@
'Pink',
'Brown',
'Black',
]
],
],
]);

0 comments on commit d6a1b43

Please sign in to comment.