Code Duplication    Length = 7-7 lines in 2 locations

src/TwitterAds/Resource.php 1 location

@@ 197-203 (lines=7) @@
194
     * Deletes the current object instance depending on the
195
     * presence of `object->getId()`.
196
     */
197
    public function delete()
198
    {
199
        $resource = str_replace(static::RESOURCE_REPLACE, $this->account->getId(), static::RESOURCE);
200
        $resource = str_replace(static::RESOURCE_ID_REPLACE, $this->getId(), $resource);
201
        $request = $this->account->getTwitterAds()->put($resource, $this->toParams());
202
        $this->fromResponse($request->data);
203
    }
204
205
    /**
206
     * @return Account

src/TwitterAds/TailoredAudience/TailoredAudience.php 1 location

@@ 51-57 (lines=7) @@
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function delete()
52
    {
53
        $resource = str_replace(static::RESOURCE_REPLACE, $this->getAccount()->getId(), static::RESOURCE);
54
        $resource = str_replace(static::RESOURCE_ID_REPLACE, $this->getId(), $resource);
55
        $request = $this->getAccount()->getTwitterAds()->delete($resource, $this->toParams());
56
        $this->fromResponse($request->data);
57
    }
58
59
    /**
60
     * @return boolean