diff options
author | provokateurin <kate@provokateurin.de> | 2024-10-18 12:04:22 +0200 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-10-21 12:37:59 +0200 |
commit | 381077028adf388a7081cf42026570c6be47b198 (patch) | |
tree | c0f8e9b6caea80d6b55d6fdcc9188ba57197fa0f /apps/dav/lib/CalDAV/Publishing | |
parent | 4d8d11d2f79da348644e0902e78a2f000498cd52 (diff) | |
download | nextcloud-server-381077028adf388a7081cf42026570c6be47b198.tar.gz nextcloud-server-381077028adf388a7081cf42026570c6be47b198.zip |
refactor(apps): Use constructor property promotion when possible
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/dav/lib/CalDAV/Publishing')
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/PublishPlugin.php | 27 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php | 17 |
2 files changed, 14 insertions, 30 deletions
diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 6f8746283d1..1916187af2b 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -29,28 +29,21 @@ class PublishPlugin extends ServerPlugin { protected $server; /** - * Config instance to get instance secret. - * - * @var IConfig - */ - protected $config; - - /** - * URL Generator for absolute URLs. - * - * @var IURLGenerator - */ - protected $urlGenerator; - - /** * PublishPlugin constructor. * * @param IConfig $config * @param IURLGenerator $urlGenerator */ - public function __construct(IConfig $config, IURLGenerator $urlGenerator) { - $this->config = $config; - $this->urlGenerator = $urlGenerator; + public function __construct( + /** + * Config instance to get instance secret. + */ + protected IConfig $config, + /** + * URL Generator for absolute URLs. + */ + protected IURLGenerator $urlGenerator, + ) { } /** diff --git a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php index d3543ce5bae..2fd55a12643 100644 --- a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php +++ b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php @@ -11,22 +11,13 @@ use Sabre\Xml\XmlSerializable; class Publisher implements XmlSerializable { /** - * @var string $publishUrl - */ - protected $publishUrl; - - /** - * @var boolean $isPublished - */ - protected $isPublished; - - /** * @param string $publishUrl * @param boolean $isPublished */ - public function __construct($publishUrl, $isPublished) { - $this->publishUrl = $publishUrl; - $this->isPublished = $isPublished; + public function __construct( + protected $publishUrl, + protected $isPublished, + ) { } /** |