1 | <?php |
||
14 | class UserSegmentRepository |
||
15 | { |
||
16 | |||
17 | const BASE_URL = 'http://api.appnexus.com/batch-segment'; |
||
18 | // const BASE_URL_ADNXS = 'http://sand.api.appnexus.com/batch-segment'; |
||
19 | |||
20 | /** @var \SplQueue */ |
||
21 | protected $userSegments; |
||
22 | |||
23 | /** @var Client|Auth */ |
||
24 | protected $client; |
||
25 | |||
26 | /** @var int */ |
||
27 | protected $memberId; |
||
28 | |||
29 | /** @var Cache */ |
||
30 | protected $cache; |
||
31 | |||
32 | /** @var bool */ |
||
33 | protected $cacheEnabled; |
||
34 | |||
35 | const CACHE_NAMESPACE = 'appnexus_segment_user_upload'; |
||
36 | |||
37 | const CACHE_EXPIRATION = 3600; |
||
38 | |||
39 | /** |
||
40 | * SegmentRepository constructor. |
||
41 | * |
||
42 | * @param ClientInterface $client |
||
43 | * @param Cache|null $cache |
||
44 | */ |
||
45 | public function __construct(ClientInterface $client, Cache $cache = null) |
||
52 | |||
53 | |||
54 | /** |
||
55 | * @param $fileAsString |
||
56 | * @param $memberId |
||
57 | * |
||
58 | * @return RepositoryResponse |
||
59 | * @throws \Exception |
||
60 | */ |
||
61 | public function upload($fileAsString,$memberId){ |
||
94 | |||
95 | |||
96 | |||
97 | /** |
||
98 | * @param $memberId |
||
99 | * |
||
100 | * @return string |
||
101 | * @throws \Exception |
||
102 | */ |
||
103 | public function getUploadUrl($memberId) |
||
127 | |||
128 | |||
129 | /** |
||
130 | * @return boolean |
||
131 | */ |
||
132 | public function isCacheEnabled() |
||
136 | |||
137 | public function disableCache() |
||
141 | |||
142 | public function enableCache() |
||
146 | |||
147 | } |
||
148 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.