@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types=1); |
|
1 | +<?php declare(strict_types = 1); |
|
2 | 2 | |
3 | 3 | if(!extension_loaded('gd')) die('GD ext is required to run this!'); |
4 | 4 | |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | private $className; |
10 | 10 | |
11 | 11 | public function __construct() { |
12 | - if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3){ |
|
12 | + if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3) { |
|
13 | 13 | $this->baseURL = rtrim($_SERVER['argv'][1], '/'); |
14 | 14 | $this->className = $_SERVER['argv'][2]; |
15 | 15 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | $this->updateDocs(); |
31 | 31 | |
32 | - $domain = preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL); |
|
32 | + $domain = preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL); |
|
33 | 33 | say("\nAdmin SQL:"); |
34 | 34 | say("INSERT INTO `mangatracker_development`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');"); |
35 | 35 | say("INSERT INTO `mangatracker_production`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');"); |
@@ -97,12 +97,12 @@ discard block |
||
97 | 97 | |
98 | 98 | //Update @updated |
99 | 99 | $currentDate = date("Y-m-d", time()); |
100 | - $baseFile = str_replace("@updated {$matches[1]}","@updated {$currentDate}", $baseFile); |
|
100 | + $baseFile = str_replace("@updated {$matches[1]}", "@updated {$currentDate}", $baseFile); |
|
101 | 101 | |
102 | 102 | //Update @version |
103 | 103 | $currentVersion = explode('.', $matches[2]); |
104 | - $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.". (((int) $currentVersion[2]) + 1); |
|
105 | - $baseFile = str_replace("@version {$matches[2]}","@version {$newVersion}", $baseFile); |
|
104 | + $newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.".(((int) $currentVersion[2]) + 1); |
|
105 | + $baseFile = str_replace("@version {$matches[2]}", "@version {$newVersion}", $baseFile); |
|
106 | 106 | |
107 | 107 | //Add @require |
108 | 108 | // @resource fontAwesome |