| 1 | <?php |
||
| 17 | trait Common_actions { |
||
| 18 | use |
||
| 19 | CRUD; |
||
| 20 | /** |
||
| 21 | * Get item |
||
| 22 | * |
||
| 23 | * @param int|int[] $id |
||
| 24 | * |
||
| 25 | * @return array|false |
||
| 26 | */ |
||
| 27 | protected function get_common ($id) { |
||
| 43 | /** |
||
| 44 | * Get array of all items |
||
| 45 | * |
||
| 46 | * @return int[] Array of attributes ids |
||
| 47 | */ |
||
| 48 | protected function get_all_common () { |
||
| 59 | /** |
||
| 60 | * Add new item |
||
| 61 | * |
||
| 62 | * @param array $arguments |
||
| 63 | * |
||
| 64 | * @return false|int Id of created item on success of <b>false</> on failure |
||
|
1 ignored issue
–
show
|
|||
| 65 | */ |
||
| 66 | protected function add_common ($arguments) { |
||
| 73 | /** |
||
| 74 | * Set data of specified item |
||
| 75 | * |
||
| 76 | * @param array $arguments |
||
| 77 | * |
||
| 78 | * @return bool |
||
| 79 | */ |
||
| 80 | protected function set_common ($arguments) { |
||
| 92 | /** |
||
| 93 | * Delete specified item |
||
| 94 | * |
||
| 95 | * @param int $id |
||
| 96 | * |
||
| 97 | * @return bool |
||
| 98 | */ |
||
| 99 | protected function del_common ($id) { |
||
| 110 | } |
||
| 111 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.