protected function ensureIntegerArrayValues(array $keys)
    {
        if (empty($keys)) {
            return;
        }

        foreach ($keys as $key) {
            if (!isset($this->piVars[$key])
                || !is_array($this->piVars[$key])
            ) {
                continue;
            }

            foreach ($this->piVars[$key] as $innerKey => $value) {
                $integerValue = (int)$value;

                if ($integerValue === 0) {
                    unset($this->piVars[$key][$innerKey]);
                } else {
                    $this->piVars[$key][$innerKey] = $integerValue;
                }
            }
        }
    }
protected function ensureIntegerArrayValues(array $keys)
    {
        if (empty($keys)) {
            return;
        }

        foreach ($keys as $key) {
            if (!isset($this->piVars[$key])
                || !is_array($this->piVars[$key])
            ) {
                continue;
            }

            foreach ($this->piVars[$key] as $innerKey => $value) {
                $integerValue = (int)$value;

                if ($integerValue === 0) {
                    unset($this->piVars[$key][$innerKey]);
                } else {
                    $this->piVars[$key][$innerKey] = $integerValue;
                }
            }
        }
    }
protected function ensureIntegerArrayValues ( array $ keys ) { if ( empty ( $ keys ) ) { return ; } foreach ( $ keys as $ key ) { if ( ! isset ( $ this -> piVars [ $ key ] ) || ! is_array ( $ this -> piVars [ $ key ] ) ) { continue ; } foreach ( $ this -> piVars [ $ key ] as $ innerKey => $ value ) { $ integerValue = ( int ) $ value ; if ( $ integerValue === 0 ) { unset ( $ this -> piVars [ $ key ] [ $ innerKey ] ) ; } else { $ this -> piVars [ $ key ] [ $ innerKey ] = $ integerValue ; } } } }
Ensures that all values in the given array are cast to ints and removes empty
or invalid values.

@param string[] $keys the keys of the piVars to check, may be empty

@return void
Ensures that all values in the given array are cast to ints and removes empty or invalid values .