Skip to content

Commit

Permalink
add decorated file generics
Browse files Browse the repository at this point in the history
  • Loading branch information
Warxcell committed Nov 27, 2023
1 parent 47c1013 commit 97599ce
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Model/DecoratedFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 97599ce

Please sign in to comment.