public static function getOtherPackageData($data, $key, $asArray = false)
    {
        $out = null;
        if (false === empty($data[$key])) {
            $out = $data[$key];
        }
        if (true === $asArray) {
            $out = is_array($out) ? $out : [$out];
        } else {
            $out = is_array($out) ? implode(', ', $out) : $out;
        }
        return $out;
    }
public static function getOtherPackageData($data, $key, $asArray = false)
    {
        $out = null;
        if (false === empty($data[$key])) {
            $out = $data[$key];
        }
        if (true === $asArray) {
            $out = is_array($out) ? $out : [$out];
        } else {
            $out = is_array($out) ? implode(', ', $out) : $out;
        }
        return $out;
    }
public static function getOtherPackageData ( $ data , $ key , $ asArray = false ) { $ out = null ; if ( false === empty ( $ data [ $ key ] ) ) { $ out = $ data [ $ key ] ; } if ( true === $ asArray ) { $ out = is_array ( $ out ) ? $ out : [ $ out ] ; } else { $ out = is_array ( $ out ) ? implode ( ', ' , $ out ) : $ out ; } return $ out ; }
Fetching data from defined field from for example installed.json file
data who has no 'versions' array inside
@param $data
@param $key
@param bool $asArray
@return array | string
Fetching data from defined field from for example installed . json file data who has no versions array inside