Permalink
Browse files

Merge pull request #766 from rvitaliy/doAdd-fix

Added type-hinting on doAdd crossFK generated functions
  • Loading branch information...
2 parents a294db1 + c15c239 commit faa11d04a27f205f1662f728501b0340f3f89161 @willdurand willdurand committed Oct 21, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 generator/lib/builder/om/PHP5ObjectBuilder.php
@@ -4616,6 +4616,7 @@ public function add{$relatedObjectClassName}($crossObjectClassName $crossObjectN
protected function addCrossFKDoAdd(&$script, ForeignKey $refFK, ForeignKey $crossFK)
{
$relatedObjectClassName = $this->getFKPhpNameAffix($crossFK, $plural = false);
+ $relatedObjectName = $this->getNewStubObjectBuilder($crossFK->getForeignTable())->getClassname();
$selfRelationNamePlural = $this->getFKPhpNameAffix($refFK, $plural = true);
@@ -4632,7 +4633,7 @@ protected function addCrossFKDoAdd(&$script, ForeignKey $refFK, ForeignKey $cros
/**
* @param {$relatedObjectClassName} \${$lowerRelatedObjectClassName} The $lowerRelatedObjectClassName object to add.
*/
- protected function doAdd{$relatedObjectClassName}(\${$lowerRelatedObjectClassName})
+ protected function doAdd{$relatedObjectClassName}({$relatedObjectName} \${$lowerRelatedObjectClassName})
{
// set the back reference to this object directly as using provided method either results
// in endless loop or in multiple relations

0 comments on commit faa11d0

Please sign in to comment.