Skip to content

Commit

Permalink
[update] rename to className argument
Browse files Browse the repository at this point in the history
  • Loading branch information
georgehristov committed Jul 26, 2020
1 parent 5196ace commit 8ceefb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -1990,11 +1990,11 @@ public function leftJoin(string $foreign_table, $defaults = [])
/**
* Private method.
*
* @param string $c Class name
* @param string $className Class name
* @param string $link Link
* @param array|callable $defaults Properties which we will pass to Reference object constructor
*/
protected function _hasReference($c, $link, $defaults = []): Reference
protected function _hasReference($className, $link, $defaults = []): Reference
{
if (!is_array($defaults)) {
$defaults = ['model' => $defaults ?: 'Model_' . $link];
Expand All @@ -2005,7 +2005,7 @@ protected function _hasReference($c, $link, $defaults = []): Reference

$defaults[0] = $link;

$obj = $this->factory($c, $defaults);
$obj = $this->factory($className, $defaults);

// if reference with such name already exists, then throw exception
if ($this->hasElement($name = $obj->getDesiredName())) {
Expand Down

0 comments on commit 8ceefb5

Please sign in to comment.