Skip to content
Permalink
Browse files

Correct style

  • Loading branch information...
Matt Reishus
Matt Reishus committed Sep 1, 2013
1 parent 916d992 commit 3b057cb82b1a04fe4598e898c6cd575b8d445808
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/Cake/Console/ConsoleInput.php
@@ -31,6 +31,7 @@ class ConsoleInput {
* @var resource
*/
protected $_input;
/**
* Can this instance use readline?
* Two conditions must be met:
@@ -40,15 +41,15 @@ class ConsoleInput {
*
* @var bool
*/
private $_can_readline;
private $__canReadline;
/**
* Constructor
*
* @param string $handle The location of the stream to use as input.
*/
public function __construct($handle = 'php://stdin') {
$this->_can_readline = extension_loaded('readline') && $handle == 'php://stdin' ? true : false;
$this->__canReadline = extension_loaded('readline') && $handle == 'php://stdin' ? true : false;
$this->_input = fopen($handle, 'r');
}
@@ -58,7 +59,7 @@ public function __construct($handle = 'php://stdin') {
* @return mixed The value of the stream
*/
public function read() {
if ($this->_can_readline) {
if ($this->__canReadline) {
$line = readline('');
if (!empty($line)) {
readline_add_history($line);

0 comments on commit 3b057cb

Please sign in to comment.
You can’t perform that action at this time.