@@ -28,24 +28,18 @@ class CalendarHome implements DAV\IExtendedCollection, DAVACL\IACL
2828
2929 /**
3030 * CalDAV backend.
31- *
32- * @var Backend\BackendInterface
3331 */
34- protected $ caldavBackend ;
32+ protected Backend \ BackendInterface $ caldavBackend ;
3533
3634 /**
3735 * Principal information.
38- *
39- * @var array
4036 */
41- protected $ principalInfo ;
37+ protected array $ principalInfo ;
4238
4339 /**
4440 * Constructor.
45- *
46- * @param array $principalInfo
4741 */
48- public function __construct (Backend \BackendInterface $ caldavBackend , $ principalInfo )
42+ public function __construct (Backend \BackendInterface $ caldavBackend , array $ principalInfo )
4943 {
5044 $ this ->caldavBackend = $ caldavBackend ;
5145 $ this ->principalInfo = $ principalInfo ;
@@ -65,10 +59,8 @@ public function getName()
6559
6660 /**
6761 * Updates the name of this object.
68- *
69- * @param string $name
7062 */
71- public function setName ($ name )
63+ public function setName (string $ name )
7264 {
7365 throw new DAV \Exception \Forbidden ();
7466 }
@@ -96,10 +88,9 @@ public function getLastModified()
9688 *
9789 * This is currently not allowed
9890 *
99- * @param string $name
10091 * @param resource $data
10192 */
102- public function createFile ($ name , $ data = null )
93+ public function createFile (string $ name , $ data = null )
10394 {
10495 throw new DAV \Exception \MethodNotAllowed ('Creating new files in this collection is not supported ' );
10596 }
@@ -108,22 +99,18 @@ public function createFile($name, $data = null)
10899 * Creates a new directory under this object.
109100 *
110101 * This is currently not allowed.
111- *
112- * @param string $filename
113102 */
114- public function createDirectory ($ filename )
103+ public function createDirectory (string $ filename )
115104 {
116105 throw new DAV \Exception \MethodNotAllowed ('Creating new collections in this collection is not supported ' );
117106 }
118107
119108 /**
120109 * Returns a single calendar, by name.
121110 *
122- * @param string $name
123- *
124111 * @return Calendar
125112 */
126- public function getChild ($ name )
113+ public function getChild (string $ name )
127114 {
128115 // Special nodes
129116 if ('inbox ' === $ name && $ this ->caldavBackend instanceof Backend \SchedulingSupport) {
@@ -161,11 +148,9 @@ public function getChild($name)
161148 /**
162149 * Checks if a calendar exists.
163150 *
164- * @param string $name
165- *
166151 * @return bool
167152 */
168- public function childExists ($ name )
153+ public function childExists (string $ name )
169154 {
170155 try {
171156 return (bool ) $ this ->getChild ($ name );
@@ -214,11 +199,9 @@ public function getChildren()
214199 /**
215200 * Creates a new calendar or subscription.
216201 *
217- * @param string $name
218- *
219202 * @throws DAV\Exception\InvalidResourceType
220203 */
221- public function createExtendedCollection ($ name , MkCol $ mkCol )
204+ public function createExtendedCollection (string $ name , MkCol $ mkCol )
222205 {
223206 $ isCalendar = false ;
224207 $ isSubscription = false ;
@@ -274,7 +257,7 @@ public function getOwner()
274257 * * 'protected' (optional), indicating that this ACE is not allowed to
275258 * be updated.
276259 *
277- * @return array
260+ * @return list< array{principal: string, privilege: string, protected?: bool}>
278261 */
279262 public function getACL ()
280263 {
0 commit comments