@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | * Inserts a new content object. |
| 35 | 35 | * |
| 36 | 36 | * @param \eZ\Publish\SPI\Persistence\Content\CreateStruct $struct |
| 37 | - * @param mixed $currentVersionNo |
|
| 37 | + * @param integer $currentVersionNo |
|
| 38 | 38 | * |
| 39 | 39 | * @return int ID |
| 40 | 40 | */ |
@@ -331,8 +331,6 @@ discard block |
||
| 331 | 331 | * Loads data of related to/from $contentId. |
| 332 | 332 | * |
| 333 | 333 | * @param int $contentId |
| 334 | - * @param bool $reverse Reverse relation, default false |
|
| 335 | - * @param int $contentVersionNo |
|
| 336 | 334 | * @param int $relationType |
| 337 | 335 | * |
| 338 | 336 | * @return mixed[][] Content data, array structured like {@see \eZ\Publish\Core\Persistence\Legacy\Content\Gateway::load()} |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * Inserts a new content object. |
| 66 | 66 | * |
| 67 | 67 | * @param \eZ\Publish\SPI\Persistence\Content\CreateStruct $struct |
| 68 | - * @param mixed $currentVersionNo |
|
| 68 | + * @param integer $currentVersionNo |
|
| 69 | 69 | * |
| 70 | 70 | * @return int ID |
| 71 | 71 | */ |
@@ -618,8 +618,6 @@ discard block |
||
| 618 | 618 | * Loads data of related to/from $contentId. |
| 619 | 619 | * |
| 620 | 620 | * @param int $contentId |
| 621 | - * @param bool $reverse Reverse relation, default false |
|
| 622 | - * @param int $contentVersionNo |
|
| 623 | 621 | * @param int $relationType |
| 624 | 622 | * |
| 625 | 623 | * @return mixed[][] Content data, array structured like {@see \eZ\Publish\Core\Persistence\Legacy\Content\Gateway::load()} |
@@ -658,7 +656,6 @@ discard block |
||
| 658 | 656 | /** |
| 659 | 657 | * Inserts a new relation database record. |
| 660 | 658 | * |
| 661 | - * @param \eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct $createStruct |
|
| 662 | 659 | * |
| 663 | 660 | * @return int ID the inserted ID |
| 664 | 661 | */ |
@@ -1052,7 +1052,7 @@ discard block |
||
| 1052 | 1052 | * @param string $mainLanguageCode |
| 1053 | 1053 | * @param \eZ\Publish\API\Repository\Values\Content\Field[] $structFields |
| 1054 | 1054 | * @param \eZ\Publish\API\Repository\Values\ContentType\FieldDefinition[] $fieldDefinitions |
| 1055 | - * @param array $languageCodes |
|
| 1055 | + * @param string[] $languageCodes |
|
| 1056 | 1056 | * |
| 1057 | 1057 | * @return array |
| 1058 | 1058 | */ |
@@ -1126,10 +1126,9 @@ discard block |
||
| 1126 | 1126 | * @param \eZ\Publish\SPI\Persistence\Content\Field[] $spiFields |
| 1127 | 1127 | * @param \eZ\Publish\API\Repository\Values\ContentType\FieldDefinition[] $fieldDefinitions |
| 1128 | 1128 | * @param \eZ\Publish\API\Repository\Values\Content\LocationCreateStruct[] $locationCreateStructs |
| 1129 | - * @param \eZ\Publish\SPI\Persistence\Content\ObjectState\Group[] $objectStateGroups |
|
| 1130 | 1129 | * @param bool $execute |
| 1131 | 1130 | * |
| 1132 | - * @return mixed |
|
| 1131 | + * @return ContentCreateStruct |
|
| 1133 | 1132 | */ |
| 1134 | 1133 | protected function assertForTestCreateContentNonRedundantFieldSet( |
| 1135 | 1134 | $mainLanguageCode, |
@@ -2006,7 +2005,7 @@ discard block |
||
| 2006 | 2005 | * @param \eZ\Publish\API\Repository\Values\Content\Field[] $structFields |
| 2007 | 2006 | * @param \eZ\Publish\API\Repository\Values\ContentType\FieldDefinition[] $fieldDefinitions |
| 2008 | 2007 | * |
| 2009 | - * @return mixed |
|
| 2008 | + * @return ContentCreateStruct |
|
| 2010 | 2009 | */ |
| 2011 | 2010 | protected function assertForTestCreateContentRequiredField( |
| 2012 | 2011 | $mainLanguageCode, |
@@ -4793,6 +4792,10 @@ discard block |
||
| 4793 | 4792 | ); |
| 4794 | 4793 | } |
| 4795 | 4794 | |
| 4795 | + /** |
|
| 4796 | + * @param Field[] $existingFields |
|
| 4797 | + * @param FieldDefinition[] $fieldDefinitions |
|
| 4798 | + */ |
|
| 4796 | 4799 | public function assertForTestUpdateContentRequiredField( |
| 4797 | 4800 | $initialLanguageCode, |
| 4798 | 4801 | $structFields, |
@@ -4991,6 +4994,10 @@ discard block |
||
| 4991 | 4994 | } |
| 4992 | 4995 | } |
| 4993 | 4996 | |
| 4997 | + /** |
|
| 4998 | + * @param Field[] $existingFields |
|
| 4999 | + * @param FieldDefinition[] $fieldDefinitions |
|
| 5000 | + */ |
|
| 4994 | 5001 | public function assertForTestUpdateContentThrowsContentFieldValidationException( |
| 4995 | 5002 | $initialLanguageCode, |
| 4996 | 5003 | $structFields, |
@@ -1438,7 +1438,7 @@ discard block |
||
| 1438 | 1438 | * |
| 1439 | 1439 | * @param string[] $methods |
| 1440 | 1440 | * |
| 1441 | - * @return \eZ\Publish\Core\Persistence\Legacy\Content\Handler |
|
| 1441 | + * @return \PHPUnit\Framework\MockObject\MockObject |
|
| 1442 | 1442 | */ |
| 1443 | 1443 | protected function getPartlyMockedHandler(array $methods) |
| 1444 | 1444 | { |
@@ -1462,7 +1462,7 @@ discard block |
||
| 1462 | 1462 | /** |
| 1463 | 1463 | * Returns a TreeHandler mock. |
| 1464 | 1464 | * |
| 1465 | - * @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\Persistence\Legacy\Content\TreeHandler |
|
| 1465 | + * @return TreeHandler |
|
| 1466 | 1466 | */ |
| 1467 | 1467 | protected function getTreeHandlerMock() |
| 1468 | 1468 | { |
@@ -117,9 +117,9 @@ discard block |
||
| 117 | 117 | * Inserts a new content object. |
| 118 | 118 | * |
| 119 | 119 | * @param \eZ\Publish\SPI\Persistence\Content\CreateStruct $struct |
| 120 | - * @param mixed $currentVersionNo |
|
| 120 | + * @param integer $currentVersionNo |
|
| 121 | 121 | * |
| 122 | - * @return int ID |
|
| 122 | + * @return string ID |
|
| 123 | 123 | */ |
| 124 | 124 | public function insertContentObject(CreateStruct $struct, $currentVersionNo = 1) |
| 125 | 125 | { |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | * @param \eZ\Publish\SPI\Persistence\Content\VersionInfo $versionInfo |
| 222 | 222 | * @param \eZ\Publish\SPI\Persistence\Content\Field[] $fields |
| 223 | 223 | * |
| 224 | - * @return int ID |
|
| 224 | + * @return string ID |
|
| 225 | 225 | */ |
| 226 | 226 | public function insertVersion(VersionInfo $versionInfo, array $fields) |
| 227 | 227 | { |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | * @param \eZ\Publish\SPI\Persistence\Content\Field $field |
| 616 | 616 | * @param \eZ\Publish\Core\Persistence\Legacy\Content\StorageFieldValue $value |
| 617 | 617 | * |
| 618 | - * @return int ID |
|
| 618 | + * @return string ID |
|
| 619 | 619 | */ |
| 620 | 620 | public function insertNewField(Content $content, Field $field, StorageFieldValue $value) |
| 621 | 621 | { |
@@ -1094,7 +1094,7 @@ discard block |
||
| 1094 | 1094 | * |
| 1095 | 1095 | * Result is returned with oldest version first (using version id as it has index and is auto increment). |
| 1096 | 1096 | * |
| 1097 | - * @param mixed $contentId |
|
| 1097 | + * @param integer $contentId |
|
| 1098 | 1098 | * @param mixed|null $status Optional argument to filter versions by status, like {@see VersionInfo::STATUS_ARCHIVED}. |
| 1099 | 1099 | * @param int $limit Limit for items returned, -1 means none. |
| 1100 | 1100 | * |
@@ -1162,7 +1162,7 @@ discard block |
||
| 1162 | 1162 | /** |
| 1163 | 1163 | * Returns all version numbers for the given $contentId. |
| 1164 | 1164 | * |
| 1165 | - * @param mixed $contentId |
|
| 1165 | + * @param integer $contentId |
|
| 1166 | 1166 | * |
| 1167 | 1167 | * @return int[] |
| 1168 | 1168 | */ |
@@ -1860,7 +1860,7 @@ discard block |
||
| 1860 | 1860 | * |
| 1861 | 1861 | * @param \eZ\Publish\SPI\Persistence\Content\Relation\CreateStruct $createStruct |
| 1862 | 1862 | * |
| 1863 | - * @return int ID the inserted ID |
|
| 1863 | + * @return string ID the inserted ID |
|
| 1864 | 1864 | */ |
| 1865 | 1865 | public function insertRelation(RelationCreateStruct $createStruct) |
| 1866 | 1866 | { |
@@ -1416,7 +1416,7 @@ discard block |
||
| 1416 | 1416 | * |
| 1417 | 1417 | * @param \eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct |
| 1418 | 1418 | * |
| 1419 | - * @return array |
|
| 1419 | + * @return string[] |
|
| 1420 | 1420 | */ |
| 1421 | 1421 | private function getUpdatedLanguageCodes(APIContentUpdateStruct $contentUpdateStruct) |
| 1422 | 1422 | { |
@@ -1443,7 +1443,7 @@ discard block |
||
| 1443 | 1443 | * @param \eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct $contentUpdateStruct |
| 1444 | 1444 | * @param \eZ\Publish\API\Repository\Values\Content\Content $content |
| 1445 | 1445 | * |
| 1446 | - * @return array |
|
| 1446 | + * @return string[] |
|
| 1447 | 1447 | */ |
| 1448 | 1448 | protected function getLanguageCodesForUpdate(APIContentUpdateStruct $contentUpdateStruct, APIContent $content) |
| 1449 | 1449 | { |
@@ -1572,7 +1572,7 @@ discard block |
||
| 1572 | 1572 | |
| 1573 | 1573 | /** |
| 1574 | 1574 | * @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo |
| 1575 | - * @param array $translations |
|
| 1575 | + * @param string[] $translations |
|
| 1576 | 1576 | * |
| 1577 | 1577 | * @throws \eZ\Publish\API\Repository\Exceptions\BadStateException |
| 1578 | 1578 | * @throws \eZ\Publish\API\Repository\Exceptions\ContentFieldValidationException |
@@ -1642,7 +1642,7 @@ discard block |
||
| 1642 | 1642 | * @param \eZ\Publish\API\Repository\Values\Content\VersionInfo $versionInfo |
| 1643 | 1643 | * @param int|null $publicationDate If null existing date is kept if there is one, otherwise current time is used. |
| 1644 | 1644 | * |
| 1645 | - * @return \eZ\Publish\API\Repository\Values\Content\Content |
|
| 1645 | + * @return LocationCreateStruct |
|
| 1646 | 1646 | */ |
| 1647 | 1647 | protected function internalPublishVersion(APIVersionInfo $versionInfo, $publicationDate = null) |
| 1648 | 1648 | { |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * Will contain always a complete list of fields. |
| 151 | 151 | * |
| 152 | 152 | * @param \eZ\Publish\SPI\Persistence\Content\CreateStruct $struct Content creation struct. |
| 153 | - * @param mixed $versionNo Used by self::copy() to maintain version numbers |
|
| 153 | + * @param integer $versionNo Used by self::copy() to maintain version numbers |
|
| 154 | 154 | * |
| 155 | 155 | * @return \eZ\Publish\SPI\Persistence\Content Content value object |
| 156 | 156 | */ |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | /** |
| 433 | 433 | * Returns the metadata object for a content identified by $remoteId. |
| 434 | 434 | * |
| 435 | - * @param mixed $remoteId |
|
| 435 | + * @param string $remoteId |
|
| 436 | 436 | * |
| 437 | 437 | * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo |
| 438 | 438 | */ |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | * |
| 594 | 594 | * @param int $contentId |
| 595 | 595 | * |
| 596 | - * @return bool |
|
| 596 | + * @return boolean|null |
|
| 597 | 597 | */ |
| 598 | 598 | public function deleteContent($contentId) |
| 599 | 599 | { |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | * @param int $contentId |
| 626 | 626 | * @param int $versionNo |
| 627 | 627 | * |
| 628 | - * @return bool |
|
| 628 | + * @return boolean|null |
|
| 629 | 629 | */ |
| 630 | 630 | public function deleteVersion($contentId, $versionNo) |
| 631 | 631 | { |
@@ -750,7 +750,7 @@ discard block |
||
| 750 | 750 | * |
| 751 | 751 | * @todo Should the existence verifications happen here or is this supposed to be handled at a higher level? |
| 752 | 752 | * |
| 753 | - * @param mixed $relationId |
|
| 753 | + * @param integer $relationId |
|
| 754 | 754 | * @param int $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, |
| 755 | 755 | * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, |
| 756 | 756 | * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | /** |
| 765 | 765 | * Loads relations from $sourceContentId. Optionally, loads only those with $type and $sourceContentVersionNo. |
| 766 | 766 | * |
| 767 | - * @param mixed $sourceContentId Source Content ID |
|
| 767 | + * @param integer $sourceContentId Source Content ID |
|
| 768 | 768 | * @param mixed|null $sourceContentVersionNo Source Content Version, null if not specified |
| 769 | 769 | * @param int|null $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, |
| 770 | 770 | * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, |
@@ -785,7 +785,7 @@ discard block |
||
| 785 | 785 | * |
| 786 | 786 | * Only loads relations against published versions. |
| 787 | 787 | * |
| 788 | - * @param mixed $destinationContentId Destination Content ID |
|
| 788 | + * @param integer $destinationContentId Destination Content ID |
|
| 789 | 789 | * @param int|null $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, |
| 790 | 790 | * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, |
| 791 | 791 | * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, |