Skip to content
This repository was archived by the owner on Jul 31, 2018. It is now read-only.

Commit 9486552

Browse files
author
maxiloc
committed
Merge pull request #23 from chrisvanderpoel/master
Fix of #22
2 parents cbf0053 + a1358b9 commit 9486552

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/AlgoliaEloquentTrait.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,18 @@ public function _setSettings()
122122
}
123123
}
124124

125+
/**
126+
* @param $method
127+
* @param $parameters
128+
* @return mixed
129+
*/
125130
public static function __callStatic($method, $parameters)
126131
{
127132
$instance = new static();
128-
129-
$method = '_'.$method;
130-
131-
if (method_exists($instance, $method));
132-
133-
return call_user_func_array([$instance, $method], $parameters);
133+
$overload_method = '_'.$method;
134+
if (method_exists($instance, $overload_method)) {
135+
return call_user_func_array([$instance, $overload_method], $parameters);
136+
}
134137

135138
return parent::__callStatic($method, $parameters);
136139
}

0 commit comments

Comments
 (0)