@@ -42,7 +42,7 @@ |
||
42 | 42 | * return Error to wrap error message from server. |
43 | 43 | * |
44 | 44 | * @param mixed $header |
45 | - * @return \Error|null|string |
|
45 | + * @return string |
|
46 | 46 | * |
47 | 47 | * @throws GoridgeException |
48 | 48 | */ |
@@ -71,8 +71,8 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function build(string $directory, string $template, string $output, string $version) |
73 | 73 | { |
74 | - $filename = $directory . "/main.go"; |
|
75 | - $output = $output . ($this->getOS() == 'windows' ? '.exe' : ''); |
|
74 | + $filename = $directory."/main.go"; |
|
75 | + $output = $output.($this->getOS() == 'windows' ? '.exe' : ''); |
|
76 | 76 | |
77 | 77 | // step 1, generate template |
78 | 78 | $this->generate($template, $filename); |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | // run the build |
92 | 92 | $this->run($command, true); |
93 | 93 | |
94 | - if (!file_exists($directory . '/' . $output)) { |
|
94 | + if (!file_exists($directory.'/'.$output)) { |
|
95 | 95 | self::cprintf("<red>Build has failed!</reset>"); |
96 | 96 | return; |
97 | 97 | } |
98 | 98 | |
99 | 99 | self::cprintf("<green>Build complete!</reset>\n"); |
100 | - $this->run($directory . '/' . $output, false); |
|
100 | + $this->run($directory.'/'.$output, false); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | /** |
@@ -120,8 +120,8 @@ discard block |
||
120 | 120 | $body = file_get_contents($template); |
121 | 121 | |
122 | 122 | $replace = [ |
123 | - '// -packages- //' => '"' . join("\"\n\"", $this->config['packages']) . '"', |
|
124 | - '// -commands- //' => '_ "' . join("\"\n_ \"", $this->config['commands']) . '"', |
|
123 | + '// -packages- //' => '"'.join("\"\n\"", $this->config['packages']).'"', |
|
124 | + '// -commands- //' => '_ "'.join("\"\n_ \"", $this->config['commands']).'"', |
|
125 | 125 | '// -register- //' => join("\n", $this->config['register']) |
126 | 126 | ]; |
127 | 127 | |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | public static function cprintf(string $format, ...$args) |
178 | 178 | { |
179 | 179 | if (self::isColorsSupported()) { |
180 | - $format = preg_replace_callback("/<\/?([^>]+)>/", function ($value) { |
|
180 | + $format = preg_replace_callback("/<\/?([^>]+)>/", function($value) { |
|
181 | 181 | return self::$colors[$value[1]]; |
182 | 182 | }, $format); |
183 | 183 | } else { |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | private $uploadsFactory; |
34 | 34 | |
35 | 35 | /** @var array Valid values for HTTP protocol version */ |
36 | - private static $allowedVersions = ['1.0', '1.1', '2',]; |
|
36 | + private static $allowedVersions = ['1.0', '1.1', '2', ]; |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @param Worker $worker |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | if (\in_array($key, array('CONTENT_TYPE', 'CONTENT_LENGTH'))) { |
152 | 152 | $server[$key] = implode(', ', $value); |
153 | 153 | } else { |
154 | - $server['HTTP_' . $key] = implode(', ', $value); |
|
154 | + $server['HTTP_'.$key] = implode(', ', $value); |
|
155 | 155 | } |
156 | 156 | } |
157 | 157 |