Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- <?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;
- }
- }
|