File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 22
33namespace staabm \PHPStanTodoBy \utils ;
44
5+ use CurlShareHandle ;
56use RuntimeException ;
67
8+ use function function_exists ;
79use function is_string ;
810
911final class HttpClient
1012{
1113 /**
12- * @var \ CurlShareHandle|resource|null
14+ * @var CurlShareHandle|resource|null
1315 */
14- private $ shareHandle = null ;
16+ private $ shareHandle ;
1517
1618 /**
1719 * @param non-empty-array<non-empty-string> $urls
@@ -21,12 +23,12 @@ final class HttpClient
2123 */
2224 public function getMulti (array $ urls , array $ headers ): array
2325 {
24- if ($ this -> shareHandle === null ) {
26+ if (null === $ this -> shareHandle ) {
2527 if (function_exists ('curl_share_init_persistent ' )) {
2628 $ this ->shareHandle = curl_share_init_persistent ([
2729 CURL_LOCK_DATA_DNS ,
2830 CURL_LOCK_DATA_CONNECT ,
29- CURL_LOCK_DATA_SSL_SESSION
31+ CURL_LOCK_DATA_SSL_SESSION ,
3032 ]);
3133 } else {
3234 $ this ->shareHandle = curl_share_init ();
You can’t perform that action at this time.
0 commit comments