Skip to content

Commit 4d312d7

Browse files
committed
Expand the variable name in the ObjectIdentifier
1 parent ab9346b commit 4d312d7

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/AccessorObjectIdentifier.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ public function __construct($accessor)
1111
$this->accessor = $accessor;
1212
}
1313

14-
public function getIdentity($obj)
14+
public function getIdentity($object)
1515
{
16-
if (!method_exists($obj, $this->accessor)) {
17-
throw new \RuntimeException(sprintf('Object of type %s does not have accessor %s', get_class($obj), $this->accessor));
16+
if (!method_exists($object, $this->accessor)) {
17+
throw new \RuntimeException(sprintf('Object of type %s does not have accessor %s', get_class($object), $this->accessor));
1818
}
1919

20-
return $obj->{$this->accessor}();
20+
return $object->{$this->accessor}();
2121
}
2222
}

src/CallbackObjectIdentifier.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ public function __construct(callable $callable)
1111
$this->callable = $callable;
1212
}
1313

14-
public function getIdentity($obj)
14+
public function getIdentity($object)
1515
{
16-
return call_user_func($this->callable, $obj);
16+
return call_user_func($this->callable, $object);
1717
}
1818
}

src/ObjectIdentifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
interface ObjectIdentifier
66
{
7-
public function getIdentity($obj);
7+
public function getIdentity($object);
88
}

0 commit comments

Comments
 (0)