@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * |
33 | 33 | * @var array |
34 | 34 | */ |
35 | - protected $result = [ ]; |
|
35 | + protected $result = []; |
|
36 | 36 | |
37 | 37 | /** |
38 | 38 | * Adds variable to results |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | |
83 | 83 | // Nothing of this type yet, set an empty array |
84 | 84 | if (!isset($this->result[$sub]) or !is_array($this->result[$sub])) { |
85 | - $this->result[$sub] = [ ]; |
|
85 | + $this->result[$sub] = []; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | // Find the first entry that doesn't have this variable |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @type array |
90 | 90 | */ |
91 | - protected $options = [ ]; |
|
91 | + protected $options = []; |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * Holds the sockets already open for this server |
95 | 95 | * |
96 | 96 | * @type array |
97 | 97 | */ |
98 | - protected $sockets = [ ]; |
|
98 | + protected $sockets = []; |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * Construct the class with the passed options |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * |
105 | 105 | * @throws \GameQ\Exception\Server |
106 | 106 | */ |
107 | - public function __construct(array $server_info = [ ]) |
|
107 | + public function __construct(array $server_info = []) |
|
108 | 108 | { |
109 | 109 | |
110 | 110 | // Check for server type |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | sprintf('GameQ\\Protocols\\%s', ucfirst(strtolower($server_info[self::SERVER_TYPE]))) |
142 | 142 | ); |
143 | 143 | |
144 | - $this->protocol = $class->newInstanceArgs([ $this->options ]); |
|
144 | + $this->protocol = $class->newInstanceArgs([$this->options]); |
|
145 | 145 | } catch (\ReflectionException $e) { |
146 | 146 | throw new Exception("Unable to locate Protocols class for '{$server_info[self::SERVER_TYPE]}'!"); |
147 | 147 | } |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | |
187 | 187 | // Now let's validate the IPv6 value sent, remove the square brackets ([]) first |
188 | - if (!filter_var(trim($this->ip, '[]'), FILTER_VALIDATE_IP, [ 'flags' => FILTER_FLAG_IPV6, ])) { |
|
188 | + if (!filter_var(trim($this->ip, '[]'), FILTER_VALIDATE_IP, ['flags' => FILTER_FLAG_IPV6, ])) { |
|
189 | 189 | throw new Exception("The IPv6 address '{$this->ip}' is invalid."); |
190 | 190 | } |
191 | 191 | } else { |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | } |
205 | 205 | |
206 | 206 | // Validate the IPv4 value, if FALSE is not a valid IP, maybe a hostname. Try to resolve |
207 | - if (!filter_var($this->ip, FILTER_VALIDATE_IP, [ 'flags' => FILTER_FLAG_IPV4, ]) |
|
207 | + if (!filter_var($this->ip, FILTER_VALIDATE_IP, ['flags' => FILTER_FLAG_IPV4, ]) |
|
208 | 208 | && $this->ip === gethostbyname($this->ip) |
209 | 209 | ) { |
210 | 210 | // When gethostbyname() fails it returns the original string |
@@ -375,6 +375,6 @@ discard block |
||
375 | 375 | } |
376 | 376 | |
377 | 377 | // Reset the sockets list |
378 | - $this->sockets = [ ]; |
|
378 | + $this->sockets = []; |
|
379 | 379 | } |
380 | 380 | } |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |
@@ -1,20 +1,20 @@ |
||
1 | 1 | <?php |
2 | 2 | /** |
3 | - * This file is part of GameQ. |
|
4 | - * |
|
5 | - * GameQ is free software; you can redistribute it and/or modify |
|
6 | - * it under the terms of the GNU Lesser General Public License as published by |
|
7 | - * the Free Software Foundation; either version 3 of the License, or |
|
8 | - * (at your option) any later version. |
|
9 | - * |
|
10 | - * GameQ is distributed in the hope that it will be useful, |
|
11 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | - * GNU Lesser General Public License for more details. |
|
14 | - * |
|
15 | - * You should have received a copy of the GNU Lesser General Public License |
|
16 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | - */ |
|
3 | + * This file is part of GameQ. |
|
4 | + * |
|
5 | + * GameQ is free software; you can redistribute it and/or modify |
|
6 | + * it under the terms of the GNU Lesser General Public License as published by |
|
7 | + * the Free Software Foundation; either version 3 of the License, or |
|
8 | + * (at your option) any later version. |
|
9 | + * |
|
10 | + * GameQ is distributed in the hope that it will be useful, |
|
11 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 | + * GNU Lesser General Public License for more details. |
|
14 | + * |
|
15 | + * You should have received a copy of the GNU Lesser General Public License |
|
16 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 | + */ |
|
18 | 18 | |
19 | 19 | namespace GameQ; |
20 | 20 |