From 735ed4a94e1da5874195ac47c00612043a193edf Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Thu, 20 Oct 2016 21:24:39 +0200 Subject: [PATCH] LinkDB: explicit method visibility Relates to https://github.com/shaarli/Shaarli/issues/95 Signed-off-by: VirtualTam --- application/LinkDB.php | 12 ++++++------ tests/utils/ReferenceLinkDB.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/application/LinkDB.php b/application/LinkDB.php index f5f209f6..c8b162b6 100644 --- a/application/LinkDB.php +++ b/application/LinkDB.php @@ -87,7 +87,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess * @param string $redirector link redirector set in user settings. * @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true). */ - function __construct( + public function __construct( $datastore, $isLoggedIn, $hidePublicLinks, @@ -164,7 +164,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Returns the current element */ - function current() + public function current() { return $this->links[$this->keys[$this->position]]; } @@ -172,7 +172,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Returns the key of the current element */ - function key() + public function key() { return $this->keys[$this->position]; } @@ -180,7 +180,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Moves forward to next element */ - function next() + public function next() { ++$this->position; } @@ -190,7 +190,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess * * Entries are sorted by date (latest first) */ - function rewind() + public function rewind() { $this->keys = array_keys($this->links); rsort($this->keys); @@ -200,7 +200,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess /** * Iterator - Checks if current position is valid */ - function valid() + public function valid() { return isset($this->keys[$this->position]); } diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php index 937961c8..abca4656 100644 --- a/tests/utils/ReferenceLinkDB.php +++ b/tests/utils/ReferenceLinkDB.php @@ -13,7 +13,7 @@ class ReferenceLinkDB /** * Populates the test DB with reference data */ - function __construct() + public function __construct() { $this->addLink( 'Link title: @website', -- 2.41.0