Skip to content

Commit c45f8e2

Browse files
Use short array syntax
1 parent c9ad23c commit c45f8e2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/multi_curl_set_custom_instance_tag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'tag5' => 'https://httpbin.org/status/503',
1010
];
1111

12-
$ids_to_tags = array();
12+
$ids_to_tags = [];
1313

1414
$multi_curl = new MultiCurl();
1515

src/Curl/Curl.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ public function diagnose($return = false)
13251325
if ($this->attempts === 0) {
13261326
echo 'No HTTP requests have been made.' . "\n";
13271327
} else {
1328-
$request_types = array(
1328+
$request_types = [
13291329
'DELETE' => $this->getOpt(CURLOPT_CUSTOMREQUEST) === 'DELETE',
13301330
'GET' => $this->getOpt(CURLOPT_CUSTOMREQUEST) === 'GET' || $this->getOpt(CURLOPT_HTTPGET),
13311331
'HEAD' => $this->getOpt(CURLOPT_CUSTOMREQUEST) === 'HEAD',
@@ -1334,7 +1334,7 @@ public function diagnose($return = false)
13341334
'POST' => $this->getOpt(CURLOPT_CUSTOMREQUEST) === 'POST' || $this->getOpt(CURLOPT_POST),
13351335
'PUT' => $this->getOpt(CURLOPT_CUSTOMREQUEST) === 'PUT',
13361336
'SEARCH' => $this->getOpt(CURLOPT_CUSTOMREQUEST) === 'SEARCH',
1337-
);
1337+
];
13381338
$request_method = '';
13391339
foreach ($request_types as $http_method_name => $http_method_used) {
13401340
if ($http_method_used) {

tests/PHPCurlClass/ArrayUtilTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testCaseInsensitiveArrayIsArrayAssoc()
3333

3434
public function testArrayFlattenMultidimArray()
3535
{
36-
$data = array(
36+
$data = [
3737
'key-1' => 'value-1',
3838
'key-2' => 'value-2',
3939
'key-3' => [
@@ -44,7 +44,7 @@ public function testArrayFlattenMultidimArray()
4444
'nested-more-key-2' => 'nested-more-value-2',
4545
],
4646
],
47-
);
47+
];
4848

4949
$this->assertEquals([
5050
'key-1' => 'value-1',

0 commit comments

Comments
 (0)