mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for tests
This commit is contained in:
parent
9e81237269
commit
50212e9567
@ -449,20 +449,25 @@ class EntityModel extends Eloquent
|
||||
|
||||
return $this->id == $obj->id && $this->getEntityType() == $obj->entityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $method
|
||||
* @param $params
|
||||
*/
|
||||
public function __call($method, $params)
|
||||
{
|
||||
$entityType = $this->getEntityType();
|
||||
if ($entityType) {
|
||||
$config = implode('.', ['modules.relations.' . $entityType, $method]);
|
||||
if (config()->has($config)) {
|
||||
$function = config()->get($config);
|
||||
return $function($this);
|
||||
if (count(config('modules.relations'))) {
|
||||
$entityType = $this->getEntityType();
|
||||
|
||||
if ($entityType) {
|
||||
$config = implode('.', ['modules.relations.' . $entityType, $method]);
|
||||
if (config()->has($config)) {
|
||||
$function = config()->get($config);
|
||||
return $function($this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return parent::__call($method, $params);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// https://laracasts.com/discuss/channels/general-discussion/l5-maximum-function-nesting-level-of-100-reached-aborting/
|
||||
ini_set('xdebug.max_nesting_level', 512);
|
||||
ini_set('xdebug.max_nesting_level', 256);
|
||||
|
||||
define('LARAVEL_START', microtime(true));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user