You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?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;
- }
- }
|