Skip to content

Commit f3d4b0e

Browse files
committed
Fix linter whitespace issues
1 parent d43d9bd commit f3d4b0e

File tree

408 files changed

+6874
-6067
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+6874
-6067
lines changed

AMP/AMP.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php namespace App\SupportedApps\AMP;
1+
<?php
2+
3+
namespace App\SupportedApps\AMP;
24

35
class AMP extends \App\SupportedApps
46
{

AVMFritzbox/AVMFritzbox.php

+76-74
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
<?php namespace App\SupportedApps\AVMFritzbox;
1+
<?php
2+
3+
namespace App\SupportedApps\AVMFritzbox;
24

35
class AVMFritzbox extends \App\SupportedApps implements \App\EnhancedApps
46
{
57
public $config;
68
protected $method = 'POST';
79

810
function __construct()
9-
{
10-
}
11+
{
12+
}
1113

1214
public function getAttrs($calltype)
13-
{
15+
{
1416
switch ($calltype) {
1517
case "statusInfo":
1618
$verb = "GetStatusInfo";
@@ -26,59 +28,59 @@ public function getAttrs($calltype)
2628
}
2729

2830
$attrs = [
29-
"headers" => [
30-
"Content-Type" => "text/xml; charset='utf-8'",
31+
"headers" => [
32+
"Content-Type" => "text/xml; charset='utf-8'",
3133
"SoapAction" => "urn:schemas-upnp-org:service:{$ns}:1#{$verb}",
32-
],
33-
"body" => "<?xml version='1.0' encoding='utf-8'?>
34+
],
35+
"body" => "<?xml version='1.0' encoding='utf-8'?>
3436
<s:Envelope s:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/' xmlns:s='http://schemas.xmlsoap.org/soap/envelope/'>
3537
<s:Body>
3638
<u:{$verb} xmlns:u='urn:schemas-upnp-org:service:{$ns}:1' />
3739
</s:Body>
3840
</s:Envelope>",
39-
];
41+
];
4042

41-
return $attrs;
42-
}
43+
return $attrs;
44+
}
4345

4446
public static function getAvailableStats()
45-
{
46-
return [
47-
"NewConnectionStatus" => "Status",
48-
"NewUptime" => "Up Time",
49-
"NewLayer1DownstreamMaxBitRate" => "Max Down",
50-
"NewLayer1UpstreamMaxBitRate" => "Max Up",
47+
{
48+
return [
49+
"NewConnectionStatus" => "Status",
50+
"NewUptime" => "Up Time",
51+
"NewLayer1DownstreamMaxBitRate" => "Max Down",
52+
"NewLayer1UpstreamMaxBitRate" => "Max Up",
5153
"NewByteReceiveRate" => "Down",
5254
"NewByteSendRate" => "Up",
5355
"NewX_AVM_DE_TotalBytesReceived64" => "Received",
5456
"NewX_AVM_DE_TotalBytesSent64" => "Send",
55-
];
56-
}
57+
];
58+
}
5759

5860
private static function formatValueUsingStat($stat, $value)
59-
{
60-
if (!isset($value)) {
61-
return "N/A";
62-
}
61+
{
62+
if (!isset($value)) {
63+
return "N/A";
64+
}
6365

64-
switch ($stat) {
66+
switch ($stat) {
6567
case "NewConnectionStatus":
6668
return "{$value}";
6769
case "NewUptime":
6870
return self::toTime((int)$value);
69-
case "NewLayer1DownstreamMaxBitRate":
70-
case "NewLayer1UpstreamMaxBitRate":
71-
return format_bytes(((int)$value)/8, false, "<span>", "/s</span>");
71+
case "NewLayer1DownstreamMaxBitRate":
72+
case "NewLayer1UpstreamMaxBitRate":
73+
return format_bytes(((int)$value) / 8, false, "<span>", "/s</span>");
7274
case "NewByteReceiveRate":
7375
case "NewByteSendRate":
7476
return format_bytes((int)$value, false, "<span>", "/s</span>");
7577
case "NewX_AVM_DE_TotalBytesReceived64":
7678
case "NewX_AVM_DE_TotalBytesSent64":
77-
return format_bytes((int)$value, false, "<span>", "</span>");
78-
default:
79-
return "{$value}";
80-
}
81-
}
79+
return format_bytes((int)$value, false, "<span>", "</span>");
80+
default:
81+
return "{$value}";
82+
}
83+
}
8284

8385
private static function toTime($timestamp)
8486
{
@@ -89,72 +91,72 @@ private static function toTime($timestamp)
8991
$hourDuration = sprintf('%02dh', $hours);
9092
$minDuration = sprintf('%02dm', $minutes);
9193
$secDuration = sprintf('%02ds', $seconds);
92-
$HourMinSec = $hourDuration.$minDuration.$secDuration;
94+
$HourMinSec = $hourDuration . $minDuration . $secDuration;
9395

94-
if($hourDuration > 0){
96+
if ($hourDuration > 0) {
9597
$hourDuration = $hourDuration;
9698
} else {
9799
$hourDuration = '00h';
98100
}
99101

100-
if($minDuration > 0){
102+
if ($minDuration > 0) {
101103
$minDuration = $minDuration;
102104
} else {
103105
$minDuration = '00m';
104106
}
105107

106-
if($secDuration > 0){
108+
if ($secDuration > 0) {
107109
$secDuration = $secDuration;
108110
} else {
109111
$secDuration = '00s';
110112
}
111113

112-
$HourMinSec = $hourDuration.$minDuration.$secDuration;
114+
$HourMinSec = $hourDuration . $minDuration . $secDuration;
113115

114116
return $HourMinSec;
115117
}
116118

117119
public function test()
118-
{
119-
$test = parent::appTest(
120+
{
121+
$test = parent::appTest(
120122
$this->url("statusInfo"),
121123
$this->getAttrs("statusInfo")
122124
);
123-
echo $test->status;
124-
}
125+
echo $test->status;
126+
}
125127

126-
public function livestats()
127-
{
128-
$status = "active";
128+
public function livestats()
129+
{
130+
$status = "active";
129131

130132
$statusInfo = parent::execute(
131-
$this->url("statusInfo"),
132-
$this->getAttrs("statusInfo")
133-
);
134-
$statusInfoDetails = simplexml_load_string($statusInfo->getBody())->children('s', true)->children('u', true)->children();
133+
$this->url("statusInfo"),
134+
$this->getAttrs("statusInfo")
135+
);
136+
$statusInfoDetails = simplexml_load_string($statusInfo->getBody())->children('s', true)->children('u', true)->children();
135137

136138
$linkProperties = parent::execute(
137-
$this->url("linkProperties"),
138-
$this->getAttrs("linkProperties")
139-
);
140-
$linkPropertiesDetails = simplexml_load_string($linkProperties->getBody())->children('s', true)->children('u', true)->children();
139+
$this->url("linkProperties"),
140+
$this->getAttrs("linkProperties")
141+
);
142+
$linkPropertiesDetails = simplexml_load_string($linkProperties->getBody())->children('s', true)->children('u', true)->children();
141143

142144
$addonInfo = parent::execute(
143-
$this->url("addonInfo"),
144-
$this->getAttrs("addonInfo")
145-
);
146-
$addonInfoDetails = simplexml_load_string($addonInfo->getBody())->children('s', true)->children('u', true)->children();
145+
$this->url("addonInfo"),
146+
$this->getAttrs("addonInfo")
147+
);
148+
$addonInfoDetails = simplexml_load_string($addonInfo->getBody())->children('s', true)->children('u', true)->children();
147149

148-
$data = ["visiblestats" => []];
150+
$data = ["visiblestats" => []];
149151

150-
if ($statusInfoDetails && $linkPropertiesDetails && $addonInfoDetails) {
151-
foreach ($this->config->availablestats as $stat) {
152+
if ($statusInfoDetails && $linkPropertiesDetails && $addonInfoDetails) {
153+
foreach ($this->config->availablestats as $stat) {
152154
if (!isset(self::getAvailableStats()[$stat])) {
153-
continue;
154-
}
155+
continue;
156+
}
155157

156158
$newstat = new \stdClass();
157-
$newstat->title = self::getAvailableStats()[$stat];
159+
$newstat->title = self::getAvailableStats()[$stat];
158160

159161
switch ($stat) {
160162
case "NewConnectionStatus":
@@ -187,25 +189,25 @@ public function livestats()
187189
);
188190
}
189191

190-
$data["visiblestats"][] = $newstat;
191-
}
192-
}
192+
$data["visiblestats"][] = $newstat;
193+
}
194+
}
193195

194-
return parent::getLiveStats($status, $data);
195-
}
196+
return parent::getLiveStats($status, $data);
197+
}
196198

