Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_accesscontrol.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2022-09-13 13:10:45 +0300
committerArthur Schiwon <blizzz@arthur-schiwon.de>2022-09-13 13:11:50 +0300
commitbc87deb5350dc109c0f13ee8524127362f6f4953 (patch)
tree1b262ce1b3e0f41ba742810d5a521dd50891b0c1
parente49d897f15c83c704c8d39dd1fbc7c5aa79e50ef (diff)
add property types, fix deprecations
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--lib/CacheWrapper.php9
-rw-r--r--lib/Listener/FlowRegisterOperationListener.php8
-rw-r--r--lib/Operation.php22
3 files changed, 10 insertions, 29 deletions
diff --git a/lib/CacheWrapper.php b/lib/CacheWrapper.php
index 31a5dd2..b86373f 100644
--- a/lib/CacheWrapper.php
+++ b/lib/CacheWrapper.php
@@ -28,12 +28,9 @@ use OCP\Files\ForbiddenException;
use OCP\Files\Storage\IStorage;
class CacheWrapper extends Wrapper {
- /** @var Operation */
- protected $operation;
- /** @var StorageWrapper */
- protected $storage;
- /** @var int */
- protected $mask;
+ protected Operation $operation;
+ protected IStorage $storage;
+ protected int $mask;
/**
* @param ICache $cache
diff --git a/lib/Listener/FlowRegisterOperationListener.php b/lib/Listener/FlowRegisterOperationListener.php
index bf0d6c3..eb40d7e 100644
--- a/lib/Listener/FlowRegisterOperationListener.php
+++ b/lib/Listener/FlowRegisterOperationListener.php
@@ -26,18 +26,16 @@ declare(strict_types=1);
namespace OCA\FilesAccessControl\Listener;
use OCA\FilesAccessControl\Operation;
-use OCP\AppFramework\IAppContainer;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\Util;
use OCP\WorkflowEngine\Events\RegisterOperationsEvent;
+use Psr\Container\ContainerInterface;
class FlowRegisterOperationListener implements IEventListener {
+ private ContainerInterface $c;
- /** @var IAppContainer */
- private $c;
-
- public function __construct(IAppContainer $c) {
+ public function __construct(ContainerInterface $c) {
$this->c = $c;
}
diff --git a/lib/Operation.php b/lib/Operation.php
index 2302d4b..28f555e 100644
--- a/lib/Operation.php
+++ b/lib/Operation.php
@@ -36,22 +36,11 @@ use ReflectionClass;
use UnexpectedValueException;
class Operation implements IComplexOperation, ISpecificOperation {
- /** @var IManager */
- protected $manager;
+ protected IManager $manager;
+ protected IL10N $l;
+ protected IURLGenerator $urlGenerator;
+ protected int $nestingLevel = 0;
- /** @var IL10N */
- protected $l;
-
- /** @var IURLGenerator */
- protected $urlGenerator;
-
- /** @var int */
- protected $nestingLevel = 0;
-
- /**
- * @param IManager $manager
- * @param IL10N $l
- */
public function __construct(IManager $manager, IL10N $l, IURLGenerator $urlGenerator) {
$this->manager = $manager;
$this->l = $l;
@@ -59,9 +48,6 @@ class Operation implements IComplexOperation, ISpecificOperation {
}
/**
- * @param IStorage $storage
- * @param string $path
- * @param bool $isDir
* @throws ForbiddenException
*/
public function checkFileAccess(IStorage $storage, string $path, bool $isDir = false): void {