Skip to content

Commit fe6c2a2

Browse files
brnsknactions-user
authored andcommitted
Apply formatting changes
1 parent 96d01a6 commit fe6c2a2

13 files changed

+372
-374
lines changed

src/Formatter.php

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,37 @@
44
class Formatter
55
{
66
/**
7-
* Text string
8-
*
9-
* @var string
10-
*/
7+
* Text string
8+
*
9+
* @var string
10+
*/
1111
private $text;
1212

1313
/**
14-
* Text attributes
15-
*
16-
* @var array
17-
*/
14+
* Text attributes
15+
*
16+
* @var array
17+
*/
1818
private $attributes;
1919

2020
/**
21-
* Initialize class.
22-
*
23-
* @param string $text
24-
* @param array $attributes
25-
* @return void
26-
*/
21+
* Initialize class.
22+
*
23+
* @param string $text
24+
* @param array $attributes
25+
* @return void
26+
*/
2727
public function __construct(string $text, array $attributes = [])
2828
{
2929
$this->text = $text;
3030
$this->attributes = $attributes;
3131
}
3232

3333
/**
34-
* Process formatter.
35-
*
36-
* @return string
37-
*/
34+
* Process formatter.
35+
*
36+
* @return string
37+
*/
3838
public function process()
3939
{
4040
foreach ($this->attributes as $attribute => $value) {
@@ -54,11 +54,11 @@ public function process()
5454
}
5555

5656
/**
57-
* Clean attributes without quotes.
58-
*
59-
* @param string $value
60-
* @return string
61-
*/
57+
* Clean attributes without quotes.
58+
*
59+
* @param string $value
60+
* @return string
61+
*/
6262
private function cleanWithoutQuotes($value)
6363
{
6464
return preg_replace(
@@ -69,23 +69,23 @@ private function cleanWithoutQuotes($value)
6969
}
7070

7171
/**
72-
* Clean attributes.
73-
*
74-
* @param string $value
75-
* @return string
76-
*/
72+
* Clean attributes.
73+
*
74+
* @param string $value
75+
* @return string
76+
*/
7777
private function clean($value)
7878
{
7979
return escapeshellcmd(escapeshellarg($value));
8080
}
8181

8282
/**
83-
* Handle static call
84-
*
85-
* @param string $text
86-
* @param array $attributes
87-
* @return self
88-
*/
83+
* Handle static call
84+
*
85+
* @param string $text
86+
* @param array $attributes
87+
* @return self
88+
*/
8989
public static function run(string $text, array $attributes = [])
9090
{
9191
return (new self($text, $attributes))->process();

src/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ function validate($rules)
1111
abort($errors->first(), 400);
1212
}
1313
}
14-
}
14+
}

src/OS/Distro.php

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,55 @@
66
class Distro
77
{
88
/**
9-
* Options came from chain methods
10-
*
11-
* @var array
12-
*/
9+
* Options came from chain methods
10+
*
11+
* @var array
12+
*/
1313
private $options = [];
1414

1515
/**
16-
* Default option
17-
*
18-
* @var mixed
19-
*/
16+
* Default option
17+
*
18+
* @var mixed
19+
*/
2020
private $default = false;
2121

2222
/**
23-
* Current instance
24-
*
25-
* @var Distro
26-
*/
23+
* Current instance
24+
*
25+
* @var Distro
26+
*/
2727
private static $instance = null;
2828

2929
/**
30-
* Current DistroInfo instance
31-
*
32-
* @var DistroInfo
33-
*/
30+
* Current DistroInfo instance
31+
*
32+
* @var DistroInfo
33+
*/
3434
private static $distroInfo = null;
35-
35+
3636
/**
37-
* Current engine
38-
*
39-
* @var ICommandEngine
40-
*/
37+
* Current engine
38+
*
39+
* @var ICommandEngine
40+
*/
4141
private static $currentEngine = null;
4242

4343
/**
44-
* Call getDistro function when it's initialized.
45-
*
46-
* @return void
47-
*/
44+
* Call getDistro function when it's initialized.
45+
*
46+
* @return void
47+
*/
4848
public function __construct()
4949
{
5050
self::getDistro();
5151
}
5252

5353
/**
54-
* Check if not exist current static distro info and engine, then load them.
55-
*
56-
* @return DistroInfo
57-
*/
54+
* Check if not exist current static distro info and engine, then load them.
55+
*
56+
* @return DistroInfo
57+
*/
5858
public static function getDistro()
5959
{
6060
if (
@@ -68,10 +68,10 @@ public static function getDistro()
6868
}
6969

7070
/**
71-
* Get suitable option according to current distro info.
72-
*
73-
* @return mixed
74-
*/
71+
* Get suitable option according to current distro info.
72+
*
73+
* @return mixed
74+
*/
7575
public function get()
7676
{
7777
$distro = self::getDistro();
@@ -88,11 +88,11 @@ public function get()
8888
}
8989

9090
/**
91-
* Run suitable option as a command.
92-
*
93-
* @param array $attributes
94-
* @return string
95-
*/
91+
* Run suitable option as a command.
92+
*
93+
* @param array $attributes
94+
* @return string
95+
*/
9696
public function run($attributes = [])
9797
{
9898
$result = $this->get();
@@ -103,11 +103,11 @@ public function run($attributes = [])
103103
}
104104

105105
/**
106-
* Run suitable option as a command as root.
107-
*
108-
* @param array $attributes
109-
* @return string
110-
*/
106+
* Run suitable option as a command as root.
107+
*
108+
* @param array $attributes
109+
* @return string
110+
*/
111111
public function runSudo($attributes = [])
112112
{
113113
$result = $this->get();
@@ -118,40 +118,40 @@ public function runSudo($attributes = [])
118118
}
119119

120120
/**
121-
* Set default option.
122-
*
123-
* @param mixed $default
124-
* @return mixed
125-
*/
121+
* Set default option.
122+
*
123+
* @param mixed $default
124+
* @return mixed
125+
*/
126126
public function default($default)
127127
{
128128
$this->default = $default;
129129
return $this;
130130
}
131131

132132
/**
133-
* Add chained methods as option.
134-
*
135-
* @param string $method
136-
* @param array $parameters
137-
* @return self
138-
*/
133+
* Add chained methods as option.
134+
*
135+
* @param string $method
136+
* @param array $parameters
137+
* @return self
138+
*/
139139
public function __call($method, $parameters)
140140
{
141141
$this->options[$method] = $parameters[0];
142142
return $this;
143143
}
144144

145145
/**
146-
* Handle statically callings.
147-
*
146+
* Handle statically callings.
147+
*
148148
* @param string $method
149-
* @param array $parameters
150-
* @return self
151-
*/
149+
* @param array $parameters
150+
* @return self
151+
*/
152152
public static function __callStatic($method, $parameters)
153153
{
154-
if(self::$instance !== null){
154+
if (self::$instance !== null) {
155155
self::$instance = new self();
156156
}
157157
return self::$instance->$method(...$parameters);

0 commit comments

Comments
 (0)