From c0a50f3663e207d5df007e0fa321219c1b32d6ea Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 6 Jan 2016 20:40:17 +0100 Subject: [PATCH] Git *wants* to rewrite this file in the exact same way... Probably a line ending issue... --- plugins/wallabag/WallabagInstance.php | 142 +++++++++++++------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/plugins/wallabag/WallabagInstance.php b/plugins/wallabag/WallabagInstance.php index 87352e6..72cc2e5 100644 --- a/plugins/wallabag/WallabagInstance.php +++ b/plugins/wallabag/WallabagInstance.php @@ -1,71 +1,71 @@ - '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( - '1.x' => '?plainurl=', - '2.x' => 'bookmarklet?url=', - ); - - /** - * @var string Wallabag user instance URL. - */ - private $instanceUrl; - - /** - * @var string Wallabag user instance API version. - */ - private $apiVersion; - - function __construct($instance, $version) - { - if ($this->isVersionAllowed($version)) { - $this->apiVersion = self::$wallabagVersions[$version]; - } else { - // Default API version: 1.x. - $this->apiVersion = self::$wallabagVersions[1]; - } - - $this->instanceUrl = add_trailing_slash($instance); - } - - /** - * Build the Wallabag URL to reach from instance URL and API version endpoint. - * - * @return string wallabag url. - */ - public function getWallabagUrl() - { - return $this->instanceUrl . self::$wallabagEndpoints[$this->apiVersion]; - } - - /** - * Checks version configuration. - * - * @param mixed $version given version ID. - * - * @return bool true if it's valid, false otherwise. - */ - private function isVersionAllowed($version) - { - return isset(self::$wallabagVersions[$version]); - } -} + '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( + '1.x' => '?plainurl=', + '2.x' => 'bookmarklet?url=', + ); + + /** + * @var string Wallabag user instance URL. + */ + private $instanceUrl; + + /** + * @var string Wallabag user instance API version. + */ + private $apiVersion; + + function __construct($instance, $version) + { + if ($this->isVersionAllowed($version)) { + $this->apiVersion = self::$wallabagVersions[$version]; + } else { + // Default API version: 1.x. + $this->apiVersion = self::$wallabagVersions[1]; + } + + $this->instanceUrl = add_trailing_slash($instance); + } + + /** + * Build the Wallabag URL to reach from instance URL and API version endpoint. + * + * @return string wallabag url. + */ + public function getWallabagUrl() + { + return $this->instanceUrl . self::$wallabagEndpoints[$this->apiVersion]; + } + + /** + * Checks version configuration. + * + * @param mixed $version given version ID. + * + * @return bool true if it's valid, false otherwise. + */ + private function isVersionAllowed($version) + { + return isset(self::$wallabagVersions[$version]); + } +}