Format code using php-cs-fixer
This commit is contained in:
parent
43d7dc92cd
commit
d52c6184b9
352 changed files with 17473 additions and 17041 deletions
|
@ -1,20 +1,14 @@
|
|||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'cc_show_days' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
* long as it does not already exist in the output directory.
|
||||
*
|
||||
* @package propel.generator.airtime
|
||||
*/
|
||||
class CcShowDays extends BaseCcShowDays {
|
||||
|
||||
class CcShowDays extends BaseCcShowDays
|
||||
{
|
||||
public function isRepeating()
|
||||
{
|
||||
return $this->getDbRepeatType() != -1;
|
||||
|
@ -26,7 +20,7 @@ class CcShowDays extends BaseCcShowDays {
|
|||
"{$this->getDbFirstShow()} {$this->getDbStartTime()}",
|
||||
new DateTimeZone($this->getDbTimezone())
|
||||
);
|
||||
$dt->setTimezone(new DateTimeZone("UTC"));
|
||||
$dt->setTimezone(new DateTimeZone('UTC'));
|
||||
|
||||
return $dt;
|
||||
}
|
||||
|
@ -34,38 +28,37 @@ class CcShowDays extends BaseCcShowDays {
|
|||
// Returns the start of a show in the timezone it was created in
|
||||
public function getLocalStartDateAndTime()
|
||||
{
|
||||
$dt = new DateTime(
|
||||
return new DateTime(
|
||||
"{$this->getDbFirstShow()} {$this->getDbStartTime()}",
|
||||
new DateTimeZone($this->getDbTimezone())
|
||||
);
|
||||
|
||||
//set timezone to that of the show
|
||||
//$dt->setTimezone(new DateTimeZone($this->getDbTimezone()));
|
||||
return $dt;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns the end of a show in the timezone it was created in
|
||||
* Returns the end of a show in the timezone it was created in.
|
||||
*
|
||||
* @param DateTime $startDateTime first show in show's local time
|
||||
*/
|
||||
public function getLocalEndDateAndTime()
|
||||
{
|
||||
$startDateTime = $this->getLocalStartDateAndTime();
|
||||
$duration = explode(":", $this->getDbDuration());
|
||||
$duration = explode(':', $this->getDbDuration());
|
||||
|
||||
return $startDateTime->add(new DateInterval('PT'.$duration[0].'H'.$duration[1].'M'));
|
||||
return $startDateTime->add(new DateInterval('PT' . $duration[0] . 'H' . $duration[1] . 'M'));
|
||||
}
|
||||
|
||||
public function isShowStartInPast()
|
||||
{
|
||||
return $this->getUTCStartDateAndTime()->format("Y-m-d H:i:s") < gmdate("Y-m-d H:i:s");
|
||||
return $this->getUTCStartDateAndTime()->format('Y-m-d H:i:s') < gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
public function formatDuration()
|
||||
{
|
||||
$info = explode(':',$this->getDbDuration());
|
||||
$info = explode(':', $this->getDbDuration());
|
||||
|
||||
return str_pad(intval($info[0]),2,'0',STR_PAD_LEFT).'h '.str_pad(intval($info[1]),2,'0',STR_PAD_LEFT).'m';
|
||||
return str_pad(intval($info[0]), 2, '0', STR_PAD_LEFT) . 'h ' . str_pad(intval($info[1]), 2, '0', STR_PAD_LEFT) . 'm';
|
||||
}
|
||||
} // CcShowDays
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue