|
@@ 153-161 (lines=9) @@
|
| 150 |
|
/** |
| 151 |
|
* {@inheritdoc} |
| 152 |
|
*/ |
| 153 |
|
public function setCreatedAt($createdAt) |
| 154 |
|
{ |
| 155 |
|
if (!is_integer($createdAt) && !$createdAt instanceof \DateTime) { |
| 156 |
|
throw new \InvalidArgumentException(sprintf('Integer or \DateTime expected, got: "%s".', BackupException::typeOf($createdAt))); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
$this->createdAt = is_integer($createdAt) ? date_timestamp_set(new \DateTime(), $createdAt) : $createdAt; |
| 160 |
|
return $this; |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
/** |
| 164 |
|
* {@inheritdoc} |
|
@@ 174-182 (lines=9) @@
|
| 171 |
|
/** |
| 172 |
|
* {@inheritdoc} |
| 173 |
|
*/ |
| 174 |
|
public function setModifiedAt($modifiedAt) |
| 175 |
|
{ |
| 176 |
|
if (!is_integer($modifiedAt) && !$modifiedAt instanceof \DateTime) { |
| 177 |
|
throw new \InvalidArgumentException(sprintf('Integer or \DateTime expected, got: "%s".', BackupException::typeOf($modifiedAt))); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
$this->modifiedAt = is_integer($modifiedAt) ? date_timestamp_set(new \DateTime(), $modifiedAt) : $modifiedAt; |
| 181 |
|
return $this; |
| 182 |
|
} |
| 183 |
|
} |
| 184 |
|
|