Mandrill_Users::senders()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
class Mandrill_Users
4
{
5
6
    private $master;
7
8
    public function __construct(Mandrill $master)
9
    {
10
        $this->master = $master;
11
    }
12
13
    /**
14
     * Return the information about the API-connected user
15
     * @return struct the user information including username, key, reputation, quota, and historical sending stats
0 ignored issues
show
Bug introduced by
The type struct was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
16
     *     - username string the username of the user (used for SMTP authentication)
17
     *     - created_at string the date and time that the user's Mandrill account was created as a UTC string in YYYY-MM-DD HH:MM:SS format
18
     *     - public_id string a unique, permanent identifier for this user
19
     *     - reputation integer the reputation of the user on a scale from 0 to 100, with 75 generally being a "good" reputation
20
     *     - hourly_quota integer the maximum number of emails Mandrill will deliver for this user each hour.  Any emails beyond that will be accepted and queued for later delivery.  Users with higher reputations will have higher hourly quotas
21
     *     - backlog integer the number of emails that are queued for delivery due to exceeding your monthly or hourly quotas
22
     *     - stats struct an aggregate summary of the account's sending stats
23
     *         - today struct stats for this user so far today
24
     *             - sent integer the number of emails sent for this user so far today
25
     *             - hard_bounces integer the number of emails hard bounced for this user so far today
26
     *             - soft_bounces integer the number of emails soft bounced for this user so far today
27
     *             - rejects integer the number of emails rejected for sending this user so far today
28
     *             - complaints integer the number of spam complaints for this user so far today
29
     *             - unsubs integer the number of unsubscribes for this user so far today
30
     *             - opens integer the number of times emails have been opened for this user so far today
31
     *             - unique_opens integer the number of unique opens for emails sent for this user so far today
32
     *             - clicks integer the number of URLs that have been clicked for this user so far today
33
     *             - unique_clicks integer the number of unique clicks for emails sent for this user so far today
34
     *         - last_7_days struct stats for this user in the last 7 days
35
     *             - sent integer the number of emails sent for this user in the last 7 days
36
     *             - hard_bounces integer the number of emails hard bounced for this user in the last 7 days
37
     *             - soft_bounces integer the number of emails soft bounced for this user in the last 7 days
38
     *             - rejects integer the number of emails rejected for sending this user in the last 7 days
39
     *             - complaints integer the number of spam complaints for this user in the last 7 days
40
     *             - unsubs integer the number of unsubscribes for this user in the last 7 days
41
     *             - opens integer the number of times emails have been opened for this user in the last 7 days
42
     *             - unique_opens integer the number of unique opens for emails sent for this user in the last 7 days
43
     *             - clicks integer the number of URLs that have been clicked for this user in the last 7 days
44
     *             - unique_clicks integer the number of unique clicks for emails sent for this user in the last 7 days
45
     *         - last_30_days struct stats for this user in the last 30 days
46
     *             - sent integer the number of emails sent for this user in the last 30 days
47
     *             - hard_bounces integer the number of emails hard bounced for this user in the last 30 days
48
     *             - soft_bounces integer the number of emails soft bounced for this user in the last 30 days
49
     *             - rejects integer the number of emails rejected for sending this user in the last 30 days
50
     *             - complaints integer the number of spam complaints for this user in the last 30 days
51
     *             - unsubs integer the number of unsubscribes for this user in the last 30 days
52
     *             - opens integer the number of times emails have been opened for this user in the last 30 days
53
     *             - unique_opens integer the number of unique opens for emails sent for this user in the last 30 days
54
     *             - clicks integer the number of URLs that have been clicked for this user in the last 30 days
55
     *             - unique_clicks integer the number of unique clicks for emails sent for this user in the last 30 days
56
     *         - last_60_days struct stats for this user in the last 60 days
57
     *             - sent integer the number of emails sent for this user in the last 60 days
58
     *             - hard_bounces integer the number of emails hard bounced for this user in the last 60 days
59
     *             - soft_bounces integer the number of emails soft bounced for this user in the last 60 days
60
     *             - rejects integer the number of emails rejected for sending this user in the last 60 days
61
     *             - complaints integer the number of spam complaints for this user in the last 60 days
62
     *             - unsubs integer the number of unsubscribes for this user in the last 60 days
63
     *             - opens integer the number of times emails have been opened for this user in the last 60 days
64
     *             - unique_opens integer the number of unique opens for emails sent for this user in the last 60 days
65
     *             - clicks integer the number of URLs that have been clicked for this user in the last 60 days
66
     *             - unique_clicks integer the number of unique clicks for emails sent for this user in the last 60 days
67
     *         - last_90_days struct stats for this user in the last 90 days
68
     *             - sent integer the number of emails sent for this user in the last 90 days
69
     *             - hard_bounces integer the number of emails hard bounced for this user in the last 90 days
70
     *             - soft_bounces integer the number of emails soft bounced for this user in the last 90 days
71
     *             - rejects integer the number of emails rejected for sending this user in the last 90 days
72
     *             - complaints integer the number of spam complaints for this user in the last 90 days
73
     *             - unsubs integer the number of unsubscribes for this user in the last 90 days
74
     *             - opens integer the number of times emails have been opened for this user in the last 90 days
75
     *             - unique_opens integer the number of unique opens for emails sent for this user in the last 90 days
76
     *             - clicks integer the number of URLs that have been clicked for this user in the last 90 days
77
     *             - unique_clicks integer the number of unique clicks for emails sent for this user in the last 90 days
78
     *         - all_time struct stats for the lifetime of the user's account
79
     *             - sent integer the number of emails sent in the lifetime of the user's account
80
     *             - hard_bounces integer the number of emails hard bounced in the lifetime of the user's account
81
     *             - soft_bounces integer the number of emails soft bounced in the lifetime of the user's account
82
     *             - rejects integer the number of emails rejected for sending this user so far today
83
     *             - complaints integer the number of spam complaints in the lifetime of the user's account
84
     *             - unsubs integer the number of unsubscribes in the lifetime of the user's account
85
     *             - opens integer the number of times emails have been opened in the lifetime of the user's account
86
     *             - unique_opens integer the number of unique opens for emails sent in the lifetime of the user's account
87
     *             - clicks integer the number of URLs that have been clicked in the lifetime of the user's account
88
     *             - unique_clicks integer the number of unique clicks for emails sent in the lifetime of the user's account
89
     */
90
    public function info()
91
    {
92
        $_params = array();
93
        return $this->master->call('users/info', $_params);
94
    }
95
96
    /**
97
     * Validate an API key and respond to a ping
98
     * @return string the string "PONG!"
99
     */
100
    public function ping()
101
    {
102
        $_params = array();
103
        return $this->master->call('users/ping', $_params);
104
    }
105
106
    /**
107
     * Validate an API key and respond to a ping (anal JSON parser version)
108
     * @return struct a struct with one key "PING" with a static value "PONG!"
109
     */
110
    public function ping2()
111
    {
112
        $_params = array();
113
        return $this->master->call('users/ping2', $_params);
114
    }
115
116
    /**
117
     * Return the senders that have tried to use this account, both verified and unverified
118
     * @return array an array of sender data, one for each sending addresses used by the account
119
     *     - return[] struct the information on each sending address in the account
120
     *         - address string the sender's email address
121
     *         - created_at string the date and time that the sender was first seen by Mandrill as a UTC date string in YYYY-MM-DD HH:MM:SS format
122
     *         - sent integer the total number of messages sent by this sender
123
     *         - hard_bounces integer the total number of hard bounces by messages by this sender
124
     *         - soft_bounces integer the total number of soft bounces by messages by this sender
125
     *         - rejects integer the total number of rejected messages by this sender
126
     *         - complaints integer the total number of spam complaints received for messages by this sender
127
     *         - unsubs integer the total number of unsubscribe requests received for messages by this sender
128
     *         - opens integer the total number of times messages by this sender have been opened
129
     *         - clicks integer the total number of times tracked URLs in messages by this sender have been clicked
130
     *         - unique_opens integer the number of unique opens for emails sent for this sender
131
     *         - unique_clicks integer the number of unique clicks for emails sent for this sender
132
     */
133
    public function senders()
134
    {
135
        $_params = array();
136
        return $this->master->call('users/senders', $_params);
137
    }
138
}
139