Gives malus to activities requiring sight, already lowered by a time getting used to the glare, if any.

@return int negative integer or zero
515773
public function getCurrentMalus(): int
    {
        if ($this->getGettingUsedToForRounds() === 0) {
            return $this->malus;
        }
        if ($this->isShined()) {
            // each rounds of getting used to lowers malus by one point
            return $this->malus + $this->getGettingUsedToForRounds();
        }
        // ten rounds of getting used to are needed to lower glare malus by a single point
        return $this->malus + SumAndRound::floor($this->getGettingUsedToForRounds() / 10);
    }
1325660
public function getBruttoSum()
    {
        $dSum = 0;
        foreach ($this->_aList as $oPrice) {
            $dSum += $oPrice->getBruttoPrice();
        }

        return $dSum;
    }
938640
public function min()
    {
        $min = null;
        $first = false;
        foreach ($this as $v) {
            if (!$first || $v < $min) {
                $min = $v;
                $first = true;
            }
        }
        return $min;
    }
1047636
public function getStartDepth(): int
    {
        $startDepth = PHP_INT_MAX;

        foreach ($this->items as $item) {
            $startDepth = min($startDepth, $item->getZ());
        }

        return $startDepth;
    }
1019465
public function getOrderPromotionTotal(): int
    {
        $orderPromotionTotal = 0;

        foreach ($this->items as $item) {
            $orderPromotionTotal += $item->getAdjustmentsTotalRecursively(AdjustmentInterface::ORDER_PROMOTION_ADJUSTMENT);
        }

        return $orderPromotionTotal;
    }
309220
public function getRelativeCenterY()
    {
        $pos = 50;
        if ($this->FaceCentreY > 0 && $this->OriginalHeight > 0) {
            $pos = $this->FaceCentreY / $this->OriginalHeight * 100;
            $pos = ($pos > 100 || $pos < 0) ? 50 : $pos;
        }

        return $pos;
    }
302601
public function getWidth()
    {
        if ($this->getSize() == static::SIZE_INVISIBLE) {
            return 1;
        }
        if ($this->getSize() == static::SIZE_TINY) {
            return 30;
        }

        $modifier = 0;
        if ($this->getTimeCode()) {
            $modifier = 75;
        }

        if ($this->getSize() == static::SIZE_SMALL) {
            return 150 + $modifier;
        }
        if ($this->getSize() == static::SIZE_MEDIUM) {
            return 187 + $modifier;
        }
        // static::SIZE_LARGE
        return 224 + $modifier;
    }
335503
public function getAt(): int
    {
        if ($this->at < 0) {
            return Location::BeforeFirstRow;
        }

        if ($this->at > $this->rowCount()) {
            return Location::AfterLastRow;
        }

        return $this->at;
    }
1124746
public function getBrightness()
    {
        if (!preg_match('/^-*[0-9]+$/', $this->bri)) {
            return;
        }

        if ($this->bri < -100 or $this->bri > 100) {
            return;
        }

        return (int) $this->bri;
    }
425828
public function getZoomSettings(): int
    {
	    return (int)$this->_scopeConfig->getValue(self::ZOOM_CONFIG_PATH, ScopeInterface::SCOPE_STORE);
    }
1149432
public function current()
    {
        $offset = 0;

        foreach ($this->observer as $observer) {
            if ($offset === $this->position) {
                return $observer;
            }
            ++$offset;
        }
    }
