public function createAccountStates(array $data = [])
    {
        $accountStates = new AccountStates();

        if (array_key_exists('rated', $data)) {
            if ($data['rated']) {
                $rating = new Rating();

                $accountStates->setRated($this->hydrate($rating, $data['rated']));
            } else {
                $accountStates->setRated(false);
            }
        }

        return $this->hydrate($accountStates, $data);
    }
public function createAccountStates(array $data = [])
    {
        $accountStates = new AccountStates();

        if (array_key_exists('rated', $data)) {
            if ($data['rated']) {
                $rating = new Rating();

                $accountStates->setRated($this->hydrate($rating, $data['rated']));
            } else {
                $accountStates->setRated(false);
            }
        }

        return $this->hydrate($accountStates, $data);
    }
public function createAccountStates ( array $ data = [ ] ) { $ accountStates = new AccountStates ( ) ; if ( array_key_exists ( 'rated' , $ data ) ) { if ( $ data [ 'rated' ] ) { $ rating = new Rating ( ) ; $ accountStates -> setRated ( $ this -> hydrate ( $ rating , $ data [ 'rated' ] ) ) ; } else { $ accountStates -> setRated ( false ) ; } } return $ this -> hydrate ( $ accountStates , $ data ) ; }
Create the account states

@param  array                     $data
@return \Tmdb\Model\AbstractModel
Create the account states