1 | <?php |
||
14 | abstract class ProviderBase |
||
15 | { |
||
16 | protected $page; |
||
17 | |||
18 | const RFC1738 = 1; |
||
19 | const RFC3986 = 2; |
||
20 | |||
21 | /** |
||
22 | * Constructor. |
||
23 | * |
||
24 | * @param Page $page |
||
25 | */ |
||
26 | public function __construct(Page $page) |
||
30 | |||
31 | /** |
||
32 | * Magic method to calculate and store the properties. |
||
33 | */ |
||
34 | public function __get($key) |
||
53 | |||
54 | /** |
||
55 | * Default shareCount function for providers without count api. |
||
56 | * |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function shareCount($response) |
||
63 | |||
64 | /** |
||
65 | * Default shareCountRequest function for providers without count api. |
||
66 | * |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function shareCountRequest() |
||
73 | |||
74 | /** |
||
75 | * Generates a valid url. |
||
76 | * |
||
77 | * @param string $url |
||
78 | * @param array $pageParams parameters to be taken from page fields as $paramName => $paramNameInTheURL |
||
79 | * @param array $getParams extra parameters as $key => $value |
||
80 | * @param int $encoding Type of encoding used. It can be static::RFC3986 or static::RFC1738 |
||
81 | */ |
||
82 | protected function buildUrl($url, array $pageParams = null, array $getParams = array(), $encoding = self::RFC1738) |
||
104 | |||
105 | /** |
||
106 | * Build a curl request. |
||
107 | * |
||
108 | * @param string $url |
||
109 | * @param bool|string $post |
||
110 | * @param array $headers |
||
111 | * |
||
112 | * @return resource |
||
113 | */ |
||
114 | protected static function request($url, $post = false, array $headers = null) |
||
146 | |||
147 | /** |
||
148 | * Handle JSON responses. |
||
149 | * |
||
150 | * @param string $content |
||
151 | * |
||
152 | * @return array|false |
||
153 | */ |
||
154 | protected static function jsonResponse($content) |
||
158 | |||
159 | /** |
||
160 | * Handle JSONP responses. |
||
161 | * |
||
162 | * @param string $content |
||
163 | * |
||
164 | * @return array|false |
||
165 | */ |
||
166 | protected static function jsonpResponse($content) |
||
172 | |||
173 | /** |
||
174 | * Handle HTML responses. |
||
175 | * |
||
176 | * @param string $content |
||
177 | * |
||
178 | * @return DOMDocument |
||
179 | */ |
||
180 | protected static function htmlResponse($content) |
||
189 | } |
||
190 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
The method
getObject()
can return nothing but null, so it makes no sense to assign that value to a variable.The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.