292895
public function vincenty()
    {
        Ellipsoid::checkCoordinatesEllipsoid($this->from, $this->to);

        $a = $this->from->getEllipsoid()->getA();
        $b = $this->from->getEllipsoid()->getB();
        $f = 1 / $this->from->getEllipsoid()->getInvF();

        $lL = deg2rad($this->to->getLongitude() - $this->from->getLongitude());
        $u1 = atan((1 - $f) * tan(deg2rad($this->from->getLatitude())));
        $u2 = atan((1 - $f) * tan(deg2rad($this->to->getLatitude())));

        $sinU1 = sin($u1);
        $cosU1 = cos($u1);
        $sinU2 = sin($u2);
        $cosU2 = cos($u2);

        $lambda    = $lL;
        $iterLimit = 100;

        do {
            $sinLambda = sin($lambda);
            $cosLambda = cos($lambda);
            $sinSigma  = sqrt(($cosU2 * $sinLambda) * ($cosU2 * $sinLambda) +
                ($cosU1 * $sinU2 - $sinU1 * $cosU2 * $cosLambda) * ($cosU1 * $sinU2 - $sinU1 * $cosU2 * $cosLambda));

            if (0.0 === $sinSigma) {
                return 0.0; // co-incident points
            }

            $cosSigma   = $sinU1 * $sinU2 + $cosU1 * $cosU2 * $cosLambda;
            $sigma      = atan2($sinSigma, $cosSigma);
            $sinAlpha   = $cosU1 * $cosU2 * $sinLambda / $sinSigma;
            $cosSqAlpha = 1 - $sinAlpha * $sinAlpha;
            if ($cosSqAlpha != 0.0) {
                $cos2SigmaM = $cosSigma - 2 * $sinU1 * $sinU2 / $cosSqAlpha;
            }
            else {
                $cos2SigmaM = 0.0;
            }
            $cC      = $f / 16 * $cosSqAlpha * (4 + $f * (4 - 3 * $cosSqAlpha));
            $lambdaP = $lambda;
            $lambda  = $lL + (1 - $cC) * $f * $sinAlpha * ($sigma + $cC * $sinSigma *
                ($cos2SigmaM + $cC * $cosSigma * (-1 + 2 * $cos2SigmaM * $cos2SigmaM)));
        } while (abs($lambda - $lambdaP) > 1e-12 && --$iterLimit > 0);

        // @codeCoverageIgnoreStart
        if (0 === $iterLimit) {
            throw new NotConvergingException('Vincenty formula failed to converge !');
        }
        // @codeCoverageIgnoreEnd

        $uSq        = $cosSqAlpha * ($a * $a - $b * $b) / ($b * $b);
        $aA         = 1 + $uSq / 16384 * (4096 + $uSq * (-768 + $uSq * (320 - 175 * $uSq)));
        $bB         = $uSq / 1024 * (256 + $uSq * (-128 + $uSq * (74 - 47 * $uSq)));
        $deltaSigma = $bB * $sinSigma * ($cos2SigmaM + $bB / 4 * ($cosSigma * (-1 + 2 * $cos2SigmaM * $cos2SigmaM) -
            $bB / 6 * $cos2SigmaM * (-3 + 4 * $sinSigma * $sinSigma) * (-3 + 4 * $cos2SigmaM * $cos2SigmaM)));
        $s          = $b * $aA * ($sigma - $deltaSigma);

        return $this->convertToUserUnit($s);
    }
494989
public function getLoser () : ?int
    {
        // Cache
        if ( $this->_CondorcetLoser !== null ) :
            return $this->_CondorcetLoser;
        endif;

            //////

        // Basic Condorcet calculation
        foreach ( $this->_selfElection->getPairwise(false) as $candidate_key => $candidat_detail ) :
            $loser = true;

            foreach ( $candidat_detail['lose'] as $challenger_key => $lose_count ) :
                if  ( $lose_count <= $candidat_detail['win'][$challenger_key] ) :
                    $loser = false;
                    break;
                endif;
            endforeach;

            if ($loser) :
                $this->_CondorcetLoser = $candidate_key;
                return $this->_CondorcetLoser;
            endif;
        endforeach;

        return null;
    }
357836
public function getCurrentRealmsIncrement(): int
    {
        $currentDifficulty = $this->getValue();
        $maximalDifficulty = $this->getMaximal();
        if ($currentDifficulty <= $maximalDifficulty) {
            return 0;
        }
        $additionalDifficulty = $currentDifficulty - $maximalDifficulty;
        $steps = $additionalDifficulty / $this->getDifficultyAddition()->getDifficultyAdditionPerStep();
        $realmsIncrement = $steps * $this->getDifficultyAddition()->getRealmsChangePerAdditionStep();

        return (int)\ceil($realmsIncrement); // even a tiny piece of a higher realm means the lower realm is not able to create that formula
    }
804587
public function getDefenseNumberModifierAgainstFasterOpponent(): int
    {
        $defenseNumberModifier = $this->getDefenseNumberModifier();
        foreach ($this->combatActionCodes as $combatActionCode) {
            if ($combatActionCode->getValue() === CombatActionCode::RUN) {
                $defenseNumberModifier -= 4;
            }
            if ($combatActionCode->getValue() === CombatActionCode::PUT_OUT_HARDLY_ACCESSIBLE_ITEM) {
                $defenseNumberModifier -= 4;
            }
        }

        return $defenseNumberModifier;
    }
1274630
public function numDocs()
    {
        $docs = 0;

        foreach ($this->_indices as $index) {
            $docs += $this->_indices->numDocs();
        }

        return $docs;
    }
223013
public function GetDiscountValue()
    {
        $dValue = 0;
        $iTmpPointer = $this->getItemPointer();
        $this->GoToStart();
        while ($oDiscount = $this->Next()) {
            $dValue += $oDiscount->GetValue();
        }

        $this->setItemPointer($iTmpPointer);

        return $dValue;
    }