mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-12 14:58:42 +00:00
fix DateTimeImmutable typehint
This commit is contained in:
parent
ad28da979e
commit
49135aefab
|
|
@ -117,9 +117,9 @@ class Node
|
||||||
/**
|
/**
|
||||||
* Set a relative undirected node.
|
* Set a relative undirected node.
|
||||||
*
|
*
|
||||||
* @param Node $node Graph node
|
* @param Node $node Graph node
|
||||||
* @param int $key Index for absolute position
|
* @param int $key Index for absolute position
|
||||||
* @param booll $isDirected Is directed
|
* @param bool $isDirected Is directed
|
||||||
*
|
*
|
||||||
* @return Edge
|
* @return Edge
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ abstract class FileAbstract implements ContainerInterface
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var \DateTimeImmutable
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected \DateTimeImmutable $createdAt;
|
protected \DateTimeImmutable $createdAt;
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ abstract class FileAbstract implements ContainerInterface
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var \DateTime
|
* @var \DateTimeImmutable
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected \DateTimeImmutable $createdAt;
|
protected \DateTimeImmutable $createdAt;
|
||||||
|
|
@ -188,8 +188,8 @@ abstract class FileAbstract implements ContainerInterface
|
||||||
$mtime = \filemtime($this->path);
|
$mtime = \filemtime($this->path);
|
||||||
$ctime = \filectime($this->path);
|
$ctime = \filectime($this->path);
|
||||||
|
|
||||||
$this->createdAt->setTimestamp($mtime === false ? 0 : $mtime);
|
$this->createdAt = (new \DateTimeImmutable())->setTimestamp($mtime === false ? 0 : $mtime);
|
||||||
$this->changedAt->setTimestamp($ctime === false ? 0 : $ctime);
|
$this->changedAt = (new \DateTimeImmutable())->setTimestamp($ctime === false ? 0 : $ctime);
|
||||||
|
|
||||||
$owner = \fileowner($this->path);
|
$owner = \fileowner($this->path);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user