Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Arcanedev\LaravelNestedSet\Traits; |
||
31 | 280 | public static function usesSoftDelete() |
|
32 | { |
||
33 | 280 | static $softDelete; |
|
34 | |||
35 | 280 | if (is_null($softDelete)) { |
|
36 | 8 | $instance = new static; |
|
37 | |||
38 | 8 | return $softDelete = method_exists($instance, 'withTrashed'); |
|
39 | } |
||
40 | |||
41 | 280 | return $softDelete; |
|
42 | } |
||
43 | |||
54 |