CC-4090: Make code style PSR compliant - part 4

-models dir
This commit is contained in:
Martin Konecny 2012-08-29 10:58:03 -04:00
parent 699a49a103
commit 4848717d4d
17 changed files with 439 additions and 404 deletions

View file

@ -1,7 +1,7 @@
<?php
class BitrateFormatter {
class BitrateFormatter
{
/**
* @string length
*/
@ -19,7 +19,7 @@ class BitrateFormatter {
{
$Kbps = bcdiv($this->_bitrate, 1000, 0);
if($Kbps == 0) {
if ($Kbps == 0) {
return "";
} else {
return "{$Kbps} Kbps";

View file

@ -1,7 +1,7 @@
<?php
class LengthFormatter {
class LengthFormatter
{
/**
* @string length
*/
@ -15,7 +15,8 @@ class LengthFormatter {
$this->_length = $length;
}
public function format() {
public function format()
{
if (!preg_match("/^[0-9]{2}:[0-9]{2}:[0-9]{2}/", $this->_length)) {
return $this->_length;
}
@ -45,15 +46,13 @@ class LengthFormatter {
if (isset($hours) && isset($minutes) && isset($seconds)) {
$time = sprintf("%d:%02d:%02d.%s", $hours, $minutes, $seconds, $milliStr);
}
else if (isset($minutes) && isset($seconds)) {
} elseif (isset($minutes) && isset($seconds)) {
$time = sprintf("%d:%02d.%s", $minutes, $seconds, $milliStr);
}
else {
} else {
$time = sprintf("%d.%s", $seconds, $milliStr);
}
return $time;
}
}
}

View file

@ -1,7 +1,7 @@
<?php
class SamplerateFormatter {
class SamplerateFormatter
{
/**
* @string sample rate
*/
@ -21,4 +21,4 @@ class SamplerateFormatter {
return "{$kHz} kHz";
}
}
}

View file

@ -1,7 +1,7 @@
<?php
class TimeFilledFormatter {
class TimeFilledFormatter
{
/**
* @string seconds
*/
@ -51,4 +51,4 @@ class TimeFilledFormatter {
return $formatted;
}
}
}