mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 17:58:41 +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.
|
||||
*
|
||||
* @param Node $node Graph node
|
||||
* @param int $key Index for absolute position
|
||||
* @param booll $isDirected Is directed
|
||||
* @param Node $node Graph node
|
||||
* @param int $key Index for absolute position
|
||||
* @param bool $isDirected Is directed
|
||||
*
|
||||
* @return Edge
|
||||
*
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ abstract class FileAbstract implements ContainerInterface
|
|||
/**
|
||||
* Created at.
|
||||
*
|
||||
* @var \DateTime
|
||||
* @var \DateTimeImmutable
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected \DateTimeImmutable $createdAt;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ abstract class FileAbstract implements ContainerInterface
|
|||
/**
|
||||
* Created at.
|
||||
*
|
||||
* @var \DateTime
|
||||
* @var \DateTimeImmutable
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected \DateTimeImmutable $createdAt;
|
||||
|
|
@ -188,8 +188,8 @@ abstract class FileAbstract implements ContainerInterface
|
|||
$mtime = \filemtime($this->path);
|
||||
$ctime = \filectime($this->path);
|
||||
|
||||
$this->createdAt->setTimestamp($mtime === false ? 0 : $mtime);
|
||||
$this->changedAt->setTimestamp($ctime === false ? 0 : $ctime);
|
||||
$this->createdAt = (new \DateTimeImmutable())->setTimestamp($mtime === false ? 0 : $mtime);
|
||||
$this->changedAt = (new \DateTimeImmutable())->setTimestamp($ctime === false ? 0 : $ctime);
|
||||
|
||||
$owner = \fileowner($this->path);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user