Skip to content

Commit 4db16a4

Browse files
committed
EIO adapter: DateTime => DateTimeImmutable
1 parent b741ee8 commit 4db16a4

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/Eio/Adapter.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace React\Filesystem\Eio;
44

5+
use DateTimeImmutable;
56
use React\EventLoop\LoopInterface;
67
use React\Filesystem\AdapterInterface;
78
use React\Filesystem\CallInvokerInterface;
@@ -144,9 +145,9 @@ public function setReadDirInvoker(CallInvokerInterface $invoker)
144145
public function stat($filename)
145146
{
146147
return $this->invoker->invokeCall('eio_lstat', [$filename])->then(function ($stat) {
147-
$stat['atime'] = new \DateTime('@' .$stat['atime']);
148-
$stat['mtime'] = new \DateTime('@' .$stat['mtime']);
149-
$stat['ctime'] = new \DateTime('@' .$stat['ctime']);
148+
$stat['atime'] = new DateTimeImmutable('@' .$stat['atime']);
149+
$stat['mtime'] = new DateTimeImmutable('@' .$stat['mtime']);
150+
$stat['ctime'] = new DateTimeImmutable('@' .$stat['ctime']);
150151
return \React\Promise\resolve($stat);
151152
});
152153
}

0 commit comments

Comments
 (0)