Completed
Push — master ( 928248...a75adc )
by Wilmer
14s queued 11s
created

Cat::getThrowable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\ActiveRecord\Tests\Stubs\ActiveRecord;
6
7
use Yiisoft\ActiveRecord\ActiveRecord;
8
use Yiisoft\Db\Exceptions\Exception;
0 ignored issues
show
Bug introduced by
The type Yiisoft\Db\Exceptions\Exception 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...
9
10
class Cat extends Animal
11
{
12
    /**
13
     * @param self $record
14
     * @param array $row
15
     */
16
    public static function populateRecord($record, $row): void
17
    {
18
        parent::populateRecord($record, $row);
19
20
        $record->does = 'meow';
21
    }
22
23
    /**
24
     * This is to test if __isset catches the exception.
25
     * @throw DivisionByZeroError
26
     *
27
     * @throws Exception
28
     *
29
     * @return void
30
     */
31
    public function getException(): void
32
    {
33
        throw new Exception('no');
34
    }
35
36
    /**
37
     * This is to test if __isset catches the error.
38
     *
39
     * @throw DivisionByZeroError
40
     *
41
     * @return float|int
42
     */
43
    public function getThrowable()
44
    {
45
        return 5/0;
46
    }
47
}
48