You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$method->setDocBlock('Serializes the object for JSON encoding.');
491
-
$method->getDocBlock()->setTag(newParamTag('$stopRecursion', ['bool'], 'Parameter used internally by TDBM to stop embedded objects from embedding other objects.'));
Copy file name to clipboardExpand all lines: src/Utils/DirectForeignKeyMethodDescriptor.php
+9-7Lines changed: 9 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
useTheCodingMachine\TDBM\Utils\Annotation;
14
14
useZend\Code\Generator\AbstractMemberGenerator;
15
15
useZend\Code\Generator\DocBlock\Tag\ReturnTag;
16
+
useZend\Code\Generator\DocBlockGenerator;
16
17
useZend\Code\Generator\MethodGenerator;
17
18
18
19
/**
@@ -127,9 +128,11 @@ public function getCode() : array
127
128
$getter = newMethodGenerator($this->getName());
128
129
129
130
if ($this->hasLocalUniqueIndex()) {
130
-
$getter->setDocBlock(sprintf('Returns the %s pointing to this bean via the %s column.', $beanClass, implode(', ', $this->foreignKey->getUnquotedLocalColumns())));
$getterDocBlock = newDocBlockGenerator(sprintf('Returns the %s pointing to this bean via the %s column.', $beanClass, implode(', ', $this->foreignKey->getUnquotedLocalColumns())));
@@ -139,11 +142,10 @@ public function getCode() : array
139
142
$this->getFilters($this->foreignKey)
140
143
);
141
144
} else {
142
-
$getter->setDocBlock(sprintf('Returns the list of %s pointing to this bean via the %s column.', $beanClass, implode(', ', $this->foreignKey->getUnquotedLocalColumns())));
143
-
$getter->getDocBlock()->setTag(newReturnTag([
144
-
$beanClass . '[]',
145
-
'\\' . AlterableResultIterator::class
146
-
]))->setWordWrap(false);
145
+
$getterDocBlock = newDocBlockGenerator(sprintf('Returns the list of %s pointing to this bean via the %s column.', $beanClass, implode(', ', $this->foreignKey->getUnquotedLocalColumns())));
$getter->setDocBlock('Returns the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.');
163
+
$getter->setDocBlock(newDocBlockGenerator('Returns the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.'));
163
164
164
165
/*$types = [ $referencedBeanName ];
165
166
if ($isNullable) {
@@ -177,7 +178,7 @@ public function getGetterSetterCode(): array
177
178
}
178
179
179
180
$setter = newMethodGenerator($setterName);
180
-
$setter->setDocBlock('The setter for the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.');
181
+
$setter->setDocBlock(newDocBlockGenerator('The setter for the ' . $referencedBeanName . ' object bound to this object via the ' . implode(' and ', $this->foreignKey->getUnquotedLocalColumns()) . ' column.'));
$getter->setDocBlock(sprintf('Returns the list of %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
$getterDocBlock = newDocBlockGenerator(sprintf('Returns the list of %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
$adder->setDocBlock(sprintf('Adds a relationship with %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
$adderDocBlock = newDocBlockGenerator(sprintf('Adds a relationship with %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
$remover->setDocBlock(sprintf('Deletes the relationship with %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
$removerDocBlock = newDocBlockGenerator(sprintf('Deletes the relationship with %s associated to this bean via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
$hasDocBlock = newDocBlockGenerator(sprintf('Returns whether this bean is associated with %s via the %s pivot table.', $remoteBeanName, $this->pivotTable->getName()));
0 commit comments