-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for datetimeinterface as typehint (#58)
- It's not allowed to create your own class implementing this interface
- Loading branch information
Showing
3 changed files
with
65 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...ntegration/data/success/Regular/Types/CompoundTypes/InstanceDateTimeInterfaceProperty.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace DigitalRevolution\AccessorPairConstraint\Tests\Integration\data\success\Regular\Types\CompoundTypes; | ||
|
||
use DateTimeInterface; | ||
|
||
class InstanceDateTimeInterfaceProperty | ||
{ | ||
/** @var DateTimeInterface */ | ||
private $property; | ||
|
||
public function getProperty(): DateTimeInterface | ||
{ | ||
return $this->property; | ||
} | ||
|
||
public function setProperty(DateTimeInterface $property): self | ||
{ | ||
$this->property = $property; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters