| @@ -44,7 +44,7 @@ | ||
| 44 | 44 |          $this->name = trim($input->getArgument('name')); | 
| 45 | 45 |          if (empty($this->name)) { | 
| 46 | 46 |              $this->output->writeln('name of online installation cannot be empty'); | 
| 47 | -        } else { | |
| 47 | +        }else { | |
| 48 | 48 |              $this->output->writeln("The specified module {$this->name} is not configured with installation rules"); | 
| 49 | 49 | } | 
| 50 | 50 | } | 
| @@ -34,6 +34,6 @@ | ||
| 34 | 34 | |
| 35 | 35 | protected function execute(Input $input, Output $output) | 
| 36 | 36 |      { | 
| 37 | -        $output->writeln('ThinkPHP ' . App::VERSION); | |
| 37 | +        $output->writeln('ThinkPHP '.App::VERSION); | |
| 38 | 38 | } | 
| 39 | 39 | } | 
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library | 
| 18 | 18 | // +---------------------------------------------------------------------- | 
| 19 | 19 | |
| 20 | -declare (strict_types=1); | |
| 20 | +declare(strict_types=1); | |
| 21 | 21 | |
| 22 | 22 | namespace DtApp\ThinkLibrary\helper; | 
| 23 | 23 | |
| @@ -17,7 +17,7 @@ discard block | ||
| 17 | 17 | // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library | 
| 18 | 18 | // +---------------------------------------------------------------------- | 
| 19 | 19 | |
| 20 | -declare (strict_types=1); | |
| 20 | +declare(strict_types=1); | |
| 21 | 21 | |
| 22 | 22 | namespace DtApp\ThinkLibrary\helper; | 
| 23 | 23 | |
| @@ -44,11 +44,11 @@ discard block | ||
| 44 | 44 | $xml = "<xml>"; | 
| 45 | 45 |          foreach ($values as $key => $val) { | 
| 46 | 46 |              if (is_array($val)) { | 
| 47 | - $xml .= "<" . $key . ">" . $this->toXml($val) . "</" . $key . ">"; | |
| 48 | -            } else if (is_numeric($val)) { | |
| 49 | - $xml .= "<" . $key . ">" . $val . "</" . $key . ">"; | |
| 50 | -            } else { | |
| 51 | - $xml .= "<" . $key . "><![CDATA[" . $val . "]]></" . $key . ">"; | |
| 47 | + $xml .= "<".$key.">".$this->toXml($val)."</".$key.">"; | |
| 48 | +            }else if (is_numeric($val)) { | |
| 49 | + $xml .= "<".$key.">".$val."</".$key.">"; | |
| 50 | +            }else { | |
| 51 | + $xml .= "<".$key."><![CDATA[".$val."]]></".$key.">"; | |
| 52 | 52 | } | 
| 53 | 53 | } | 
| 54 | 54 | $xml .= "</xml>"; | 
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | // | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library | 
| 18 | 18 | // +---------------------------------------------------------------------- | 
| 19 | 19 | |
| 20 | -declare (strict_types=1); | |
| 20 | +declare(strict_types=1); | |
| 21 | 21 | |
| 22 | 22 | namespace DtApp\ThinkLibrary\facade; | 
| 23 | 23 | |
| @@ -105,7 +105,7 @@ | ||
| 105 | 105 | 'domain' => request()->domain(), | 
| 106 | 106 | 'url' => request()->url(), | 
| 107 | 107 |                          'node' => config('dtapp.exception.wechat.node', ''), | 
| 108 | - 'info' => "ServerIp:" . $ip . ";CdnIp:" . $_SERVER['REMOTE_ADDR'] . ";ClientIp:" . get_ip(), | |
| 108 | + 'info' => "ServerIp:".$ip.";CdnIp:".$_SERVER['REMOTE_ADDR'].";ClientIp:".get_ip(), | |
| 109 | 109 | 'ip' => $ipinfo['location_all'], | 
| 110 | 110 | 'error' => base64_encode($msg) | 
| 111 | 111 | ]) | 
| @@ -1,18 +1,18 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | -class Ks3ClientException extends RuntimeException{ | |
| 2 | +class Ks3ClientException extends RuntimeException { | |
| 3 | 3 | |
| 4 | 4 | } | 
| 5 | -class Ks3ServiceException extends Ks3ClientException{ | |
| 5 | +class Ks3ServiceException extends Ks3ClientException { | |
| 6 | 6 | private $requestId; | 
| 7 | 7 | private $errorCode; | 
| 8 | 8 | private $errorMessage; | 
| 9 | 9 | private $resource; | 
| 10 | 10 | private $statusCode; | 
| 11 | -	public function __set($property_name, $value){ | |
| 12 | - $this->$property_name=$value; | |
| 11 | +	public function __set($property_name, $value) { | |
| 12 | + $this->$property_name = $value; | |
| 13 | 13 | } | 
| 14 | -	public function __get($property_name){ | |
| 15 | - if(isset($this->$property_name)) | |
| 14 | +	public function __get($property_name) { | |
| 15 | + if (isset($this->$property_name)) | |
| 16 | 16 |  		{ | 
| 17 | 17 | return($this->$property_name); | 
| 18 | 18 | }else | 
| @@ -22,7 +22,7 @@ discard block | ||
| 22 | 22 | } | 
| 23 | 23 | public function __toString() | 
| 24 | 24 |    	{ | 
| 25 | - $message = get_class($this) . ': ' | |
| 25 | + $message = get_class($this).': ' | |
| 26 | 26 | ."(errorCode:".$this->errorCode.";" | 
| 27 | 27 | ."errorMessage:".$this->errorMessage.";" | 
| 28 | 28 | ."resource:".$this->resource.";" | 
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | if(isset($this->$property_name)) | 
| 16 | 16 |  		{ | 
| 17 | 17 | return($this->$property_name); | 
| 18 | - }else | |
| 18 | + } else | |
| 19 | 19 |  		{ | 
| 20 | 20 | return(NULL); | 
| 21 | 21 | } | 
| @@ -1,10 +1,10 @@ | ||
| 1 | 1 | <?php | 
| 2 | -class Headers{ | |
| 2 | +class Headers { | |
| 3 | 3 | static $Date = "Date"; | 
| 4 | 4 | static $Authorization = "Authorization"; | 
| 5 | 5 | static $ContentMd5 = "Content-MD5"; | 
| 6 | 6 | static $ContentType = "Content-Type"; | 
| 7 | - static $ContentLength="Content-Length"; | |
| 7 | + static $ContentLength = "Content-Length"; | |
| 8 | 8 | static $Acl = "x-kss-acl"; | 
| 9 | 9 | static $CopySource = "x-kss-copy-source"; | 
| 10 | 10 | static $ETag = "ETag"; | 
| @@ -1,43 +1,43 @@ | ||
| 1 | 1 | <?php | 
| 2 | 2 | require_once KS3_API_PATH.DIRECTORY_SEPARATOR."exceptions".DIRECTORY_SEPARATOR."Exceptions.php"; | 
| 3 | -class Logger{ | |
| 4 | -	function info($msg){ | |
| 5 | -		$this->log("INFO",$msg); | |
| 3 | +class Logger { | |
| 4 | +	function info($msg) { | |
| 5 | +		$this->log("INFO", $msg); | |
| 6 | 6 | } | 
| 7 | -	function error($msg){ | |
| 8 | -		$this->log("ERROR",$msg); | |
| 7 | +	function error($msg) { | |
| 8 | +		$this->log("ERROR", $msg); | |
| 9 | 9 | } | 
| 10 | -	function warn($msg){ | |
| 11 | -		$this->log("WARN",$msg); | |
| 10 | +	function warn($msg) { | |
| 11 | +		$this->log("WARN", $msg); | |
| 12 | 12 | } | 
| 13 | -	function debug($msg){ | |
| 14 | -		$this->log("DEBUG",$msg); | |
| 13 | +	function debug($msg) { | |
| 14 | +		$this->log("DEBUG", $msg); | |
| 15 | 15 | } | 
| 16 | -	private function log($level,$msg){ | |
| 16 | +	private function log($level, $msg) { | |
| 17 | 17 |  		$date = gmdate('D, d M Y H:i:s \G\M\T'); | 
| 18 | 18 | $log = $date." ".$level."\r\n".$msg."\r\n"; | 
| 19 | -		if(defined('KS3_API_LOG_PATH') ){ | |
| 19 | +		if (defined('KS3_API_LOG_PATH')) { | |
| 20 | 20 | $log_path = KS3_API_LOG_PATH; | 
| 21 | -			if(empty($log_path)){ | |
| 21 | +			if (empty($log_path)) { | |
| 22 | 22 | $log_path = KS3_API_PATH.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR; | 
| 23 | 23 | } | 
| 24 | -		}else{ | |
| 24 | +		}else { | |
| 25 | 25 | $log_path = KS3_API_PATH.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR; | 
| 26 | 26 | } | 
| 27 | 27 | |
| 28 | 28 | //检测日志目录是否存在 | 
| 29 | -		if(!file_exists($log_path)){ | |
| 29 | +		if (!file_exists($log_path)) { | |
| 30 | 30 | mkdir($log_path); | 
| 31 | 31 | } | 
| 32 | 32 | |
| 33 | 33 |  		$log_name = $log_path.'ks3_php_sdk_'.date('Y-m-d').'.log'; | 
| 34 | 34 | |
| 35 | -		if(KS3_API_DISPLAY_LOG){ | |
| 35 | +		if (KS3_API_DISPLAY_LOG) { | |
| 36 | 36 | echo $log; | 
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | -		if(KS3_API_LOG){ | |
| 40 | -			if(!error_log($log,3,$log_name)){ | |
| 39 | +		if (KS3_API_LOG) { | |
| 40 | +			if (!error_log($log, 3, $log_name)) { | |
| 41 | 41 |  				throw new Ks3ClientException("write to log file error"); | 
| 42 | 42 | } | 
| 43 | 43 | } | 
| @@ -21,7 +21,7 @@ | ||
| 21 | 21 |  			if(empty($log_path)){ | 
| 22 | 22 | $log_path = KS3_API_PATH.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR; | 
| 23 | 23 | } | 
| 24 | -		}else{ | |
| 24 | +		} else{ | |
| 25 | 25 | $log_path = KS3_API_PATH.DIRECTORY_SEPARATOR.'log'.DIRECTORY_SEPARATOR; | 
| 26 | 26 | } | 
| 27 | 27 | |