Code Duplication    Length = 12-12 lines in 2 locations

src/Eloquent/Builder.php 2 locations

@@ 50-61 (lines=12) @@
47
     *
48
     * @throws \Exception
49
     */
50
    public function getModelsPage($columns = ['*'])
51
    {
52
        $results = $this->query->getPage($columns);
53
54
        if ($results instanceof Collection) {
55
            $results = $results->getRows();
56
        } elseif (!$results instanceof Rows) {
57
            throw new \Exception('Invalid type of getPage response. Expected lroman242\LaravelCassandra\Collection or Cassandra\Rows');
58
        }
59
60
        return $this->model->hydrateRows($results);
61
    }
62
63
    /**
64
     * Execute the query as a "select" statement.
@@ 88-99 (lines=12) @@
85
     *
86
     * @throws \Exception
87
     */
88
    public function getModels($columns = ['*'])
89
    {
90
        $results = $this->query->get($columns);
91
92
        if ($results instanceof Collection) {
93
            $results = $results->getRows();
94
        } elseif (!$results instanceof Rows) {
95
            throw new \Exception('Invalid type of getPage response. Expected lroman242\LaravelCassandra\Collection or Cassandra\Rows');
96
        }
97
98
        return $this->model->hydrateRows($results);
99
    }
100
101
    /**
102
     * Add the "updated at" column to an array of values.