]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - plugins/wallabag/WallabagInstance.php
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / plugins / wallabag / WallabagInstance.php
index 72cc2e5efb56bc474233aaa95d6d94c14b10d7a3..88f84ae3a10b5b39140dac1ea7bb7a78ec3b9dd9 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+namespace Shaarli\Plugin\Wallabag;
+
 /**
  * Class WallabagInstance.
  */
@@ -10,20 +12,20 @@ class WallabagInstance
      *          - key: version ID, must match plugin settings.
      *          - value: version name.
      */
-    private static $wallabagVersions = array(
+    private static $wallabagVersions = [
         1 => '1.x',
         2 => '2.x',
-    );
+    ];
 
     /**
      * @var array Static reference to WB endpoint according to the API version.
      *          - key: version name.
      *          - value: endpoint.
      */
-    private static $wallabagEndpoints = array(
+    private static $wallabagEndpoints = [
         '1.x' => '?plainurl=',
         '2.x' => 'bookmarklet?url=',
-    );
+    ];
 
     /**
      * @var string Wallabag user instance URL.
@@ -35,7 +37,7 @@ class WallabagInstance
      */
     private $apiVersion;
 
-    function __construct($instance, $version)
+    public function __construct($instance, $version)
     {
         if ($this->isVersionAllowed($version)) {
             $this->apiVersion = self::$wallabagVersions[$version];