| Total Complexity | 4 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | abstract class AbstractEndpoint |
||
| 21 | { |
||
| 22 | private $client; |
||
| 23 | protected $defaultServerId; |
||
| 24 | protected $validator; |
||
| 25 | |||
| 26 | public function __construct(Client $client, $defaultServerId) |
||
| 27 | { |
||
| 28 | $this->client = $client; |
||
| 29 | $this->defaultServerId = $defaultServerId; |
||
| 30 | $this->validator = Validation::createValidatorBuilder() |
||
| 31 | ->enableAnnotationMapping() |
||
| 32 | ->getValidator(); |
||
| 33 | } |
||
| 34 | |||
| 35 | public function validateEntity($entity, $groups = null): bool |
||
| 48 | } |
||
| 49 | |||
| 50 | public function getClient(): Client |
||
| 55 |