File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
lib/Gitlab/HttpClient/Message Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Gitlab \HttpClient \Message ;
4
+
5
+ use Gitlab \HttpClient \Util \QueryStringBuilder as UtilQueryStringBuilder ;
6
+
7
+ /**
8
+ * @deprecated since 9.18 and will be removed in 10.0.
9
+ */
10
+ final class QueryStringBuilder
11
+ {
12
+ /**
13
+ * Encode a query as a query string according to RFC 3986. Indexed arrays are encoded using
14
+ * empty squared brackets ([]) unlike http_build_query.
15
+ *
16
+ * @param mixed $query
17
+ *
18
+ * @return string
19
+ *
20
+ * @deprecated since 9.18 and will be removed in 10.0.
21
+ */
22
+ public static function build ($ query )
23
+ {
24
+ @trigger_error (sprintf ('The %s() method is deprecated since version 9.18 and will be removed in 10.0. ' , __METHOD__ ), E_USER_DEPRECATED );
25
+
26
+ return UtilQueryStringBuilder::build ($ query );
27
+ }
28
+
29
+ /**
30
+ * Tell if the given array is an indexed one (i.e. contains only sequential integer keys starting from 0).
31
+ *
32
+ * @param array $query
33
+ *
34
+ * @return bool
35
+ *
36
+ * @deprecated since 9.18 and will be removed in 10.0.
37
+ */
38
+ public static function isIndexedArray (array $ query )
39
+ {
40
+ @trigger_error (sprintf ('The %s() method is deprecated since version 9.18 and will be removed in 10.0. ' , __METHOD__ ), E_USER_DEPRECATED );
41
+
42
+ if (0 === count ($ query ) || !isset ($ query [0 ])) {
43
+ return false ;
44
+ }
45
+
46
+ return array_keys ($ query ) === range (0 , count ($ query ) - 1 );
47
+ }
48
+ }
You can’t perform that action at this time.
0 commit comments