Completed
Pull Request — master (#6)
by Angel
03:38
created

SoftDelete   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 13
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A proct() 0 3 1
1
<?php
2
3
namespace roaresearch\yii2\roa\actions;
4
5
use roarsearch\yii2\roa\hal\ARContract;
0 ignored issues
show
Bug introduced by
The type roarsearch\yii2\roa\hal\ARContract was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
/**
8
 * Deletes a record using the `softDelete()` method. Meant to be used with
9
 * library "yii2tech/ar-softdelete".
10
 *
11
 * @author Angel (Faryshta) Guevara <[email protected]>
12
 */
13
class SoftDelete extends ProctRecordAction
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    protected string $errorMessage = 'Soft Delete failed for unknown reasons.';
19
20
    /**
21 2
     * @inheritdoc
22
     */
23 2
    protected function proct(ARContract $model, array $params): bool
24 2
    {
25 2
        return false !== $model->softDelete();
26
    }
27
}
28