aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2016-10-20 21:24:39 +0200
committerVirtualTam <virtualtam@flibidi.net>2016-10-20 21:33:42 +0200
commit735ed4a94e1da5874195ac47c00612043a193edf (patch)
treecd581c5cb47c5561e0db60d03e113be63fb23688
parentf21abf329234ae4d5a1d56c5a9dd0bc11f80bac8 (diff)
downloadShaarli-735ed4a94e1da5874195ac47c00612043a193edf.tar.gz
Shaarli-735ed4a94e1da5874195ac47c00612043a193edf.tar.zst
Shaarli-735ed4a94e1da5874195ac47c00612043a193edf.zip
LinkDB: explicit method visibility
Relates to https://github.com/shaarli/Shaarli/issues/95 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
-rw-r--r--application/LinkDB.php12
-rw-r--r--tests/utils/ReferenceLinkDB.php2
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
87 * @param string $redirector link redirector set in user settings. 87 * @param string $redirector link redirector set in user settings.
88 * @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true). 88 * @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true).
89 */ 89 */
90 function __construct( 90 public function __construct(
91 $datastore, 91 $datastore,
92 $isLoggedIn, 92 $isLoggedIn,
93 $hidePublicLinks, 93 $hidePublicLinks,
@@ -164,7 +164,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess
164 /** 164 /**
165 * Iterator - Returns the current element 165 * Iterator - Returns the current element
166 */ 166 */
167 function current() 167 public function current()
168 { 168 {
169 return $this->links[$this->keys[$this->position]]; 169 return $this->links[$this->keys[$this->position]];
170 } 170 }
@@ -172,7 +172,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess
172 /** 172 /**
173 * Iterator - Returns the key of the current element 173 * Iterator - Returns the key of the current element
174 */ 174 */
175 function key() 175 public function key()
176 { 176 {
177 return $this->keys[$this->position]; 177 return $this->keys[$this->position];
178 } 178 }
@@ -180,7 +180,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess
180 /** 180 /**
181 * Iterator - Moves forward to next element 181 * Iterator - Moves forward to next element
182 */ 182 */
183 function next() 183 public function next()
184 { 184 {
185 ++$this->position; 185 ++$this->position;
186 } 186 }
@@ -190,7 +190,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess
190 * 190 *
191 * Entries are sorted by date (latest first) 191 * Entries are sorted by date (latest first)
192 */ 192 */
193 function rewind() 193 public function rewind()
194 { 194 {
195 $this->keys = array_keys($this->links); 195 $this->keys = array_keys($this->links);
196 rsort($this->keys); 196 rsort($this->keys);
@@ -200,7 +200,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess
200 /** 200 /**
201 * Iterator - Checks if current position is valid 201 * Iterator - Checks if current position is valid
202 */ 202 */
203 function valid() 203 public function valid()
204 { 204 {
205 return isset($this->keys[$this->position]); 205 return isset($this->keys[$this->position]);
206 } 206 }
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
13 /** 13 /**
14 * Populates the test DB with reference data 14 * Populates the test DB with reference data
15 */ 15 */
16 function __construct() 16 public function __construct()
17 { 17 {
18 $this->addLink( 18 $this->addLink(
19 'Link title: @website', 19 'Link title: @website',