We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f6c97d8 + 3e0617e commit 517ce57Copy full SHA for 517ce57
src/Properties.php
@@ -68,17 +68,15 @@ public function setProperties(array $properties)
68
*/
69
protected function getProperty($key)
70
{
71
+ if (isset($this->properties[$key]) && $this->properties[$key] instanceof Closure) {
72
+ $this->setProperty($key, $this->properties[$key]($this));
73
+ }
74
+
75
if ($this->accessorsAndMutatorsEnabled) {
76
$this->mutateProperty($key);
77
}
78
79
if (array_key_exists($key, $this->properties)) {
- if ($this->properties[$key] instanceof Closure) {
- $value = $this->properties[$key]($this);
- $this->setProperty($key, $value);
- return $value;
80
- }
81
-
82
return $this->properties[$key];
83
84
0 commit comments