| @@ -35,7 +35,7 @@ discard block | ||
| 35 | 35 | private $originalServer = []; | 
| 36 | 36 | |
| 37 | 37 | /** @var array Valid values for HTTP protocol version */ | 
| 38 | - private static $allowedVersions = ['1.0', '1.1', '2',]; | |
| 38 | + private static $allowedVersions = ['1.0', '1.1', '2', ]; | |
| 39 | 39 | |
| 40 | 40 | /** | 
| 41 | 41 | * @param Worker $worker | 
| @@ -144,7 +144,7 @@ discard block | ||
| 144 | 144 |              if (\in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) { | 
| 145 | 145 |                  $server[$key] = implode(', ', $value); | 
| 146 | 146 |              } else { | 
| 147 | -                $server['HTTP_' . $key] = implode(', ', $value); | |
| 147 | +                $server['HTTP_'.$key] = implode(', ', $value); | |
| 148 | 148 | } | 
| 149 | 149 | } | 
| 150 | 150 | |
| @@ -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 { |