From 97599cec6298874047ca5187baad2336a967a6d2 Mon Sep 17 00:00:00 2001 From: Bozhidar Hristov Date: Mon, 27 Nov 2023 22:48:00 +0200 Subject: [PATCH] add decorated file generics --- src/Model/DecoratedFile.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Model/DecoratedFile.php b/src/Model/DecoratedFile.php index 8710d1f..6263bd1 100644 --- a/src/Model/DecoratedFile.php +++ b/src/Model/DecoratedFile.php @@ -6,15 +6,27 @@ use DateTimeImmutable; +/** + * @template T of File + */ abstract class DecoratedFile implements File { + /** + * @var T + */ protected File $decorated; + /** + * @param T $decorated + */ public function __construct(File $decorated) { $this->decorated = $decorated; } + /** + * @return T + */ public function getDecorated(): File { return $this->decorated;