@param string $everSpentMoreThanThreeMonthsInCare

@throws \InvalidArgumentException

@return SocioEconomic
506144
public function setEverSpentMoreThanThreeMonthsInCare($everSpentMoreThanThreeMonthsInCare)
    {
        if (!is_string($everSpentMoreThanThreeMonthsInCare) && !is_null($everSpentMoreThanThreeMonthsInCare)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->everSpentMoreThanThreeMonthsInCare = $everSpentMoreThanThreeMonthsInCare;

        return $this;
    }
342500
public function build(): SetVirtualTimePolicyRequest
	{
		$instance = new SetVirtualTimePolicyRequest();
		if ($this->policy === null) {
			throw new BuilderException('Property [policy] is required.');
		}
		$instance->policy = $this->policy;
		$instance->budget = $this->budget;
		$instance->maxVirtualTimeTaskStarvationCount = $this->maxVirtualTimeTaskStarvationCount;
		$instance->waitForNavigation = $this->waitForNavigation;
		$instance->initialVirtualTime = $this->initialVirtualTime;
		return $instance;
	}
319299
public final function withScheme($scheme): UriInterface
   {
       if (!is_string($scheme)
        || !($parsedScheme = $this->parseScheme($scheme))
        || $parsedScheme !== strtolower($scheme)) {
           throw new InvalidArgumentException(
               "Can't get with scheme: not supported");
       }
       return $this->with("scheme", $parsedScheme);
   }
1334339
public function setupRecurringPayments(string $currencyCode, string $paymentProviderId, float $replenishAmount, float $recurringAmount): BalanceInterface
    {
        $response = $this->client->post(
            $this->getBaseEndpointUri()->withPath("{$this->getBaseEndpointUri()->getPath()}/recurring-setup")->withQuery(http_build_query(['supportedCurrencyId' => $currencyCode])),
            (string) json_encode((object) [
                'providerId' => $paymentProviderId,
                'isRecurring' => 'true',
                'replenishAmount' => $replenishAmount,
                'recurringAmount' => $recurringAmount,
            ])
        );

        return $this->entitySerializer->deserialize(
            (string) $response->getBody(),
            $this->getEntityClass(),
            'json'
        );
    }
1166732
public function build(): RequestChildNodesRequest
	{
		$instance = new RequestChildNodesRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		$instance->depth = $this->depth;
		$instance->pierce = $this->pierce;
		return $instance;
	}
1014973
public function setSenderType($senderType)
    {
        $allowedValues = $this->getSenderTypeAllowableValues();
        if (!in_array($senderType, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'senderType', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['senderType'] = $senderType;

        return $this;
    }
1042314
public function incrementTotalAccess()
    {
        $this->redis->incr($this->keyTotal);

        $key = $this->createDailyKey($this->keyTotal);
        $this->redis->incr($key);

        $key = $this->createMonthlyKey($this->keyTotal);
        $this->redis->incr($key);

        $key = $this->createYearlyKey($this->keyTotal);
        $this->redis->incr($key);

        return $this;
    }
72951
public static function payment($annualInterest, $months)
    {
        // convert annual interest rate to monthly interest rate
        $interestRate = $annualInterest / 12;

        // present value = -1 * [principal] = -25.00
        $presentValue = -25;

        // future value = 0
        $futureValue = 0;

        // calculate regular payment at regular interval (PMT).
        $pmt = self::pmt($interestRate, $months, $presentValue, $futureValue);

        // return result
        return $pmt;
    }
186047
public function with()
    {
        $monthlyRevenue = 0;
        $orderRepository = app(OrderInterface::class);
        $lastMonth = Carbon::now()->subMonths(1);

        $orders = $orderRepository->query()
                        ->where('created_at', '>=', $lastMonth)
                        ->get();

        foreach ($orders as $order) {
            foreach ($order->products as $product) {
                $monthlyRevenue += $product->price - $product->cost_price;
            }
        }
        $currencySymbol = '$';
        //$monthlyRevenue = rand(100, 200);

        return ['monthlyRevenue' => number_format($monthlyRevenue, 2), 'currencySymbol' => $currencySymbol];
    }
283349
public function getRelativeMonthCount($end = null, $locale = null, $query = null, $cacheKey = null)
    {
        if (is_null($end))
        {
            $end = Carbon::today();
        }

        return $this->getCountInBetween($end->copy()->subMonth()->addDay()->startOfDay(), $end->endOfDay(), $locale, $query, $cacheKey);
    }
689998
public function getCurrentMonthPeriod($organizationId = null)
  {
    if(empty($organizationId))
    {
      $organizationId = $this->AuthenticationManager->getCurrentUserOrganization('id');
    }

    $fiscalYearId = $this->FiscalYear->lastFiscalYearByOrganization($organizationId);

    $Date = new Carbon('first day of this month');
    $Date2 = new Carbon('last day of this month');

    return $this->Period->periodByStardDateByEndDateByFiscalYearAndByOrganizationId($Date->format('Y-m-d'), $Date2->format('Y-m-d'), $fiscalYearId, $organizationId);
  }
691009
public function getCommunityById($communityId)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if (!is_string($communityId)) {
            throw new InvalidTypeException('Community ID', 'string', gettype($communityId));
        }

        return $this->get(sprintf('communities/%s', $communityId));
    }
1218319
public function ymdToJd($year, $month, $day)
    {
        if ($month < 1 || $month > $this->monthsInYear()) {
            throw new InvalidArgumentException('Month ' . $month . ' is invalid for this calendar');
        }

        $epbase = $year - (($year >= 0) ? 474 : 473);
        $epyear = 474 + $this->mod($epbase, 2820);

        return
            $day +
            (($month <= 7) ? (($month - 1) * 31) : ((($month - 1) * 30) + 6)) +
            (int) ((($epyear * 682) - 110) / 2816) +
            ($epyear - 1) * 365 +
            (int) (floor($epbase / 2820)) * 1029983 +
            $this->jdStart() - 1;
    }
1007169
public function doWebPayment($requestWebPayment)
    {
        $this->response = parent::doWebPayment($this->entity, $requestWebPayment);

        /**
         * Checks the state of the platform integration.
         */
        if (Exception\IntegrationState::check($this->response->requestState)) {
            throw new Exception\IntegrationState($this->response->requestState);
        }

        /**
         * Se a resposta retornar algum erro previsto.
         */
        if ($this->response->requestState->state == 0) {
            throw new Exception\IntegrationResponse(
                $this->response->requestState->message,
                $this->response->requestState->code
            );
        }

        return $this->response;
    }
685339
public function setResidencyOrEmploymentRestrictionsDetails($residencyOrEmploymentRestrictionsDetails)
    {
        if (!is_string($residencyOrEmploymentRestrictionsDetails) && !is_null($residencyOrEmploymentRestrictionsDetails)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a string');
        }

        $this->residencyOrEmploymentRestrictionsDetails = $residencyOrEmploymentRestrictionsDetails;

        return $this;
    }
272443
public function setResidencyOrEmploymentRestrictions($residencyOrEmploymentRestrictions)
    {
        if (!is_bool($residencyOrEmploymentRestrictions)) {
            throw new \InvalidArgumentException(__CLASS__ . ' ' . __METHOD__ . ': Not a boolean');
        }

        $this->residencyOrEmploymentRestrictions = $residencyOrEmploymentRestrictions;

        return $this;
    }
437395
public function lookup($context, $path, $require = false)
    {
        if (empty($path)) {
            throw new \InvalidArgumentException("Passed lookup path is empty.");
        }
        if (empty($context)) {
            throw new \InvalidArgumentException("Specified context is empty while resolving path " . json_encode($path));
        }
        return PropertyAccessor::getByPath($context, $this->path($path), $require);
    }