Child menu checker.

@param string $key
@param mixed  $value
@param object $data  Illuminate\Support\Collection as Collect

@return bool
322532
public function hasChild($key = null, $value = null, Collect $data = null)
    {
        if (func_num_args() < 3) {
            $data = $this->data;
            $key = $this->parent;
            $value = current(func_get_args());
        }

        $child = false;

        $data->each(function ($item) use (&$child, $key, $value) {

            if (intval($item[$key]) == intval($value) && !$child) {
                $child = true;
            }

        });

        return $child;
    }
380772
public function findByKeyAndValue(string $key, $value): MapInterface
    {
        return $this->find(function (MapInterface $item) use ($key, $value): bool {
            return $item->get($key) === $value;
        });
    }
1322623
protected function isIn($key, $value) : bool
    {
        $data = explode(',', $value);
        if (is_array($data) && in_array((string) $this->param[$key], $data)) {
            return true;
        }

        $this->errors[$key.self::ERROR] = $this->convertToFieldName($key)." must be in the given list of values $value.";
        return false;
    }
1277518
public static function set($data, $keys, $value)
    {
        return self::instance()->setValue($data, $keys, $value);
    }
1178751
public function set($key, $value) {
        setvalr(trim($key), $this->data, $value);
        return $value;
    }
1047655
public function setChild($value, $key = null)
    {
        if (empty($key)) {
            $this->children[] = $value;
        } else {
            $this->children[$key] = $value;
        }
    }
736423
public static function data($key, $value)
    {
        if ($value === null) {
            unset(self::$shared[$key]);
        } else {
            self::$shared[$key] = $value;
        }
    }
590753
public function set($key, $value) {
        if ($key) {
            $this->_data[$key] = $value;
        } else {
            $this->_data = $value;
        }
        $this->_modified = true;
        return $this;
    }
1008516
public function set($key, $value)
    {
        switch ($key) {
            case 'quantity':
                $this->setCheckTypeInteger($value, $key);
            break;
            case 'price':
            case 'tax':
                $this->setCheckIsNumeric($value, $key);

                $value = (float) $value;
        }

        $this->data[$key] = $value;

        return $this->getId();
    }
200383
public static function where(string $key, string $value){

            return function($compare) use ($key, $value){

                return (@$compare[$key] == $value);

            };

        }
220969
private function checkDataIsUnreliable($data, $key)
    {
        return isset($data[$key]) && ($data[$key] !== $this->visitorInfo[$key]);
    }
448861
public function addData($value, $key = null) {
        if (!isset($key) && is_object($value)) {
            $key = get_class($value);
        }
        return $this->addDataInternal($value, $key);
    }
1229853
private static function handleConfigArr(&$data, $key, &$value)
    {
        $value = '';
        if (isset($data[$key])) {
            $value = $data[$key];
            unset($data[$key]);
        }
    }
823136
public function set($key, $value)
    {
        // Check if the specified property is defined.
        if (property_exists($this, $key) && $key != 'data') {
            $this->{$key} = trim($value);

            return $this;
        } elseif (property_exists($this, $key) && $key == 'data') {
            foreach ($value as $v_key => $v_value) {
                $this->{$key}[$v_key] = trim($v_value);
            }

            return $this;
        } else {
            return false;
        }
    }
978397
protected function addDataInternal($value, $key) {
        if (null === $value || null === $key) {
            return $this;
        }
        $key = $this->processKey($key);
        if ($this->type === static::TYPE_DEFINED_ONLY && !array_key_exists($key, $this->shared)) {
            return $this;
        }
        return $this->addDataByScenario($value, $key);
    }
1031573
public function set($key, $value=null)
    {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } elseif ($key instanceof Collection) {
            $this->set($key->all());
        } elseif (is_scalar($key)) {
            $this->data[$key] = $value;
        }
        
        return $this;
    }
388446
public function setData($key, $value){

        $key = $this->normalizeKeyName($key);

        if( isset($this->_data[$key]) ){
            if( $this->_data[$key] !== $value ){
                $this->_original[$key] = $this->_data[$key];
                $this->_changes[$key] = $value;
            }
        }else{
            $this->_changes[$key] = $value;
        }

        $this->_data[$key] = $value;

        return $this;
    }