src/Entity/Factory/RoomFactory.php
public function entity(array $data = [])
    {
        $room = new Room();
        foreach ($data as $key => $value) {
            $property = Inflector::variable($key);
            $room->$property = $value;
        }

        return $room;
    }
public function entity(array $data = [])
    {
        $room = new Room();
        foreach ($data as $key => $value) {
            $property = Inflector::variable($key);
            $room->$property = $value;
        }

        return $room;
    }
public function entity ( array $ data = [ ] ) { $ room = new Room ( ) ; foreach ( $ data as $ key => $ value ) { $ property = Inflector :: variable ( $ key ) ; $ room -> $ property = $ value ; } return $ room ; }
@param array $data

@return Room
@param array $data