Is the bag holding associative data
key=value opposed to 123=value

@return bool
169309
public function isAssociative(): bool
    {
        if (count($this->bag) === 0) {
            return false;
        }

        return array_keys($this->bag) !== range(0, count($this->bag) - 1);
    }
31953
public function isSecondaryLocal()
    {
        if (!$this->isSecondary()) {
            return false;
        }

        $hashKey        = $this->getHashKey()->getPropertyMetadata()->name;
        $hashKeyPrimary = $this->class->getIndex()->getHashKey()->getPropertyMetadata()->name;

        return $hashKey === $hashKeyPrimary;
    }
1276082
public function is()
    {
        $valid = false;

        $arguments = func_get_args();
        if (count($arguments)) {
            $operator = '=';
            $compare = null;

            if (count($arguments) == 1) {
                $compare = $arguments[0];
            }

            if (count($arguments) >= 2) {
                $operator = $arguments[0];
                $compare = $arguments[1];
            }

            if (!is_null($compare)) {
                $min = min(substr_count($this->value, '.'), substr_count($compare, '.')) + 1;

                $v1 = $this->toValue($this->value, $min);
                $v2 = $this->toValue($compare, $min);

                switch ($operator) {
                    case '<':
                        $valid = $v1 < $v2;
                        break;
                    case '<=':
                        $valid = $v1 <= $v2;
                        break;
                    case '=':
                        $valid = $v1 == $v2;
                        break;
                    case '>':
                        $valid = $v1 > $v2;
                        break;
                    case '>=':
                        $valid = $v1 >= $v2;
                        break;
                }
            }
        }

        return $valid;
    }
51652
private function isArray($data): bool
    {
        $counter = 0;
        foreach ($data as $key => $value) {
            if ($key !== $counter) {
                return false;
            }

            ++$counter;
        }

        return true;
    }
1137310
public function isKey()
    {
        $args = func_get_args();
        
        if (count($args) == 0) {
            return $this;
        }
        
        $last = array_pop($args);
        
        $pointer = &$this->data;
        foreach ($args as $i => $step) {
            if (!isset($pointer[$step])
                || !is_array($pointer[$step])
            ) {
                return false;
            }

            $pointer = &$pointer[$step];
        }
        
        if (!isset($pointer[$last])) {
            return false;
        }
        
        return true;
    }
547390
public function setKey()
    {
        if(trim(env('APP_KEY')) != '') {
            return true;
        }
        $appKey='';
        for($i=0;$i<32;$i++) {
            $appKey.=chr(rand(0,255));
        }
        $appKey = 'base64:'.base64_encode($appKey);
        $file = $this->basePath('.env');
        $lines = $this->parseEnvFile($file);
        $flag = false;
        foreach($lines as $i => $line) {
            $lines[$i] = trim($line);
            $lines[$i] = trim($line, "\n");
            if(strpos($line, 'APP_KEY') !== false) {
                $data = explode('=', $line, 2);
                if(!isset($data[1]) || trim($data[1]) == '') {
                    $lines[$i] = "APP_KEY=".$appKey;
                    $flag = true;
                }
            }
        }
        if($flag == false) {
            $lines = ["APP_KEY=".$appKey] + $lines;
        }
        $data = implode("\n", $lines);
        if(file_put_contents($file, $data)) {
            putenv("APP_KEY=$appKey");
            $_ENV['APP_KEY'] = $appKey;
            $_SERVER['APP_KEY'] = $appKey;
            return true;
        }
        else {
            throw new Exception('Failed to write in .env file.');
        }
    }
1215974
public function valid()
    {
        if (!isset($this->keys[$this->position])) {
            return false;
        }

        $currentKey = $this->keys[$this->position];

        return isset($this->items[$currentKey]);
    }
664489
public function isLob()
    {
        return ($this->type == PropelColumnTypes::BLOB || $this->type == PropelColumnTypes::VARBINARY || $this->type == PropelColumnTypes::LONGVARBINARY);
    }
240540
private function hasQueryVals()
    {
        foreach ($this->input as $key => $value) {
            // If it's positive-like, then stop returning true
            if ($value == '0' || $value) {
                return true;
            }
        }

        return false;
    }
1352683
public static function set() {
        $keys = func_get_args();
        $session = $_SESSION;

        if (!empty($keys) && !empty($session)) {

            $s = & $session;
            foreach ($keys as $key => $value) {

                if ($key == (Data::count($keys) - 1)) {

                    $s = $keys[Data::count($keys) - 1];
                } else {

                    if (!isset($s[$value])) {
                        $s[$value] = array();
                    }
                    if (isset($s[$value]) && is_array($s[$value])) {
                        $s[$value] = $s[$value];
                    }
                    $s = & $s[$value];
                }
            }

            $_SESSION = $session;
            return true;
        }

        return false;
    }
464564
public function isStored()
    {
        foreach ($this->getKeys() as $key) {
            if (!$this->cookieBag->has($key)) {
                return false;
            }
        }

        // Now start checking the signature
        if (!$this->isValidSignature(
            $this->cookieBag->get(self::CLIENT_LOGIN_KEY), 
            $this->cookieBag->get(self::CLIENT_LOGIN_PASSWORD_HASH_KEY),
            $this->cookieBag->get(self::CLIENT_TOKEN_KEY)
        )) {
            return false;
        }

        return true;
    }
1141848
public function valid() : bool
    {
        // The null check is cardinal; without it foreach runs out of bounds.
        $key = key($this->explorableIndex);
        return $key !== null && $key < count($this->explorableIndex);
    }
6524
protected function validateDataMapStore()
    {
        $field = 'data.map';
        $value = $this->getSubmitted($field);

        if (empty($value)) {
            return null;
        }

        $label = $this->translation->text('Map');

        if (!is_array($value) || count($value) != 2) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        if (count($value) != count(array_filter($value, 'is_numeric'))) {
            $this->setErrorInvalid($field, $label);
            return false;
        }

        return true;
    }
1138375
public function isBinary()
    {
        if (is_string($this->data)) {
            $mime = MimeType::getMimeTypeByContent($this->data);

            return (strpos($mime, 'text') !== 0 && $mime !== 'application/x-empty');
        }

        return false;
    }
1157882
public function fetch_assoc() {
		// To work around PHP bug #47928, we need to call store_result() after executing
		// the query. This shouldn't have a negative impact on performance, it might cause
		// a slight memory increase.
		// See https://bugs.php.net/bug.php?id=47928
		$this->store_result();

		$data = [];
		$params = [];

		foreach ($this->get_columns() as $column) {
			$params[$column] = &$data[$column];
		}

		$result = call_user_func_array([$this, 'bind_result'], $params);

		$data = [];
		while ($this->fetch()) {
			$row = [];
			foreach ($params as $key => $value) {
				$key = 	substr($key, strrpos($key, '.') + 1);
				$row[$key] = $value;
			}
			$data[] = $row;
		}

		return $data;
	}
794782
protected function isArray($key) : bool
    {
        if (is_array($this->param[$key]) && !$this->hasAttribute($key)) {
            $this->errors[$key.self::ERROR] = $this->convertToFieldName($key).' value must be valid array.';
            return false;
        }

        return true;
    }
331165
public function valid()
    {
        if (!is_array($this->val)) {
            return null;
        }
        if ($this->assocArray) {
            $keys = array_keys($this->val);
            return isset($keys[$this->position]);
        }

        return isset($this->val[$this->position]);
    }