Code Duplication    Length = 9-9 lines in 2 locations

src/components/ConfigFile.php 1 location

@@ 201-209 (lines=9) @@
198
        return $this->runActions(['before', 'make', 'after']);
199
    }
200
201
    public function load()
202
    {
203
        $data = $this->getFile()->load() ?: [];
204
        if ($data) { /// TODO think what's better
205
        //  $this->setItems(ArrayHelper::merge($data, $this->toArray()));
206
            $this->setItems(ArrayHelper::merge($this->toArray(), $data));
207
        //  $this->setItems($data);
208
        }
209
    }
210
211
    /**
212
     * DEPRECATED in favour of save().

src/controllers/FileController.php 1 location

@@ 200-208 (lines=9) @@
197
        return $this->runActions(['before', 'make', 'after']);
198
    }
199
200
    public function actionLoad()
201
    {
202
        $data = $this->getFile()->load() ?: [];
203
        if ($data) { /// TODO think what's better
204
        //  $this->setItems(ArrayHelper::merge($data, $this->toArray()));
205
            $this->setItems(ArrayHelper::merge($this->toArray(), $data));
206
        //  $this->setItems($data);
207
        }
208
    }
209
210
    /**
211
     * {@inheritdoc}