| Conditions | 5 |
| Paths | 9 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | public function getLastModifiedDate(\ReflectionClass $reflection): \DateTime |
||
| 9 | { |
||
| 10 | $modifiedDate = $this->getLatestParentsModifiedDate($reflection); |
||
| 11 | |||
| 12 | foreach ($reflection->getTraits() as $trait) { |
||
| 13 | $traitModifiedDate = $this->getLatestParentsModifiedDate($trait); |
||
| 14 | |||
| 15 | if ($traitModifiedDate > $modifiedDate) { |
||
| 16 | $modifiedDate = $traitModifiedDate; |
||
| 17 | } |
||
| 18 | } |
||
| 19 | |||
| 20 | foreach ($reflection->getInterfaces() as $interface) { |
||
| 21 | $interfaceModifiedDate = $this->getLatestParentsModifiedDate($interface); |
||
| 22 | |||
| 23 | if ($interfaceModifiedDate > $modifiedDate) { |
||
| 24 | $modifiedDate = $interfaceModifiedDate; |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | return $modifiedDate; |
||
| 29 | } |
||
| 30 | |||
| 48 | } |