LinkDB: explicit method visibility

Relates to https://github.com/shaarli/Shaarli/issues/95

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2016-10-20 21:24:39 +02:00
parent f21abf3292
commit 735ed4a94e
2 changed files with 7 additions and 7 deletions

View file

@ -87,7 +87,7 @@ class LinkDB implements Iterator, Countable, ArrayAccess
* @param string $redirector link redirector set in user settings. * @param string $redirector link redirector set in user settings.
* @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true). * @param boolean $redirectorEncode Enable urlencode on redirected urls (default: true).
*/ */
function __construct( public function __construct(
$datastore, $datastore,
$isLoggedIn, $isLoggedIn,
$hidePublicLinks, $hidePublicLinks,
@ -164,7 +164,7 @@ public function offsetGet($offset)
/** /**
* Iterator - Returns the current element * Iterator - Returns the current element
*/ */
function current() public function current()
{ {
return $this->links[$this->keys[$this->position]]; return $this->links[$this->keys[$this->position]];
} }
@ -172,7 +172,7 @@ function current()
/** /**
* Iterator - Returns the key of the current element * Iterator - Returns the key of the current element
*/ */
function key() public function key()
{ {
return $this->keys[$this->position]; return $this->keys[$this->position];
} }
@ -180,7 +180,7 @@ function key()
/** /**
* Iterator - Moves forward to next element * Iterator - Moves forward to next element
*/ */
function next() public function next()
{ {
++$this->position; ++$this->position;
} }
@ -190,7 +190,7 @@ function next()
* *
* Entries are sorted by date (latest first) * Entries are sorted by date (latest first)
*/ */
function rewind() public function rewind()
{ {
$this->keys = array_keys($this->links); $this->keys = array_keys($this->links);
rsort($this->keys); rsort($this->keys);
@ -200,7 +200,7 @@ function rewind()
/** /**
* Iterator - Checks if current position is valid * Iterator - Checks if current position is valid
*/ */
function valid() public function valid()
{ {
return isset($this->keys[$this->position]); return isset($this->keys[$this->position]);
} }

View file

@ -13,7 +13,7 @@ class ReferenceLinkDB
/** /**
* Populates the test DB with reference data * Populates the test DB with reference data
*/ */
function __construct() public function __construct()
{ {
$this->addLink( $this->addLink(
'Link title: @website', 'Link title: @website',