1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-08 07:06:52 +02:00

typos & whitespace

This commit is contained in:
David Grudl
2013-07-02 18:42:55 +02:00
parent 9e23730cb0
commit e87c112d71
55 changed files with 612 additions and 1299 deletions

View File

@@ -10,7 +10,6 @@
*/
/**
* DateTime with serialization and timestamp support for PHP 5.2.
*
@@ -33,7 +32,6 @@ class DibiDateTime extends DateTime
}
public function modifyClone($modify = '')
{
$dolly = clone($this);
@@ -41,7 +39,6 @@ class DibiDateTime extends DateTime
}
public function modify($modify)
{
parent::modify($modify);
@@ -49,7 +46,6 @@ class DibiDateTime extends DateTime
}
public function __sleep()
{
$this->fix = array($this->format('Y-m-d H:i:s'), $this->getTimezone()->getName());
@@ -57,7 +53,6 @@ class DibiDateTime extends DateTime
}
public function __wakeup()
{
$this->__construct($this->fix[0], new DateTimeZone($this->fix[1]));
@@ -65,21 +60,18 @@ class DibiDateTime extends DateTime
}
public function getTimestamp()
{
return (int) $this->format('U');
}
public function setTimestamp($timestamp)
{
return $this->__construct(date('Y-m-d H:i:s', $timestamp), new DateTimeZone($this->getTimezone()->getName())); // getTimeZone() crashes in PHP 5.2.6
}
public function __toString()
{
return $this->format('Y-m-d H:i:s');