mirror of
https://github.com/friendica/friendica
synced 2025-04-30 09:44:22 +02:00
Some more deprecation fixups
This commit is contained in:
parent
00cd346255
commit
f68dd99518
5 changed files with 20 additions and 5 deletions
|
@ -35,7 +35,7 @@ final class ACLFormatter
|
|||
*
|
||||
* @return array The array based on the IDs (empty in case there is no list)
|
||||
*/
|
||||
public function expand(string $acl_string = null)
|
||||
public function expand(string $acl_string = null): array
|
||||
{
|
||||
// In case there is no ID list, return empty array (=> no ACL set)
|
||||
if (empty($acl_string)) {
|
||||
|
@ -55,7 +55,7 @@ final class ACLFormatter
|
|||
* @param string|null $acl_string
|
||||
* @return string
|
||||
*/
|
||||
public function sanitize(string $acl_string = null)
|
||||
public function sanitize(string $acl_string = null): string
|
||||
{
|
||||
if (empty($acl_string)) {
|
||||
return '';
|
||||
|
@ -107,10 +107,13 @@ final class ACLFormatter
|
|||
*
|
||||
* @return string
|
||||
*/
|
||||
function toString($permissions) {
|
||||
function toString($permissions): string
|
||||
{
|
||||
$return = '';
|
||||
if (is_array($permissions)) {
|
||||
$item = $permissions;
|
||||
} elseif (empty($permissions)) {
|
||||
return '';
|
||||
} else {
|
||||
$item = explode(',', $permissions);
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ class ReversedFileReader implements \Iterator
|
|||
*
|
||||
* @return string|null Depending on data being buffered
|
||||
*/
|
||||
private function _readline()
|
||||
private function _readline(): ?string
|
||||
{
|
||||
$buffer = & $this->buffer;
|
||||
while (true) {
|
||||
|
@ -112,6 +112,7 @@ class ReversedFileReader implements \Iterator
|
|||
* @see Iterator::next()
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function next()
|
||||
{
|
||||
++$this->key;
|
||||
|
@ -124,6 +125,7 @@ class ReversedFileReader implements \Iterator
|
|||
* @see Iterator::rewind()
|
||||
* @return void
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function rewind()
|
||||
{
|
||||
if ($this->filesize > 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue