Fix functions taking optional parameters before required ones
PHP 8 shows deprecation warnings about this, see #25806 Removes the "default" values, as they actually are required parameters anyway. Signed-off-by: Richard de Boer <git@tubul.net>
This commit is contained in:
parent
697b22a594
commit
f23d057ad9
|
@ -217,7 +217,7 @@ class Helper {
|
||||||
* @param ITagManager $tagManager
|
* @param ITagManager $tagManager
|
||||||
* @return array file list populated with tags
|
* @return array file list populated with tags
|
||||||
*/
|
*/
|
||||||
public static function populateTags(array $fileList, $fileIdentifier = 'fileid', ITagManager $tagManager) {
|
public static function populateTags(array $fileList, $fileIdentifier, ITagManager $tagManager) {
|
||||||
$ids = [];
|
$ids = [];
|
||||||
foreach ($fileList as $fileData) {
|
foreach ($fileList as $fileData) {
|
||||||
$ids[] = $fileData[$fileIdentifier];
|
$ids[] = $fileData[$fileIdentifier];
|
||||||
|
|
|
@ -156,8 +156,8 @@ class PreviewController extends Controller {
|
||||||
Node $node,
|
Node $node,
|
||||||
int $x,
|
int $x,
|
||||||
int $y,
|
int $y,
|
||||||
bool $a = false,
|
bool $a,
|
||||||
bool $forceIcon = true,
|
bool $forceIcon,
|
||||||
string $mode) : Http\Response {
|
string $mode) : Http\Response {
|
||||||
if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) {
|
if (!($node instanceof File) || (!$forceIcon && !$this->preview->isAvailable($node))) {
|
||||||
return new DataResponse([], Http::STATUS_NOT_FOUND);
|
return new DataResponse([], Http::STATUS_NOT_FOUND);
|
||||||
|
|
|
@ -31,7 +31,7 @@ class CachedMountFileInfo extends CachedMountInfo implements ICachedMountFileInf
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $internalPath;
|
private $internalPath;
|
||||||
|
|
||||||
public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId = null, $rootInternalPath = '', $internalPath) {
|
public function __construct(IUser $user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath, $internalPath) {
|
||||||
parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath);
|
parent::__construct($user, $storageId, $rootId, $mountPoint, $mountId, $rootInternalPath);
|
||||||
$this->internalPath = $internalPath;
|
$this->internalPath = $internalPath;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue