Code Duplication    Length = 3-3 lines in 2 locations

src/Table.php 2 locations

@@ 357-359 (lines=3) @@
354
     */
355
    public function create(array $data = [])
356
    {
357
        if (isset($data['id']) && isset($this->cache[$data['id']]) && is_object($this->cache[$data['id']])) {
358
            return $this->cache[$data['id']];
359
        }
360
361
        $row = clone $this->row;
362
@@ 419-421 (lines=3) @@
416
    public function createFromDatabase(array $data)
417
    {
418
        //Get from cache
419
        if (isset($this->cache[$data['id']]) && is_object(isset($this->cache[$data['id']]))) {
420
            return $this->cache[$data['id']];
421
        }
422
423
        foreach ($this->fields as $name => $field) {
424
            $data[$name] = $field->dataFromDatabase($data[$name]);