| Conditions | 6 |
| Paths | 5 |
| Total Lines | 27 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public static function boot() |
||
| 26 | { |
||
| 27 | parent::boot(); |
||
| 28 | |||
| 29 | if (isset(self::$organizationPerspective) && self::$organizationPerspective) { |
||
| 30 | |||
| 31 | if(!$user = Auth::user()) { |
||
| 32 | $user = Business::getViaParamsToken(); |
||
| 33 | } |
||
| 34 | |||
| 35 | // Reduz o nivel global a nivel de Business |
||
| 36 | if (!$user->isAdmin() || !Auth::check()) { |
||
| 37 | static::addGlobalScope( |
||
| 38 | 'user', function (Builder $builder) use ($user) { |
||
| 39 | $builder->where(self::getTableName().'.user_id', '=', $user->id); |
||
| 40 | } |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 44 | // Reduz o nivel de business a nivel de cliente da compania |
||
| 45 | // @todo |
||
| 46 | |||
| 47 | // Reduz a nivel de Pessoa () |
||
| 48 | // @todo |
||
| 49 | } |
||
| 50 | |||
| 51 | } |
||
| 52 | } |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()method in theSoncalls the wrong method in the parent class.