From bfd16979ab4d067bd49a3b280b8d0f7c07c081b5 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:03:39 +0100 Subject: [PATCH] Enhance `FieldType\FieldType` phpdoc: Fix code blocks --- src/contracts/FieldType/FieldType.php | 56 +++++++++++++-------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/contracts/FieldType/FieldType.php b/src/contracts/FieldType/FieldType.php index 46694a2458..388fb0e657 100644 --- a/src/contracts/FieldType/FieldType.php +++ b/src/contracts/FieldType/FieldType.php @@ -100,20 +100,20 @@ abstract public function getSettingsSchema(); * It is considered best practice to return a hash map, which contains * rudimentary settings structures, like e.g. for the "ezstring" FieldType * - * - * array( - * 'stringLength' => array( - * 'minStringLength' => array( - * 'type' => 'int', - * 'default' => 0, - * ), - * 'maxStringLength' => array( - * 'type' => 'int' - * 'default' => null, - * ) - * ), - * ); - * + * ``` + * [ + * 'stringLength' => [ + * 'minStringLength' => [ + * 'type' => 'int', + * 'default' => 0, + * ], + * 'maxStringLength' => [ + * 'type' => 'int' + * 'default' => null, + * ], + * ], + * ]; + * ``` * * @return mixed */ @@ -360,22 +360,22 @@ abstract public function fromPersistenceValue(FieldValue $fieldValue); * * @param \Ibexa\Contracts\Core\FieldType\Value $value * - * @return array Hash with relation type as key and array of destination content ids as value. + * @return array Hash with relation type as key and array of destination content IDs as value. * * Example: - * - * array( - * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => array( - * "contentIds" => array( 12, 13, 14 ), - * "locationIds" => array( 24 ) - * ), - * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => array( - * "contentIds" => array( 12 ), - * "locationIds" => array( 24, 45 ) - * ), - * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => array( 12 ) - * ) - * + * ``` + * [ + * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::LINK => [ + * 'contentIds' => [12, 13, 14], + * 'locationIds' => [24] + * ], + * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::EMBED => [ + * 'contentIds" => [12], + * 'locationIds' => [24, 45] + * ], + * \Ibexa\Contracts\Core\Repository\Values\Content\Relation::FIELD => [12] + * ] + * ``` */ abstract public function getRelations(Value $value); }