瀏覽代碼

chore: apply StyleCI recommendation

El RIDO 1 周之前
父節點
當前提交
181e20a77d
共有 5 個文件被更改,包括 7 次插入7 次删除
  1. 2 2
      cfg/conf.sample.php
  2. 1 1
      lib/Configuration.php
  3. 1 1
      lib/Controller.php
  4. 2 2
      lib/Proxy/ChhotoProxy.php
  5. 1 1
      lib/Request.php

+ 2 - 2
cfg/conf.sample.php

@@ -272,11 +272,11 @@ dir = PATH "data"
 ;   "urlshortener" needs to point to the base URL of your PrivateBin
 ;   instance with "?shortenviachhoto&link=" appended. For example:
 ;   urlshortener = "${basepath}?shortenviachhoto&link="
-;    This URL will in turn call Chhoto-url on the server side, using the URL from
+;    This URL will in turn call Chhoto on the server side, using the URL from
 ;   "apiurl" and the API Key from the "apikey" parameters below.
 ; apiurl = "https://chhoto-url.example.com/api/new"
 ; apikey = "your_api_key"
-    
+
 ;[shlink]
 ; - Shlink requires you to make a post call with a generated API key.
 ;   use this section to setup the API key and URL. In order to use this section,

+ 1 - 1
lib/Configuration.php

@@ -112,7 +112,7 @@ class Configuration
             'apikey'    => '',
             'apiurl'    => '',
         ],
-        'chhoto' => [    
+        'chhoto' => [
             'apikey'    => '',
             'apiurl'    => '',
         ],

+ 1 - 1
lib/Controller.php

@@ -15,8 +15,8 @@ use Exception;
 use PrivateBin\Exception\TranslatedException;
 use PrivateBin\Persistence\ServerSalt;
 use PrivateBin\Persistence\TrafficLimiter;
-use PrivateBin\Proxy\ChhotoProxy;
 use PrivateBin\Proxy\AbstractProxy;
+use PrivateBin\Proxy\ChhotoProxy;
 use PrivateBin\Proxy\ShlinkProxy;
 use PrivateBin\Proxy\YourlsProxy;
 

+ 2 - 2
lib/Proxy/ChhotoProxy.php

@@ -18,7 +18,7 @@ use PrivateBin\Json;
 /**
  * ChhotoProxy
  *
- * Forwards a URL for shortening to Chhoto URL (lix.sk) and stores the result.
+ * Forwards a URL for shortening to Chhoto URL and stores the result.
  */
 class ChhotoProxy extends AbstractProxy
 {
@@ -83,7 +83,7 @@ class ChhotoProxy extends AbstractProxy
         // Fallback for older versions that return only the slug
         if (!empty($data['shortlink'])) {
             $apiUrl = $this->_getProxyUrl(new Configuration()); // not ideal, but works
-            return $apiUrl' . ltrim($data['shortlink'], '/');
+            return $apiUrl . ltrim($data['shortlink'], '/');
         }
 
         return null;

+ 1 - 1
lib/Request.php

@@ -159,7 +159,7 @@ class Request
             if (str_contains($this->getRequestUri(), '/shortenviashlink') || array_key_exists('shortenviashlink', $this->_params)) {
                 $this->_operation = 'shlinkproxy';
             }
-           if (str_contains($this->getRequestUri(), '/shortenviachhoto') || array_key_exists('shortenviachhoto', $this->_params)) {
+            if (str_contains($this->getRequestUri(), '/shortenviachhoto') || array_key_exists('shortenviachhoto', $this->_params)) {
                 $this->_operation = 'chhotoproxy';
             }
         }