197-
public function url($endpoint)
198-
{
199+
public function url($endpoint)
200+
{
199201
if ($endpoint == "statusInfo") {
200202
$endpoint = "WANIPConn1";
201203
} else {
202204
$endpoint = "WANCommonIFC1";
203205
}
204-
205-
$fritzURL = $this->config->url;
206206

207-
$api_url = "$fritzURL:49000/igdupnp/control/{$endpoint}";
207+
$fritzURL = $this->config->url;
208+
209+
$api_url = "$fritzURL:49000/igdupnp/control/{$endpoint}";
208210

209-
return $api_url;
210-
}
211+
return $api_url;
212+
}
211213
}

AWX/AWX.php

+28-26
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
1-
<?php namespace App\SupportedApps\AWX;
1+
<?php
2+
3+
namespace App\SupportedApps\AWX;
24

35
class AWX extends \App\SupportedApps implements \App\EnhancedApps
46
{
5-
public $config;
7+
public $config;
68

7-
//protected $login_first = true; // Uncomment if api requests need to be authed first
8-
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
9+
//protected $login_first = true; // Uncomment if api requests need to be authed first
10+
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
911

10-
function __construct()
11-
{
12-
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
13-
}
12+
function __construct()
13+
{
14+
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
15+
}
1416

15-
public function test()
16-
{
17-
$test = parent::appTest($this->url("status"));
18-
echo $test->status;
19-
}
17+
public function test()
18+
{
19+
$test = parent::appTest($this->url("status"));
20+
echo $test->status;
21+
}
2022

21-
public function livestats()
22-
{
23-
$status = "inactive";
24-
$res = parent::execute($this->url("status"));
25-
$details = json_decode($res->getBody());
23+
public function livestats()
24+
{
25+
$status = "inactive";
26+
$res = parent::execute($this->url("status"));
27+
$details = json_decode($res->getBody());
2628

27-
$data = [];
28-
return parent::getLiveStats($status, $data);
29-
}
30-
public function url($endpoint)
31-
{
32-
$api_url = parent::normaliseurl($this->config->url) . $endpoint;
33-
return $api_url;
34-
}
29+
$data = [];
30+
return parent::getLiveStats($status, $data);
31+
}
32+
public function url($endpoint)
33+
{
34+
$api_url = parent::normaliseurl($this->config->url) . $endpoint;
35+
return $api_url;
36+
}
3537
}

Ackee/Ackee.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
<?php namespace App\SupportedApps\Ackee;
1+
<?php
22

3-
class Ackee extends \App\SupportedApps {
3+
namespace App\SupportedApps\Ackee;
44

5-
}
5+
class Ackee extends \App\SupportedApps
6+
{
7+
}

0 commit comments

Comments
 (0)