Skip to content

Commit 16b8d2b

Browse files
splitbraingithub-actions[bot]
authored andcommitted
🤖 Automatic code style fixes
1 parent 1fb17b9 commit 16b8d2b

File tree

8 files changed

+274
-263
lines changed

8 files changed

+274
-263
lines changed

‎HTTP/DokuHTTPClient.php

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?php
22

3-
43
namespace dokuwiki\plugin\upgrade\HTTP;
54

6-
5+
use dokuwiki\Extension\Event;
76

87
/**
98
* Adds DokuWiki specific configs to the HTTP client
109
*
1110
* @author Andreas Goetz <cpuidle@gmx.de>
1211
*/
13-
class DokuHTTPClient extends HTTPClient {
14-
12+
class DokuHTTPClient extends HTTPClient
13+
{
1514
/**
1615
* Constructor.
1716
*
1817
* @author Andreas Gohr <andi@splitbrain.org>
1918
*/
20-
public function __construct(){
19+
public function __construct()
20+
{
2121
global $conf;
2222

2323
// call parent constructor
@@ -32,8 +32,8 @@ public function __construct(){
3232
$this->proxy_except = $conf['proxy']['except'];
3333

3434
// allow enabling debugging via URL parameter (if debugging allowed)
35-
if($conf['allowdebug']) {
36-
if(
35+
if ($conf['allowdebug']) {
36+
if (
3737
isset($_REQUEST['httpdebug']) ||
3838
(
3939
isset($_SERVER['HTTP_REFERER']) &&
@@ -58,20 +58,17 @@ public function __construct(){
5858
* @param string $method
5959
* @return bool
6060
*/
61-
public function sendRequest($url,$data='',$method='GET'){
62-
$httpdata = array('url' => $url,
63-
'data' => $data,
64-
'method' => $method);
65-
$evt = new \Doku_Event('HTTPCLIENT_REQUEST_SEND',$httpdata);
66-
if($evt->advise_before()){
61+
public function sendRequest($url, $data = '', $method = 'GET')
62+
{
63+
$httpdata = ['url' => $url, 'data' => $data, 'method' => $method];
64+
$evt = new Event('HTTPCLIENT_REQUEST_SEND', $httpdata);
65+
if ($evt->advise_before()) {
6766
$url = $httpdata['url'];
6867
$data = $httpdata['data'];
6968
$method = $httpdata['method'];
7069
}
7170
$evt->advise_after();
7271
unset($evt);
73-
return parent::sendRequest($url,$data,$method);
72+
return parent::sendRequest($url, $data, $method);
7473
}
75-
7674
}
77-

0 commit comments

Comments
 (0)