protected function isRecord($data)
    {
        if ($data instanceof Collection) {
            return false;
        }

        $keys = array_keys($data);
        return (in_array('id', $keys, true) || in_array('name', $keys, true));
    }
protected function isRecord($data)
    {
        if ($data instanceof Collection) {
            return false;
        }

        $keys = array_keys($data);
        return (in_array('id', $keys, true) || in_array('name', $keys, true));
    }
protected function isRecord ( $ data ) { if ( $ data instanceof Collection ) { return false ; } $ keys = array_keys ( $ data ) ; return ( in_array ( 'id' , $ keys , true ) || in_array ( 'name' , $ keys , true ) ) ; }
Tests the current response data to see if a single record was returned.

@param array|Collection $data

@return bool
Tests the current response data to see if a single record was returned .