| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) |
||
| 30 | { |
||
| 31 | if (!$targetEntity->reflClass->implementsInterface(TenantAwareInterface::class)) { |
||
| 32 | return ''; |
||
| 33 | } |
||
| 34 | |||
| 35 | if ($this->hasParameter('tenantCode')) { |
||
| 36 | return sprintf('%s.tenant_code = %s', $targetTableAlias, $this->getParameter('tenantCode')); |
||
| 37 | } |
||
| 38 | |||
| 39 | return ''; |
||
| 40 | } |
||
| 41 | } |
||
| 42 |