Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
|
- <?php
-
- namespace domain\User\UserProducer;
-
- use domain\_\AbstractSolver;
-
- class UserProducerSolver extends AbstractSolver
- {
- public function hasOutstandingCredit(UserProducer $userProducer): bool
- {
- return $userProducer->credit < 0 || $userProducer->credit > 0;
- }
-
- public function filterPointsSaleByExclusiveAccess(UserProducer $userProducer, array $pointsSaleArray = []): array
- {
- if(!$userProducer->getExclusiveAccessSelectedPointsSale()) {
- return $pointsSaleArray;
- }
-
- $filteredPointsSaleArray = [];
- foreach($pointsSaleArray as $pointSale) {
- $idPointSale = is_array($pointSale) ? $pointSale['id'] : $pointSale->id;
- foreach($userProducer->user->userPointSale as $userPointSale) {
- if($idPointSale == $userPointSale->pointSale->id) {
- $filteredPointsSaleArray[] = $pointSale;
- }
- }
- }
-
- return $filteredPointsSaleArray;
- }
- }
|