Skip to content

Commit 594f981

Browse files
authored
Merge pull request #6640 from WoltLab/63-method-parameter-typings2
Add missing typings to interface methods
2 parents 73c40b0 + 98321c0 commit 594f981

422 files changed

Lines changed: 946 additions & 1242 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

com.woltlab.wcf/templates/commentList.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<span class="badge label green comment__status--disabled">{lang}wcf.message.status.disabled{/lang}</span>
3838
{/if}
3939

40-
{if $commentManager->isContentAuthor($comment)}
40+
{if $commentManager->isContentAuthor($comment->getDecoratedObject())}
4141
<span class="badge label">{lang}wcf.comment.objectAuthor{/lang}</span>
4242
{/if}
4343

com.woltlab.wcf/templates/commentResponseList.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<span class="badge label green commentResponse__status--disabled">{lang}wcf.message.status.disabled{/lang}</span>
3434
{/if}
3535

36-
{if $commentManager->isContentAuthor($response)}
36+
{if $commentManager->isContentAuthor($response->getDecoratedObject())}
3737
<span class="badge label">{lang}wcf.comment.objectAuthor{/lang}</span>
3838
{/if}
3939

wcfsetup/install/files/lib/data/DatabaseObject.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ protected function handleData($data)
9696
/**
9797
* @inheritDoc
9898
*/
99-
public function __get($name)
99+
public function __get(string $name)
100100
{
101101
return $this->data[$name] ?? null;
102102
}
@@ -114,7 +114,7 @@ public function getObjectID()
114114
/**
115115
* @inheritDoc
116116
*/
117-
public function __isset($name)
117+
public function __isset(string $name)
118118
{
119119
return isset($this->data[$name]);
120120
}

wcfsetup/install/files/lib/data/DatabaseObjectDecorator.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ public function __construct(DatabaseObject $object)
4747
/**
4848
* @inheritDoc
4949
*/
50-
public function __get($name)
50+
public function __get(string $name)
5151
{
5252
return $this->object->__get($name);
5353
}
5454

5555
/**
5656
* @inheritDoc
5757
*/
58-
public function __isset($name)
58+
public function __isset(string $name)
5959
{
6060
return $this->object->__isset($name);
6161
}

wcfsetup/install/files/lib/data/DatabaseObjectList.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public function seek($offset): void
403403
/**
404404
* @inheritDoc
405405
*/
406-
public function seekTo($objectID)
406+
public function seekTo(int $objectID)
407407
{
408408
$this->index = \array_search($objectID, $this->indexToObject);
409409

@@ -415,7 +415,7 @@ public function seekTo($objectID)
415415
/**
416416
* @inheritDoc
417417
*/
418-
public function search($objectID)
418+
public function search(int $objectID)
419419
{
420420
try {
421421
$this->seekTo($objectID);

wcfsetup/install/files/lib/data/IDatabaseObjectProcessor.class.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,23 @@ public function __construct(DatabaseObject $object);
1616
/**
1717
* Delegates accesses to inaccessible object properties the processed object.
1818
*
19-
* @param string $name
2019
* @return mixed
2120
*/
22-
public function __get($name);
21+
public function __get(string $name);
2322

2423
/**
2524
* Delegates isset calls for inaccessible object properties to the processed
2625
* object.
2726
*
28-
* @param string $name
2927
* @return bool
3028
*/
31-
public function __isset($name);
29+
public function __isset(string $name);
3230

3331
/**
3432
* Delegates inaccessible method calls to the processed database object.
3533
*
36-
* @param string $name
3734
* @param mixed[] $arguments
3835
* @return mixed
3936
*/
40-
public function __call($name, $arguments);
37+
public function __call(string $name, array $arguments);
4138
}

wcfsetup/install/files/lib/data/IMessage.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ interface IMessage extends IUserContent
1414
/**
1515
* Returns a simplified message (only inline codes), truncated to 255 characters by default.
1616
*
17-
* @param int $maxLength
1817
* @return string
1918
*/
20-
public function getExcerpt($maxLength = 255);
19+
public function getExcerpt(int $maxLength = 255);
2120

2221
/**
2322
* Returns formatted message text.

wcfsetup/install/files/lib/data/IPermissionObject.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ public function checkPermissions(array $permissions);
2626
* Returns the permission value of the given permission for this object
2727
* and the active user.
2828
*
29-
* @param string $permission
3029
* @return mixed
3130
*/
32-
public function getPermission($permission);
31+
public function getPermission(string $permission);
3332
}

wcfsetup/install/files/lib/data/IStorableObject.class.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,17 @@ interface IStorableObject
1515
* Returns the value of a object data variable with the given name or `null` if no
1616
* such data variable exists.
1717
*
18-
* @param string $name
1918
* @return mixed
2019
*/
21-
public function __get($name);
20+
public function __get(string $name);
2221

2322
/**
2423
* Determines if the object data variable with the given name is set and
2524
* is not NULL.
2625
*
27-
* @param string $name
2826
* @return bool
2927
*/
30-
public function __isset($name);
28+
public function __isset(string $name);
3129

3230
/**
3331
* Returns the value of all object data variables.

wcfsetup/install/files/lib/data/IThumbnailFile.class.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,16 @@ interface IThumbnailFile extends IFile
1616
/**
1717
* Returns the link to the thumbnail file with the given size.
1818
*
19-
* @param string $size
2019
* @return string
2120
*/
22-
public function getThumbnailLink($size);
21+
public function getThumbnailLink(string $size);
2322

2423
/**
2524
* Returns the physical location of the thumbnail file with the given size.
2625
*
27-
* @param string $size
2826
* @return string
2927
*/
30-
public function getThumbnailLocation($size);
28+
public function getThumbnailLocation(string $size);
3129

3230
/**
3331
* Returns the available thumbnail sizes.

0 commit comments

Comments
 (0)