1 | <?php |
||
13 | class Dashbot extends AbstractTracker |
||
14 | { |
||
15 | const TRACKER_URL = |
||
16 | 'https://tracker.dashbot.io/track?platform=%s&v=%s&type=%s&apiKey=%s'; |
||
17 | |||
18 | const TRANSPORTER_CMD = |
||
19 | 'curl -X POST -d %1$s \'%2$s\' -H \'Content-Type: application/json\''; |
||
20 | |||
21 | const DEFAULT_PARAMS = array( |
||
22 | 'platform' => 'generic', // Either generic, facebook, slack, kik |
||
23 | 'v' => '0.7.4-rest', // API Version |
||
24 | 'type' => null, // Hit type (required) |
||
25 | 'apiKey' => null, // API key (required) |
||
26 | ); |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | * |
||
31 | * @param |
||
32 | */ |
||
33 | public function __construct( |
||
53 | |||
54 | /** |
||
55 | * Sets the platform (format). |
||
56 | * |
||
57 | * @see https://www.dashbot.io/sdk/template |
||
58 | * |
||
59 | * @param string $platform Either 'generic', 'facebook', 'slack', 'kik' |
||
60 | * |
||
61 | * @return self |
||
62 | */ |
||
63 | public function setPlatform($platform) |
||
69 | |||
70 | /** |
||
71 | * Sets a global tag (used to combined metrics). |
||
72 | * |
||
73 | * @see https://www.dashbot.io/sdk/template |
||
74 | * |
||
75 | * @param array $entries |
||
|
|||
76 | * @param string $local_tag |
||
77 | * |
||
78 | * @return self |
||
79 | */ |
||
80 | public function setGlobalTag($global_tag = null) |
||
86 | |||
87 | /** |
||
88 | * Rewrite the dashbot template Id. |
||
89 | * |
||
90 | * @see https://www.dashbot.io/sdk/template |
||
91 | * |
||
92 | * @param array $entries |
||
93 | * @param array $params |
||
94 | * |
||
95 | * @return array |
||
96 | */ |
||
97 | public function rewriteTemplateId(array $entries, array $params) |
||
112 | |||
113 | /** |
||
114 | * Sets the event hit type. |
||
115 | * |
||
116 | * @param string $type |
||
117 | * @param array $entries |
||
118 | * @param string $local_tag |
||
119 | * |
||
120 | * @return array |
||
121 | */ |
||
122 | protected function get($type, array $entries, $local_tag = null) |
||
137 | |||
138 | /** |
||
139 | * Returns an incoming tracking dataset. |
||
140 | * |
||
141 | * @param array $entries |
||
142 | * @param string $local_tag |
||
143 | * |
||
144 | * @return array |
||
145 | */ |
||
146 | public function incoming(array $entries, $local_tag = null) |
||
150 | |||
151 | /** |
||
152 | * Returns an outgoing tracking dataset. |
||
153 | * |
||
154 | * @param array $entries |
||
155 | * @param string $local_tag |
||
156 | * |
||
157 | * @return array |
||
158 | */ |
||
159 | public function outgoing(array $entries, $local_tag = null) |
||
163 | } |
||
164 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.