Completed
Push — master ( 0c70fa...a4aba1 )
by Tobias
22:26
created

src/Mailgun/Api/Event.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
/*
4
 * Copyright (C) 2013 Mailgun
5
 *
6
 * This software may be modified and distributed under the terms
7
 * of the MIT license. See the LICENSE file for details.
8
 */
9
10
namespace Mailgun\Api;
11
12
use Mailgun\Assert;
13
use Mailgun\Model\Event\EventResponse;
14
15
/**
16
 * {@link https://documentation.mailgun.com/api-events.html}.
17
 *
18
 * @author Tobias Nyholm <[email protected]>
19
 */
20 View Code Duplication
class Event extends HttpApi
0 ignored issues
show
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
21
{
22
    use Pagination;
23
24
    /**
25
     * @param string $domain
26
     * @param array  $params
27
     *
28
     * @return EventResponse
29
     */
30
    public function get($domain, array $params = [])
31
    {
32
        Assert::stringNotEmpty($domain);
33
34
        $response = $this->httpGet(sprintf('/v3/%s/events', $domain), $params);
35
36
        return $this->hydrateResponse($response, EventResponse::class);
37
    }
38
}
39