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

Restore::proct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
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
 * Restores a record using the `restoreDelete()` method. Meant to be used with
9
 * library "yii2tech/ar-softdelete".
10
 *
11
 * @author Angel (Faryshta) Guevara <[email protected]>
12
 */
13
class Restore extends ProctRecordAction
14
{
15
    /**
16
     * @inheritdoc
17
     */
18
    protected string $errorMessage = 'Restore failed for unknown reasons.';
19
20
    /**
21 1
     * @inheritdoc
22
     */
23 1
    protected function proct(ARContract $model, array $params): bool
24 1
    {
25 1
        return false !== $model->restore();
26
    }
27
}
28