src/Resource/MoipResource.php
protected function getIfSet($key, stdClass $data = null)
    {
        if (empty($data)) {
            $data = $this->data;
        }

        if (isset($data->$key)) {
            return $data->$key;
        }
    }
protected function getIfSet($key, stdClass $data = null)
    {
        if (empty($data)) {
            $data = $this->data;
        }

        if (isset($data->$key)) {
            return $data->$key;
        }
    }
protected function getIfSet ( $ key , stdClass $ data = null ) { if ( empty ( $ data ) ) { $ data = $ this -> data ; } if ( isset ( $ data -> $ key ) ) { return $ data -> $ key ; } }
Get a key of an object if it exists.

@param string         $key
@param \stdClass|null $data

@return mixed
Get a key of an object if it exists .