Format code using php-cs-fixer
This commit is contained in:
parent
43d7dc92cd
commit
d52c6184b9
352 changed files with 17473 additions and 17041 deletions
|
@ -7,9 +7,7 @@ class TimeFilledFormatter
|
|||
*/
|
||||
private $_seconds;
|
||||
|
||||
/*
|
||||
* @param string $seconds
|
||||
*/
|
||||
// @param string $seconds
|
||||
public function __construct($seconds)
|
||||
{
|
||||
$this->_seconds = $seconds;
|
||||
|
@ -17,23 +15,23 @@ class TimeFilledFormatter
|
|||
|
||||
public function format()
|
||||
{
|
||||
$formatted = "";
|
||||
$sign = ($this->_seconds < 0) ? "-" : "+";
|
||||
$formatted = '';
|
||||
$sign = ($this->_seconds < 0) ? '-' : '+';
|
||||
$perfect = true;
|
||||
|
||||
$time = Application_Common_DateHelper::secondsToPlaylistTime(abs($this->_seconds));
|
||||
$info = explode(":", $time);
|
||||
$info = explode(':', $time);
|
||||
|
||||
$formatted .= $sign;
|
||||
|
||||
if (intval($info[0]) > 0) {
|
||||
$info[0] = ltrim($info[0], "0");
|
||||
$info[0] = ltrim($info[0], '0');
|
||||
$formatted .= " {$info[0]}h";
|
||||
$perfect = false;
|
||||
}
|
||||
|
||||
if (intval($info[1]) > 0) {
|
||||
$info[1] = ltrim($info[1], "0");
|
||||
$info[1] = ltrim($info[1], '0');
|
||||
$formatted .= " {$info[1]}m";
|
||||
$perfect = false;
|
||||
}
|
||||
|
@ -46,7 +44,7 @@ class TimeFilledFormatter
|
|||
|
||||
//0 over/under lap of content.
|
||||
if ($perfect === true) {
|
||||
$formatted = "+ 0s";
|
||||
$formatted = '+ 0s';
|
||||
}
|
||||
|
||||
return $formatted;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue