Some more deprecation fixups

This commit is contained in:
Philipp 2023-07-05 22:20:52 +02:00
parent 00cd346255
commit f68dd99518
No known key found for this signature in database
GPG Key ID: 24A7501396EB5432
5 changed files with 20 additions and 5 deletions

View File

@ -29,6 +29,7 @@ class Notifications extends BaseCollection
/** /**
* @return Notification * @return Notification
*/ */
#[\ReturnTypeWillChange]
public function current() public function current()
{ {
return parent::current(); return parent::current();

View File

@ -35,7 +35,7 @@ final class ACLFormatter
* *
* @return array The array based on the IDs (empty in case there is no list) * @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) // In case there is no ID list, return empty array (=> no ACL set)
if (empty($acl_string)) { if (empty($acl_string)) {
@ -55,7 +55,7 @@ final class ACLFormatter
* @param string|null $acl_string * @param string|null $acl_string
* @return string * @return string
*/ */
public function sanitize(string $acl_string = null) public function sanitize(string $acl_string = null): string
{ {
if (empty($acl_string)) { if (empty($acl_string)) {
return ''; return '';
@ -107,10 +107,13 @@ final class ACLFormatter
* *
* @return string * @return string
*/ */
function toString($permissions) { function toString($permissions): string
{
$return = ''; $return = '';
if (is_array($permissions)) { if (is_array($permissions)) {
$item = $permissions; $item = $permissions;
} elseif (empty($permissions)) {
return '';
} else { } else {
$item = explode(',', $permissions); $item = explode(',', $permissions);
} }

View File

@ -89,7 +89,7 @@ class ReversedFileReader implements \Iterator
* *
* @return string|null Depending on data being buffered * @return string|null Depending on data being buffered
*/ */
private function _readline() private function _readline(): ?string
{ {
$buffer = & $this->buffer; $buffer = & $this->buffer;
while (true) { while (true) {
@ -112,6 +112,7 @@ class ReversedFileReader implements \Iterator
* @see Iterator::next() * @see Iterator::next()
* @return void * @return void
*/ */
#[\ReturnTypeWillChange]
public function next() public function next()
{ {
++$this->key; ++$this->key;
@ -124,6 +125,7 @@ class ReversedFileReader implements \Iterator
* @see Iterator::rewind() * @see Iterator::rewind()
* @return void * @return void
*/ */
#[\ReturnTypeWillChange]
public function rewind() public function rewind()
{ {
if ($this->filesize > 0) { if ($this->filesize > 0) {

View File

@ -37,7 +37,7 @@ class Intercept extends php_user_filter
public static $cache = ''; public static $cache = '';
/** @noinspection PhpMissingParentCallCommonInspection */ /** @noinspection PhpMissingParentCallCommonInspection */
public function filter($in, $out, &$consumed, $closing) public function filter($in, $out, &$consumed, $closing): int
{ {
while ($bucket = stream_bucket_make_writeable($in)) { while ($bucket = stream_bucket_make_writeable($in)) {
self::$cache .= $bucket->data; self::$cache .= $bucket->data;

View File

@ -30,6 +30,15 @@ class DatabaseTest extends FixtureTest
{ {
use CreateDatabaseTrait; use CreateDatabaseTrait;
/**
* @var Cache
*/
protected $configCache;
/**
* @var ConfigFileManager
*/
protected $configFileManager;
protected function setUp(): void protected function setUp(): void
{ {
$this->setUpVfsDir(); $this->setUpVfsDir();