Skip to content

Commit

Permalink
Enables method chaining on a few methods that would benefit from such…
Browse files Browse the repository at this point in the history
… a feature. Bumping Composer version to 1.1.0.
  • Loading branch information
allebb committed Jan 14, 2016
1 parent e6c45a2 commit b52f334
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ballen/clip",
"version": "1.0.0",
"version": "1.1.0",
"description": "A package for speeding up development of PHP console (CLI) applications.",
"type": "library",
"keywords": ["cli", "commands", "command", "console"],
Expand Down
9 changes: 7 additions & 2 deletions src/ConsoleApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,25 @@ public function call($command)
}

/**
* Write to the CLI.
* Write to the console.
* @param string $text The text to output.
* @return \Ballen\Clip\ConsoleApplication
*/
public function write($text = '')
{
fwrite(STDOUT, $text);
return $this;
}

/**
* Write a line of characters (or an empty line) to the CLI.
* @param string $text The text to output.
* @return \Ballen\Clip\ConsoleApplication
*/
public function writeln($text = '')
{
$this->write($text . PHP_EOL);
return $this;
}

/**
Expand Down Expand Up @@ -156,11 +160,12 @@ public function input($question, $default = '', $options = [])
/**
* Writes an array to the CLI output
* @param array $array The array of data to write to the console.
* @return void
* @return \Ballen\Clip\ConsoleApplication
*/
public function writearr($array = [])
{
print_r($array);
return $this;
}

/**
Expand Down

0 comments on commit b52f334

Please sign in to comment.