Code Duplication    Length = 12-12 lines in 2 locations

src/Distilleries/Contentful/Commands/Sync/SyncData.php 2 locations

@@ 81-92 (lines=12) @@
78
     *
79
     * @return void
80
     */
81
    protected function syncAssets()
82
    {
83
        try {
84
            $assets = $this->api->syncInitial('Asset');
85
            while (! empty($assets)) {
86
                $this->saveAssets($assets);
87
                $assets = $this->api->syncNext();
88
            }
89
        } catch (GuzzleException $e) {
90
            $this->error($e->getMessage());
91
        }
92
    }
93
94
    /**
95
     * Save given Contentful assets.
@@ 118-129 (lines=12) @@
115
     *
116
     * @return void
117
     */
118
    protected function syncEntries()
119
    {
120
        try {
121
            $entries = $this->api->syncInitial('Entry');
122
            while (! empty($entries)) {
123
                $this->saveEntries($entries);
124
                $entries = $this->api->syncNext();
125
            }
126
        } catch (GuzzleException $e) {
127
            $this->error($e->getMessage());
128
        }
129
    }
130
131
    /**
132
     * Save given Contentful entries.