Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/Adapter/Posix.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,15 @@ public function getWidth()
* Try to read env variable
*/
if (($result = getenv('COLUMNS')) !== false) {
return $width = (int)$result;
return $width = (int) $result;
}

/**
* Try to read console size from "tput" command
*/
$result = exec('tput cols', $output, $return);
if (!$return && is_numeric($result)) {
return $width = (int)$result;
return $width = (int) $result;
}

return $width = parent::getWidth();
Expand All @@ -145,7 +145,7 @@ public function getHeight()
// Try to read console size from "tput" command
$result = exec('tput lines', $output, $return);
if (!$return && is_numeric($result)) {
return $height = (int)$result;
return $height = (int) $result;
}

return $height = parent::getHeight();
Expand Down
2 changes: 1 addition & 1 deletion src/Adapter/Windows.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getHeight()
}

if (count($this->probeResult) && (int) $this->probeResult[1]) {
$height = (int)$this->probeResult[1];
$height = (int) $this->probeResult[1];
} else {
$height = parent::getheight();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Prompt/Number.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function show()
* Cast proper type
*/
if ($number !== null) {
$number = $this->allowFloat ? (double)$number : (int)$number;
$number = $this->allowFloat ? (double) $number : (int) $number;
}

return $this->lastResponse = $number;
Expand Down

0 comments on commit 2beef92

Please sign in to comment.