]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
namespacing: \Shaarli\Http\Base64Url
authorVirtualTam <virtualtam@flibidi.net>
Sun, 2 Dec 2018 23:16:10 +0000 (00:16 +0100)
committerVirtualTam <virtualtam@flibidi.net>
Sat, 12 Jan 2019 21:47:48 +0000 (22:47 +0100)
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
application/api/ApiUtils.php
application/http/Base64Url.php [moved from application/Base64Url.php with 96% similarity]
composer.json
tests/api/ApiUtilsTest.php

index fc5ecaf1e75931d3a2006dae957be7129bb7df1e..e51b73e187014b9663fd22d4c46587783181eb39 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 namespace Shaarli\Api;
 
-use Shaarli\Base64Url;
+use Shaarli\Http\Base64Url;
 use Shaarli\Api\Exceptions\ApiAuthorizationException;
 
 /**
@@ -12,7 +12,7 @@ class ApiUtils
     /**
      * Validates a JWT token authenticity.
      *
-     * @param string $token JWT token extracted from the headers.
+     * @param string $token  JWT token extracted from the headers.
      * @param string $secret API secret set in the settings.
      *
      * @throws ApiAuthorizationException the token is not valid.
@@ -50,7 +50,7 @@ class ApiUtils
     /**
      * Format a Link for the REST API.
      *
-     * @param array $link Link data read from the datastore.
+     * @param array  $link     Link data read from the datastore.
      * @param string $indexUrl Shaarli's index URL (used for relative URL).
      *
      * @return array Link data formatted for the REST API.
similarity index 96%
rename from application/Base64Url.php
rename to application/http/Base64Url.php
index 54d0fcd52accef3639e94fde87d52b5b32678399..33fa7c1f8c8f3be693a4cbed58bf293be8277ae1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 
-namespace Shaarli;
+namespace Shaarli\Http;
 
 /**
  * URL-safe Base64 operations
index 7c9cbf3d431924957db625a396c37d32f7d16175..8a3d1636e3b1cd9581ad177f92f3227a2d475642 100644 (file)
@@ -38,6 +38,7 @@
             "Shaarli\\Config\\Exception\\": "application/config/exception",
             "Shaarli\\Exceptions\\": "application/exceptions",
             "Shaarli\\Feed\\": "application/feed",
+            "Shaarli\\Http\\": "application/http",
             "Shaarli\\Security\\": "application/security"
         }
     }
index df4e189a9f786b91718cde89b6152c90bac395c0..a1b623d897c46ade83125e5f6a332a77a43ab607 100644 (file)
@@ -2,7 +2,7 @@
 
 namespace Shaarli\Api;
 
-use Shaarli\Base64Url;
+use Shaarli\Http\Base64Url;
 
 /**
  * Class ApiUtilsTest