@@ -10,7 +10,6 @@ |
||
| 10 | 10 | |
| 11 | 11 | use Exception; |
| 12 | 12 | use eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway as LocationGateway; |
| 13 | -use eZ\Publish\SPI\Persistence\Content\Field; |
|
| 14 | 13 | use eZ\Publish\SPI\Persistence\Content\Handler as BaseContentHandler; |
| 15 | 14 | use eZ\Publish\SPI\Persistence\Content\Type\Handler as ContentTypeHandler; |
| 16 | 15 | use eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter; |
@@ -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 | */ |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | /** |
| 438 | 438 | * Returns the metadata object for a content identified by $remoteId. |
| 439 | 439 | * |
| 440 | - * @param mixed $remoteId |
|
| 440 | + * @param string $remoteId |
|
| 441 | 441 | * |
| 442 | 442 | * @return \eZ\Publish\SPI\Persistence\Content\ContentInfo |
| 443 | 443 | */ |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | * |
| 635 | 635 | * @param int $contentId |
| 636 | 636 | * |
| 637 | - * @return bool |
|
| 637 | + * @return boolean|null |
|
| 638 | 638 | */ |
| 639 | 639 | public function deleteContent($contentId) |
| 640 | 640 | { |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | * @param int $contentId |
| 667 | 667 | * @param int $versionNo |
| 668 | 668 | * |
| 669 | - * @return bool |
|
| 669 | + * @return boolean|null |
|
| 670 | 670 | */ |
| 671 | 671 | public function deleteVersion($contentId, $versionNo) |
| 672 | 672 | { |
@@ -704,8 +704,8 @@ discard block |
||
| 704 | 704 | * |
| 705 | 705 | * @throws \eZ\Publish\API\Repository\Exceptions\NotFoundException If content or version is not found |
| 706 | 706 | * |
| 707 | - * @param mixed $contentId |
|
| 708 | - * @param mixed|null $versionNo Copy all versions if left null |
|
| 707 | + * @param integer $contentId |
|
| 708 | + * @param integer $versionNo Copy all versions if left null |
|
| 709 | 709 | * @param int|null $newOwnerId |
| 710 | 710 | * |
| 711 | 711 | * @return \eZ\Publish\SPI\Persistence\Content |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | * |
| 794 | 794 | * @todo Should the existence verifications happen here or is this supposed to be handled at a higher level? |
| 795 | 795 | * |
| 796 | - * @param mixed $relationId |
|
| 796 | + * @param integer $relationId |
|
| 797 | 797 | * @param int $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, |
| 798 | 798 | * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, |
| 799 | 799 | * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, |
@@ -807,7 +807,7 @@ discard block |
||
| 807 | 807 | /** |
| 808 | 808 | * Loads relations from $sourceContentId. Optionally, loads only those with $type and $sourceContentVersionNo. |
| 809 | 809 | * |
| 810 | - * @param mixed $sourceContentId Source Content ID |
|
| 810 | + * @param integer $sourceContentId Source Content ID |
|
| 811 | 811 | * @param mixed|null $sourceContentVersionNo Source Content Version, null if not specified |
| 812 | 812 | * @param int|null $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, |
| 813 | 813 | * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | * |
| 837 | 837 | * Only loads relations against published versions. |
| 838 | 838 | * |
| 839 | - * @param mixed $destinationContentId Destination Content ID |
|
| 839 | + * @param integer $destinationContentId Destination Content ID |
|
| 840 | 840 | * @param int|null $type {@see \eZ\Publish\API\Repository\Values\Content\Relation::COMMON, |
| 841 | 841 | * \eZ\Publish\API\Repository\Values\Content\Relation::EMBED, |
| 842 | 842 | * \eZ\Publish\API\Repository\Values\Content\Relation::LINK, |
@@ -422,8 +422,9 @@ |
||
| 422 | 422 | * Asserts that the given $ioCreateStruct is of the right type and that id matches the expected value. |
| 423 | 423 | * |
| 424 | 424 | * @param $ioCreateStruct |
| 425 | + * @param string $spiId |
|
| 425 | 426 | * |
| 426 | - * @return bool |
|
| 427 | + * @return \Closure |
|
| 427 | 428 | */ |
| 428 | 429 | private function getSPIBinaryFileCreateStructCallback($spiId) |
| 429 | 430 | { |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | /** |
| 292 | 292 | * Returns a mock for the in-memory cache. |
| 293 | 293 | * |
| 294 | - * @return \eZ\Publish\Core\Persistence\Cache\InMemory\InMemoryCache|\PHPUnit\Framework\MockObject\MockObject |
|
| 294 | + * @return InMemoryCache |
|
| 295 | 295 | */ |
| 296 | 296 | protected function getLanguageCacheMock() |
| 297 | 297 | { |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | /** |
| 306 | 306 | * Returns an array with 2 languages. |
| 307 | 307 | * |
| 308 | - * @return \eZ\Publish\SPI\Persistence\Content\Language[] |
|
| 308 | + * @return Language[] |
|
| 309 | 309 | */ |
| 310 | 310 | protected function getLanguagesFixture() |
| 311 | 311 | { |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | * Returns a Content fixture. |
| 500 | 500 | * |
| 501 | 501 | * @param int $versionNo |
| 502 | - * @param array $languageCodes |
|
| 502 | + * @param string[] $languageCodes |
|
| 503 | 503 | * |
| 504 | 504 | * @return \eZ\Publish\SPI\Persistence\Content |
| 505 | 505 | */ |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | /** |
| 528 | 528 | * Returns a Content Gateway mock. |
| 529 | 529 | * |
| 530 | - * @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\Persistence\Legacy\Content\Gateway |
|
| 530 | + * @return Gateway |
|
| 531 | 531 | */ |
| 532 | 532 | protected function getContentGatewayMock() |
| 533 | 533 | { |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | /** |
| 542 | 542 | * Returns a FieldValue converter mock. |
| 543 | 543 | * |
| 544 | - * @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\Persistence\Legacy\Content\FieldValue\Converter |
|
| 544 | + * @return Converter |
|
| 545 | 545 | */ |
| 546 | 546 | protected function getFieldValueConverterMock() |
| 547 | 547 | { |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | /** |
| 556 | 556 | * Returns a Content StorageHandler mock. |
| 557 | 557 | * |
| 558 | - * @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\Persistence\Legacy\Content\StorageHandler |
|
| 558 | + * @return StorageHandler |
|
| 559 | 559 | */ |
| 560 | 560 | protected function getContentStorageHandlerMock() |
| 561 | 561 | { |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | /** |
| 570 | 570 | * Returns a Content mapper mock. |
| 571 | 571 | * |
| 572 | - * @return \PHPUnit\Framework\MockObject\MockObject|\eZ\Publish\Core\Persistence\Legacy\Content\Mapper |
|
| 572 | + * @return ContentMapper |
|
| 573 | 573 | */ |
| 574 | 574 | protected function getContentMapperMock() |
| 575 | 575 | { |
@@ -165,7 +165,7 @@ |
||
| 165 | 165 | /** |
| 166 | 166 | * Returns a mock object for the Content Gateway. |
| 167 | 167 | * |
| 168 | - * @return \eZ\Publish\Core\Persistence\Database\DatabaseHandler|\PHPUnit\Framework\MockObject\MockObject |
|
| 168 | + * @return DatabaseHandler |
|
| 169 | 169 | */ |
| 170 | 170 | protected function getDatabaseHandlerMock() |
| 171 | 171 | { |
@@ -173,6 +173,9 @@ discard block |
||
| 173 | 173 | |
| 174 | 174 | protected $permissionResolverMock; |
| 175 | 175 | |
| 176 | + /** |
|
| 177 | + * @return PermissionResolver |
|
| 178 | + */ |
|
| 176 | 179 | protected function getPermissionResolverMock($methods = []) |
| 177 | 180 | { |
| 178 | 181 | // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. |
@@ -189,6 +192,9 @@ discard block |
||
| 189 | 192 | |
| 190 | 193 | protected $permissionCriterionResolverMock; |
| 191 | 194 | |
| 195 | + /** |
|
| 196 | + * @return PermissionCriterionResolver |
|
| 197 | + */ |
|
| 192 | 198 | protected function getPermissionCriterionResolverMock($methods = []) |
| 193 | 199 | { |
| 194 | 200 | // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. |
@@ -384,6 +384,9 @@ |
||
| 384 | 384 | |
| 385 | 385 | protected $limitationServiceMock; |
| 386 | 386 | |
| 387 | + /** |
|
| 388 | + * @return integer |
|
| 389 | + */ |
|
| 387 | 390 | protected function getLimitationServiceMock($methods = []) |
| 388 | 391 | { |
| 389 | 392 | // Tests first calls here with methods set before initiating PermissionCriterionResolver with same instance. |
@@ -62,9 +62,9 @@ discard block |
||
| 62 | 62 | * Search User with given username, optionally at given location. |
| 63 | 63 | * |
| 64 | 64 | * @param string $username name of User to search for |
| 65 | - * @param string $parentGroupLocationId where to search, in User Group tree |
|
| 65 | + * @param string $parentGroupId where to search, in User Group tree |
|
| 66 | 66 | * |
| 67 | - * @return User found |
|
| 67 | + * @return null|\eZ\Publish\API\Repository\Values\User\User found |
|
| 68 | 68 | */ |
| 69 | 69 | public function searchUserByLogin($username, $parentGroupId = null) |
| 70 | 70 | { |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | * @param string $name name of User Group to search for |
| 96 | 96 | * @param string $parentLocationId (optional) parent location id to search in |
| 97 | 97 | * |
| 98 | - * @return search results |
|
| 98 | + * @return \eZ\Publish\API\Repository\Values\Content\Search\SearchHit[] results |
|
| 99 | 99 | */ |
| 100 | 100 | public function searchUserGroups($name, $parentLocationId = null) |
| 101 | 101 | { |
@@ -118,12 +118,12 @@ discard block |
||
| 118 | 118 | /** |
| 119 | 119 | * Create user inside given User Group; DELETES existing User if login already exists! |
| 120 | 120 | * |
| 121 | - * @param $username username of the user to create |
|
| 122 | - * @param $email email address of user to create |
|
| 123 | - * @param $password account password for user to create |
|
| 124 | - * @param $parentGroup pathstring wherein to create user |
|
| 121 | + * @param string $username username of the user to create |
|
| 122 | + * @param string $email email address of user to create |
|
| 123 | + * @param string $password account password for user to create |
|
| 124 | + * @param \eZ\Publish\API\Repository\Values\User\UserGroup $parentGroup pathstring wherein to create user |
|
| 125 | 125 | * |
| 126 | - * @return eZ\Publish\API\Repository\Values\User\User |
|
| 126 | + * @return \eZ\Publish\API\Repository\Values\User\User |
|
| 127 | 127 | */ |
| 128 | 128 | protected function createUser($username, $email, $password, $parentGroup = null, $fields = []) |
| 129 | 129 | { |
@@ -317,6 +317,9 @@ discard block |
||
| 317 | 317 | return false; |
| 318 | 318 | } |
| 319 | 319 | |
| 320 | + /** |
|
| 321 | + * @param integer $type |
|
| 322 | + */ |
|
| 320 | 323 | public function createPasswordHash($login, $password, $type) |
| 321 | 324 | { |
| 322 | 325 | switch ($type) { |
@@ -44,7 +44,6 @@ discard block |
||
| 44 | 44 | * @param array $headers An array of response headers |
| 45 | 45 | * @param bool $public Files are public by default |
| 46 | 46 | * @param null|string $contentDisposition The type of Content-Disposition to set automatically with the filename |
| 47 | - * @param bool $autoEtag Whether the ETag header should be automatically set |
|
| 48 | 47 | * @param bool $autoLastModified Whether the Last-Modified header should be automatically set |
| 49 | 48 | */ |
| 50 | 49 | public function __construct(BinaryFile $binaryFile, IOServiceInterface $ioService, $status = 200, $headers = [], $public = true, $contentDisposition = null, $autoLastModified = true) |
@@ -63,12 +62,11 @@ discard block |
||
| 63 | 62 | /** |
| 64 | 63 | * Sets the file to stream. |
| 65 | 64 | * |
| 66 | - * @param \SplFileInfo|string $file The file to stream |
|
| 65 | + * @param BinaryFile $file The file to stream |
|
| 67 | 66 | * @param string $contentDisposition |
| 68 | - * @param bool $autoEtag |
|
| 69 | 67 | * @param bool $autoLastModified |
| 70 | 68 | * |
| 71 | - * @return BinaryFileResponse |
|
| 69 | + * @return BinaryStreamResponse |
|
| 72 | 70 | */ |
| 73 | 71 | public function setFile($file, $contentDisposition = null, $autoLastModified = true) |
| 74 | 72 | { |