1 | <?php |
||
17 | class UserUpload implements CacheableInterface |
||
18 | { |
||
19 | |||
20 | const BASE_URL = 'http://api.adnxs.com/batch-segment'; |
||
21 | |||
22 | /** @var \SplQueue */ |
||
23 | protected $userSegments; |
||
24 | |||
25 | /** @var Client|Auth */ |
||
26 | protected $client; |
||
27 | |||
28 | /** @var int */ |
||
29 | protected $memberId; |
||
30 | |||
31 | /** @var Cache */ |
||
32 | protected $cache; |
||
33 | |||
34 | /** @var bool */ |
||
35 | protected $cacheEnabled; |
||
36 | |||
37 | const CACHE_NAMESPACE = 'appnexus_segment_user_upload'; |
||
38 | |||
39 | const CACHE_EXPIRATION = 3600; |
||
40 | |||
41 | /** |
||
42 | * SegmentRepository constructor. |
||
43 | * |
||
44 | * @param ClientInterface $client |
||
45 | * @param Cache|null $cache |
||
46 | */ |
||
47 | public function __construct(ClientInterface $client, Cache $cache = null) |
||
54 | |||
55 | /** |
||
56 | * @param $fileAsString |
||
57 | * @param $memberId |
||
58 | * |
||
59 | * @return UploadJobStatus |
||
60 | * @throws \Exception |
||
61 | */ |
||
62 | public function upload($fileAsString, $memberId) |
||
82 | |||
83 | /** |
||
84 | * @param $memberId |
||
85 | * |
||
86 | * @return UploadTicket |
||
87 | * @throws \Exception |
||
88 | */ |
||
89 | public function getUploadTicket($memberId) |
||
113 | |||
114 | /** |
||
115 | * @param UploadTicket $uploadJob |
||
116 | * |
||
117 | * @return UploadJobStatus $uploadJobStatus |
||
118 | * @throws \Exception |
||
119 | */ |
||
120 | public function getJobStatus(UploadTicket $uploadJob) |
||
144 | |||
145 | /** |
||
146 | * @return boolean |
||
147 | */ |
||
148 | public function isCacheEnabled() |
||
152 | |||
153 | public function disableCache() |
||
157 | |||
158 | public function enableCache() |
||
162 | } |
||
163 |
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.