src/Tools/Utilities.php
public function getFromArray(string $key, array $data, string $default = null)
    {
        $value = $default;

        if (\array_key_exists($key, $data)) {
            $value = $data[$key];
        }

        return $value;
    }
public function getFromArray(string $key, array $data, string $default = null)
    {
        $value = $default;

        if (\array_key_exists($key, $data)) {
            $value = $data[$key];
        }

        return $value;
    }
public function getFromArray ( string $ key , array $ data , string $ default = null ) { $ value = $ default ; if ( \ array_key_exists ( $ key , $ data ) ) { $ value = $ data [ $ key ] ; } return $ value ; }
Get a value from an array, returning the default value when not present in the array.

@param string $key
@param array $data
@param string|null $default
@return mixed|null
Get a value from an array returning the default value when not present in the array .