| 1 | <?php |
||
| 16 | trait Crudable |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var CrudEntry |
||
| 20 | */ |
||
| 21 | protected $crud_entry; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var CrudTable |
||
| 25 | */ |
||
| 26 | protected $crud_table; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @param void |
||
| 30 | * @return CrudEntry |
||
| 31 | * @throws \Akibatech\Crud\Exceptions\InvalidArgumentException |
||
| 32 | */ |
||
| 33 | public function crudEntry() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param void |
||
| 45 | * @return CrudTable |
||
| 46 | * @throws \Akibatech\Crud\Exceptions\InvalidArgumentException |
||
| 47 | */ |
||
| 48 | public function crudTable() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Returns model fields configuration. |
||
| 60 | * |
||
| 61 | * @param void |
||
| 62 | * @return CrudFields |
||
| 63 | */ |
||
| 64 | abstract public function getCrudFields(); |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Returns the CRUD configuration. |
||
| 68 | * |
||
| 69 | * @param void |
||
| 70 | * @return CrudManager |
||
| 71 | */ |
||
| 72 | abstract public function getCrudManager(); |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @param void |
||
| 76 | * @return static |
||
| 77 | */ |
||
| 78 | public static function crudRoutes() |
||
| 82 | } |
||
| 83 |
This check looks for variable assignements that are either overwritten by other assignments or where the variable is not used subsequently.
Both the
$myVarassignment in line 1 and the$higherassignment in line 2 are dead. The first because$myVaris never used and the second because$higheris always overwritten for every possible time line.