No puede seleccionar más de 25 temas
Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
|
- <?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;
- }
- }
|