| Total Complexity | 5 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 81.82% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class MessageRemoveSubscriber implements EventSubscriber { |
||
| 16 | |||
| 17 | public function __construct(private MessageFilesystem $filesystem) |
||
| 18 | { |
||
| 19 | 25 | } |
|
| 20 | 25 | ||
| 21 | 25 | public function postRemove(LifecycleEventArgs $eventArgs) { |
|
| 22 | $entity = $eventArgs->getEntity(); |
||
|
|
|||
| 23 | 6 | ||
| 24 | 6 | if($entity instanceof Message) { |
|
| 25 | $this->filesystem->removeMessageDirectoy($entity); |
||
| 26 | 6 | } else if($entity instanceof MessageAttachment) { |
|
| 27 | $this->filesystem->removeMessageAttachment($entity); |
||
| 28 | 6 | } |
|
| 29 | } |
||
| 30 | |||
| 31 | 6 | /** |
|
| 32 | * @inheritDoc |
||
| 33 | */ |
||
| 34 | public function getSubscribedEvents(): array { |
||
| 37 | ]; |
||
| 38 | } |
||
| 39 | } |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.