@param bool|true $allowPartialRefunds

@return bool
13344
public function isRefunded($allowPartialRefunds = true)
    {
        if ($this->data['paymentDetails']['stateName'] === 'REFUND') {
            return true;
        }

        if ($allowPartialRefunds && $this->data['paymentDetails']['stateName'] === 'PARTIAL_REFUND') {
            return true;
        }

        return false;
    }
916242
function composeMinimalDivisibleAssetPaymentJoint(params){
		
	if (!ValidationUtils.isNonemptyArray(params.available_paying_addresses))
		throw Error('no available_paying_addresses');
	if (!ValidationUtils.isNonemptyArray(params.available_fee_paying_addresses))
		throw Error('no available_fee_paying_addresses');
	composer.readSortedFundedAddresses(params.asset, params.available_paying_addresses, params.amount, function(arrFundedPayingAddresses){
		if (arrFundedPayingAddresses.length === 0)
			return params.callbacks.ifNotEnoughFunds("all paying addresses are unfunded in asset, make sure all your funds are confirmed");
		composer.readSortedFundedAddresses(null, params.available_fee_paying_addresses, TYPICAL_FEE, function(arrFundedFeePayingAddresses){
			if (arrFundedPayingAddresses.length === 0)
				return params.callbacks.ifNotEnoughFunds("all paying addresses are unfunded in asset, make sure all your funds are confirmed");
			var minimal_params = _.clone(params);
			delete minimal_params.available_paying_addresses;
			delete minimal_params.available_fee_paying_addresses;
			minimal_params.minimal = true;
			minimal_params.paying_addresses = arrFundedPayingAddresses;
			minimal_params.fee_paying_addresses = arrFundedFeePayingAddresses;
			composeDivisibleAssetPaymentJoint(minimal_params);
		});
	});
}
499791
function allowMapDownload($allow = true, $multicall = false)
    {
        if (!is_bool($allow)) {
            throw new InvalidArgumentException('allow = ' . print_r($allow, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($allow), $multicall);
    }
968839
protected function groupedAssignAction($role, array $actions, $allow = true)
    {
        foreach ($actions as $action) {
            if (!$this->actions->has($action)) {
                throw new InvalidArgumentException("Action {$action} does not exist.");
            }

            $this->assign($role, $action, $allow);
        }

        return true;
    }
301932
protected function checkEntitlement($entitlement_value)
    {
        if ($entitlement_value == 'permitAll') {
            return true;
        }
        if ($entitlement_value == 'denyAll') {
            return false;
        }

        // The user has more than one EduPersonEntitlement.
        if (is_array($this->entitlements)) {
            return (in_array($entitlement_value, $this->entitlements));
            // User only has one EduPersonEntitlement.
        } else {
            return ($entitlement_value == $this->entitlements);
        }
    }
967477
public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = false)
    {
        return parent::has($name, $checkAbstractFactories, $usePeeringServiceManagers);
    }
665942
public function hasOptions($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');

        if (count($this->options) > 0) {
            return true;
        }

        if ($includeBase && $this->baseFormat) {
            return $this->baseFormat->hasOptions();
        }

        return false;
    }
595551
function hasPrimaryKeyValues() {
		$pks = static::$_primaryKeys;
		if (!$pks)
			return false;

		foreach ($pks as &$pk)
			if ($this->$pk === null)
				return false;
		return true;
	}
761871
public static function isBetween($value, $minDate, $maxDate, $inclusive = false)
    {
        if (false === $inclusive) {
            return (self::isAfter($value, $minDate, false) && self::isBefore($value, $maxDate, false));
        }

        return (self::isAfter($value, $minDate, true) && self::isBefore($value, $maxDate, true));
    }
754057
function specifyPartial($levelIds, $mode)
    {
        foreach ($this->schema->getLevels() as $level) {
            if (isset($levelIds[$level])) {
                continue;
            }
            if (self::INCLUDE_PARTIALS == $mode) {
                $levelIds[$level] = 0;
            } else {
                $levelIds[$level] = false;
            }
        }
        return $levelIds;
    }
1127645
public function allowed($providedPermission, Model $entity, $owner = true, $ownerColumn = 'user_id')
    {
        if ($this->isPretendEnabled()) {
            return $this->pretend('allowed');
        }

        if ($owner === true && $entity->{$ownerColumn} == $this->id) {
            return true;
        }

        return $this->isAllowed($providedPermission, $entity);
    }
489567
public function IsPartiallyLoaded($value = null)
	{
		if ($value != null) $this->_isPartiallyLoaded = $value;
		return $this->_isPartiallyLoaded;
	}
214852
private function hasMethodsChainAllowedPrefixes(AbstractNode $memberPrimaryPrefix, array $allowedPrefixes)
    {
        $methodPostfixes = $memberPrimaryPrefix->findChildrenOfType('MethodPostfix');

        foreach ($methodPostfixes as $methodPostfix) {
            foreach ($allowedPrefixes as $allowedPrefix) {
                if ($allowedPrefix === substr($methodPostfix->getName(), 0, strlen($allowedPrefix))) {
                    continue 2;
                }
            }

            return false;
        }

        return true;
    }
561065
public function setGrantableRolesAtBase($grantableRolesAtBase)
    {
        $allowedValues = $this->getGrantableRolesAtBaseAllowableValues();
        if (!is_null($grantableRolesAtBase) && array_diff($grantableRolesAtBase, $allowedValues)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'grantableRolesAtBase', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['grantableRolesAtBase'] = $grantableRolesAtBase;

        return $this;
    }
290973
public static function can($permissionName, $params = [], $allowCaching = true)
    {
        if (Podium::getInstance()->userComponent === true) {
            return Podium::getInstance()->user->can($permissionName, $params, $allowCaching);
        }
        if (!Podium::getInstance()->user->isGuest) {
            $user = static::findMe();
            if (empty($user)) {
                return false;
            }
            if ($allowCaching && empty($params) && isset($user->_access[$permissionName])) {
                return $user->_access[$permissionName];
            }
            $access = Podium::getInstance()->rbac->checkAccess($user->id, $permissionName, $params);
            if ($allowCaching && empty($params)) {
                $user->_access[$permissionName] = $access;
            }
            return $access;
        }
        return false;
    }
324780
protected function partIdIsChildOfAnAttachment($checkPartId)
    {
        foreach ($this->parts as $partId => $part) {
            if ($this->getPart('content-disposition', $part) == 'attachment') {
                if ($this->partIdIsChildOfPart($checkPartId, $partId)) {
                    return true;
                }
            }
        }
        return false;
    }
472388
public function hasOptionalArgument($includeBase = true)
    {
        Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s');

        if ($this->hasOptionalArg) {
            return true;
        }

        if ($includeBase && $this->baseFormat) {
            return $this->baseFormat->hasOptionalArgument();
        }

        return false;
    }