public function updateRecord(int $recordID, array $data)
    {
        foreach ($this->getRecords() as $key => $record) {
            if ($recordID == $record[$this->primaryKey]) {
                foreach ($data as $dataKey => $dataValue) {
                    if (isset($record[$dataKey])) {
                        $record[$dataKey] = $dataValue;
                    }
                }

                $this->database->getReference()
                    ->getChild($this->table)
                    ->getChild($key)
                    ->set($record);
            }
        }

        return $this->getRecord($recordID);
    }