Skip to content

Commit 1b40fc1

Browse files
author
MateuszKolankowski
committed
Update method signatures and annotations
1 parent fe91ae5 commit 1b40fc1

5 files changed

Lines changed: 11 additions & 40 deletions

File tree

src/bundle/Core/Features/Context/FieldTypeContext.php

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,11 @@ public function getFieldContentState()
200200
return $this->fieldConstructionObject['objectState'];
201201
}
202202

203-
/**
204-
* Creates and publishes the content with a given field and
205-
* based on the internal ContentType.
206-
*
207-
* @param string|null $field
208-
* @param mixed $value
209-
*/
210-
private function createAndPublishContent($field, $value)
203+
/**
204+
* Creates and publishes the content with a given field and
205+
* based on the internal ContentType.
206+
*/
207+
private function createAndPublishContent(?string $field, mixed $value): void
211208
{
212209
$languageCode = self::DEFAULT_LANGUAGE;
213210

src/bundle/IO/Resources/config/io.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ services:
4545
arguments:
4646
$imageFileList: '@Ibexa\Bundle\Core\Imagine\VariationPurger\LegacyStorageImageFileList'
4747
$variationPathGenerator: '@ibexa.image_alias.variation_path_generator'
48-
$filterConfiguration: "@liip_imagine.filter.configuration"
49-
$imagesDir: "%ibexa.site_access.config.default.image.published_images_dir%"
48+
$filterConfiguration: '@liip_imagine.filter.configuration'
49+
$imagesDir: '%ibexa.site_access.config.default.image.published_images_dir%'
5050
tags:
5151
- { name: "ibexa.io.migration.file_lister", identifier: "image_file" }
5252
lazy: true

src/lib/MVC/Symfony/Security/HttpUtils.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@
1313

1414
class HttpUtils extends BaseHttpUtils implements SiteAccessAware
1515
{
16-
/** @var \Ibexa\Core\MVC\Symfony\SiteAccess */
17-
private $siteAccess;
16+
private ?SiteAccess $siteAccess;
1817

19-
/**
20-
* @param \Ibexa\Core\MVC\Symfony\SiteAccess|null $siteAccess
21-
*/
2218
public function setSiteAccess(?SiteAccess $siteAccess = null)
2319
{
2420
$this->siteAccess = $siteAccess;
@@ -27,7 +23,7 @@ public function setSiteAccess(?SiteAccess $siteAccess = null)
2723
private function analyzeLink($path)
2824
{
2925
if (
30-
$this->siteAccess === null
26+
!isset($this->siteAccess)
3127
|| $path[0] !== '/'
3228
|| !($this->siteAccess->matcher instanceof SiteAccess\URILexer)
3329
) {

src/lib/Repository/ContentService.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,22 +1070,6 @@ public function deleteContent(ContentInfo $contentInfo): iterable
10701070
return $affectedLocations;
10711071
}
10721072

1073-
/**
1074-
* Creates a draft from a published or archived version.
1075-
*
1076-
* If no version is given, the current published version is used.
1077-
*
1078-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo $contentInfo
1079-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\VersionInfo|null $versionInfo
1080-
* @param \Ibexa\Contracts\Core\Repository\Values\User\User|null $creator if set given user is used to create the draft - otherwise the current-user is used
1081-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\Language|null $language if not set the draft is created with the initialLanguage code of the source version or if not present with the main language.
1082-
*
1083-
* @return \Ibexa\Contracts\Core\Repository\Values\Content\Content - the newly created content draft
1084-
*
1085-
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\ForbiddenException
1086-
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException if the current-user is not allowed to create the draft
1087-
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\UnauthorizedException if the current-user is not allowed to create the draft
1088-
*/
10891073
public function createContentDraft(
10901074
ContentInfo $contentInfo,
10911075
?APIVersionInfo $versionInfo = null,

tests/integration/Core/Repository/URLAliasServiceTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,6 @@ public function testCreateGlobalUrlAlias()
339339
}
340340

341341
/**
342-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias $createdUrlAlias
343-
*
344342
* @depends testCreateGlobalUrlAlias
345343
*/
346344
public function testCreateGlobalUrlAliasPropertyValues(URLAlias $createdUrlAlias)
@@ -391,8 +389,6 @@ public function testCreateGlobalUrlAliasWithForward()
391389
}
392390

393391
/**
394-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias $createdUrlAlias
395-
*
396392
* @depends testCreateGlobalUrlAliasWithForward
397393
*/
398394
public function testCreateGlobalUrlAliasWithForwardPropertyValues(URLAlias $createdUrlAlias)
@@ -444,8 +440,6 @@ public function testCreateGlobalUrlAliasWithAlwaysAvailable()
444440
}
445441

446442
/**
447-
* @param \Ibexa\Contracts\Core\Repository\Values\Content\URLAlias $createdUrlAlias
448-
*
449443
* @depends testCreateGlobalUrlAliasWithAlwaysAvailable
450444
*/
451445
public function testCreateGlobalUrlAliasWithAlwaysAvailablePropertyValues(URLAlias $createdUrlAlias)
@@ -538,7 +532,7 @@ public function testCreateGlobalUrlAliasForLocationVariation()
538532
}
539533

540534
/**
541-
* @param array<mixed> $testData
535+
* @param array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} $testData
542536
*
543537
* @depends testCreateGlobalUrlAliasForLocation
544538
*/
@@ -564,7 +558,7 @@ public function testCreateGlobalUrlAliasForLocationPropertyValues($testData)
564558
}
565559

566560
/**
567-
* @param array<mixed> $testData
561+
* @param array{\Ibexa\Contracts\Core\Repository\Values\Content\URLAlias, int} $testData
568562
*
569563
* @depends testCreateGlobalUrlAliasForLocationVariation
570564
*/

0 commit comments

Comments
 (0)