| @@ -16,7 +16,7 @@ discard block | ||
| 16 | 16 | |
| 17 | 17 | private $exec; | 
| 18 | 18 | |
| 19 | -    public function __construct(string $container, string $connection_string) { | |
| 19 | +    public function __construct (string $container, string $connection_string) { | |
| 20 | 20 | $this->exec = new CommandRunner(); | 
| 21 | 21 | |
| 22 | 22 | $this->connection_string = $connection_string; | 
| @@ -33,22 +33,22 @@ discard block | ||
| 33 | 33 | } | 
| 34 | 34 | } | 
| 35 | 35 | |
| 36 | -    protected function run($cmd) : string { | |
| 36 | +    protected function run ($cmd) : string { | |
| 37 | 37 | $logfile = $this->exec->run(CommandRunner::COMMAND_SYNC, __DIR__, $cmd, true); | 
| 38 | 38 | $log = $logfile->getText(); | 
| 39 | 39 | $logfile->delete(); | 
| 40 | 40 | return $log; | 
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | -    public function getContainer() : string { | |
| 43 | +    public function getContainer () : string { | |
| 44 | 44 | return $this->container; | 
| 45 | 45 | } | 
| 46 | 46 | |
| 47 | -    public function getAccountName() : string { | |
| 47 | +    public function getAccountName () : string { | |
| 48 | 48 | $this->account_name; | 
| 49 | 49 | } | 
| 50 | 50 | |
| 51 | -    public function uploadToBlob(string $file, string $name, string $content_type = null) { | |
| 51 | +    public function uploadToBlob (string $file, string $name, string $content_type = null) { | |
| 52 | 52 |          if (!file_exists($file) || !is_file($file) || !is_readable($file)) { | 
| 53 | 53 |              throw new Exception("Invalid file"); | 
| 54 | 54 | } | 
| @@ -82,7 +82,7 @@ discard block | ||
| 82 | 82 | return $log;*/ | 
| 83 | 83 | } | 
| 84 | 84 | |
| 85 | -    public function GenerateBlobSas(string $name, int $expire = 5 * 60 * 60, string $ip = null) : string { | |
| 85 | +    public function GenerateBlobSas (string $name, int $expire = 5 * 60 * 60, string $ip = null) : string { | |
| 86 | 86 | $signedPermissions = "r"; | 
| 87 | 87 |          //$signedStart = gmdate("Y-m-d\TH:i\Z", time()); | 
| 88 | 88 |          $signedExpiry = gmdate("Y-m-d\TH:i\Z", time() + $expire); | 
| @@ -133,7 +133,7 @@ discard block | ||
| 133 | 133 | return $sas; | 
| 134 | 134 | } | 
| 135 | 135 | |
| 136 | -    public function getBlobUrl(string $name) { | |
| 136 | +    public function getBlobUrl (string $name) { | |
| 137 | 137 | $url = "https://" . $this->account_name . ".blob.core.windows.net/" . $this->container . "/" . $name; | 
| 138 | 138 | return $url; | 
| 139 | 139 | } |