Skip to content

Commit eb2ad2e

Browse files
committed
Add missing typings to methods
1 parent 873a926 commit eb2ad2e

286 files changed

Lines changed: 623 additions & 618 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/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/application/Application.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function handleData($data)
7272
/**
7373
* @inheritDoc
7474
*/
75-
public function __get($name)
75+
public function __get(string $name)
7676
{
7777
if (ENABLE_ENTERPRISE_MODE && \defined('ENTERPRISE_MODE_DOMAIN_OVERRIDE') && \PHP_SAPI !== 'cli') {
7878
if (ENTERPRISE_MODE_DOMAIN_OVERRIDE === $_SERVER['HTTP_HOST']) {

wcfsetup/install/files/lib/data/article/FeedArticle.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public function getMessage()
6060
/**
6161
* @inheritDoc
6262
*/
63-
public function getExcerpt($maxLength = 255)
63+
public function getExcerpt(int $maxLength = 255)
6464
{
6565
return StringUtil::truncateHTML($this->getDecoratedObject()->getFormattedTeaser(), $maxLength);
6666
}

wcfsetup/install/files/lib/data/article/LikeableArticle.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getObjectID()
6262
/**
6363
* @inheritDoc
6464
*/
65-
public function updateLikeCounter($cumulativeLikes)
65+
public function updateLikeCounter(int $cumulativeLikes)
6666
{
6767
// update cumulative likes
6868
$editor = new ArticleEditor($this->getDecoratedObject());

wcfsetup/install/files/lib/data/article/content/SearchResultArticleContent.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function getTime()
4444
/**
4545
* @inheritDoc
4646
*/
47-
public function getLink($query = ''): string
47+
public function getLink(string $query = ''): string
4848
{
4949
$parameters = [
5050
'object' => $this->getDecoratedObject(),

wcfsetup/install/files/lib/data/attachment/Attachment.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function getTinyThumbnailLocation()
187187
* @inheritDoc
188188
* @deprecated 6.1 This will no longer be required once the attachments have been migrated.
189189
*/
190-
public function getThumbnailLocation($size = '')
190+
public function getThumbnailLocation(string $size = '')
191191
{
192192
if ($size == 'tiny') {
193193
$location = self::getStorage() . \substr(
@@ -255,7 +255,7 @@ final protected function getLocationHelper($location)
255255
/**
256256
* @inheritDoc
257257
*/
258-
public function getThumbnailLink($size = '')
258+
public function getThumbnailLink(string $size = '')
259259
{
260260
$file = $this->getFile();
261261
if ($file === null) {
@@ -394,7 +394,7 @@ public function setFile(File $file): void
394394
}
395395

396396
#[\Override]
397-
public function __get($name)
397+
public function __get(string $name)
398398
{
399399
if ($name === 'downloads' || $name === 'lastDownloadTime') {
400400
// Static files are no longer served through PHP but the web server

wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(string $objectType)
3939
'com.woltlab.wcf.attachment.objectType',
4040
$objectType
4141
);
42-
if ($objectType === null) {
42+
if ($objectTypeObj === null) {
4343
throw new \BadMethodCallException("unknown attachment object type '{$objectType}'");
4444
}
4545

0 commit comments

Comments
 (0)