ROAResearch /
yii2-roa
| 1 | <?php |
||
| 2 | |||
| 3 | namespace roaresearch\yii2\roa\actions; |
||
| 4 | |||
| 5 | use roaresearch\yii2\roa\hal\ARContract; |
||
| 6 | |||
| 7 | /** |
||
| 8 | * Deletes a record using the `safeDelete()` method. Meant to be used with |
||
| 9 | * library "yii2tech/ar-softdelete". |
||
| 10 | * |
||
| 11 | * @author Angel (Faryshta) Guevara <[email protected]> |
||
| 12 | */ |
||
| 13 | class SafeDelete extends ProctRecordAction |
||
| 14 | { |
||
| 15 | use DeleteResponseTrait; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @inheritdoc |
||
| 19 | */ |
||
| 20 | protected string $errorMessage = 'Safe Delete failed for unknown reasons.'; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @inheritdoc |
||
| 24 | */ |
||
| 25 | 2 | protected function proct(ARContract $model, array $params): bool |
|
| 26 | { |
||
| 27 | 2 | return false !== $model->safeDelete(); |
|
|
0 ignored issues
–
show
|
|||
| 28 | } |
||
| 29 | } |
||
| 30 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.