minor #18783 [Console] remove methods that were needed for PHP 5.3 (xabbuh)

This PR was merged into the 3.0 branch.

Discussion
----------

[Console] remove methods that were needed for PHP 5.3

| Q             | A
| ------------- | ---
| Branch?       | 3.0
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

7d9e74e remove methods that were needed for PHP 5.3
This commit is contained in:
Tobias Schultze 2016-05-15 11:45:37 +02:00
commit 2484087a12

View File

@ -76,42 +76,6 @@ class ProgressIndicator
$this->display(); $this->display();
} }
/**
* Gets the current indicator message.
*
* @return string|null
*
* @internal for PHP 5.3 compatibility
*/
public function getMessage()
{
return $this->message;
}
/**
* Gets the progress bar start time.
*
* @return int The progress bar start time
*
* @internal for PHP 5.3 compatibility
*/
public function getStartTime()
{
return $this->startTime;
}
/**
* Gets the current animated indicator character.
*
* @return string
*
* @internal for PHP 5.3 compatibility
*/
public function getCurrentValue()
{
return $this->indicatorValues[$this->indicatorCurrent % count($this->indicatorValues)];
}
/** /**
* Starts the indicator output. * Starts the indicator output.
* *
@ -294,13 +258,13 @@ class ProgressIndicator
{ {
return array( return array(
'indicator' => function (ProgressIndicator $indicator) { 'indicator' => function (ProgressIndicator $indicator) {
return $indicator->getCurrentValue(); return $indicator->indicatorValues[$indicator->indicatorCurrent % count($indicator->indicatorValues)];
}, },
'message' => function (ProgressIndicator $indicator) { 'message' => function (ProgressIndicator $indicator) {
return $indicator->getMessage(); return $indicator->message;
}, },
'elapsed' => function (ProgressIndicator $indicator) { 'elapsed' => function (ProgressIndicator $indicator) {
return Helper::formatTime(time() - $indicator->getStartTime()); return Helper::formatTime(time() - $indicator->startTime);
}, },
'memory' => function () { 'memory' => function () {
return Helper::formatMemory(memory_get_usage(true)); return Helper::formatMemory(memory_get_usage(true));