Skip to content

Commit 5254995

Browse files
📝 Add docstrings to docstrings
Docstrings generation was requested by @TatevikGr. * #370 (comment) The following files were modified: * `src/Domain/Subscription/Service/Manager/DynamicListAttrTablesManager.php`
1 parent bbe603b commit 5254995

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

src/Domain/Subscription/Service/Manager/DynamicListAttrTablesManager.php

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public function __construct(
2323
$this->prefix = $dbPrefix . $dynamicListTablePrefix;
2424
}
2525

26+
/**
27+
* Resolve an available snake_case table name for a multi-valued attribute.
28+
*
29+
* @param string $name The candidate name to convert to snake_case.
30+
* @param AttributeTypeEnum|null $type The attribute type; must indicate a multi-valued attribute to resolve a table name.
31+
* @return string|null The chosen table name (snake_case, without prefix) if $type indicates a multi-valued attribute; `null` if $type is null or not multi-valued.
32+
*/
2633
public function resolveTableName(string $name, ?AttributeTypeEnum $type): ?string
2734
{
2835
if ($type === null) {
@@ -46,19 +53,17 @@ public function resolveTableName(string $name, ?AttributeTypeEnum $type): ?strin
4653
}
4754

4855
/**
49-
* Creates an option table dynamically if it does not already exist.
50-
*
51-
* Dispatches a {@see DynamicTableMessage} through the message bus to handle
52-
* creation of the specified table with the given name and prefix.
56+
* Ensure a dynamic options table exists for the given list.
5357
*
54-
* @param string $listTable The base name of the list table to ensure exists.
58+
* Dispatches a DynamicTableMessage with the full table name (configured prefix + provided base)
59+
* to request creation of the table if it does not already exist.
5560
*
56-
* @return void
61+
* @param string $listTable The base name of the list table (suffix appended to the configured prefix).
5762
*/
5863
public function createOptionsTableIfNotExists(string $listTable): void
5964
{
6065
$fullTableName = $this->prefix . $listTable;
6166

6267
$this->messageBus->dispatch(new DynamicTableMessage($fullTableName));
6368
}
64-
}
69+
}

0 commit comments

Comments
 (0)