1 | <?php |
||||
2 | |||||
3 | namespace Epesi\FileStorage\Models; |
||||
4 | |||||
5 | use atk4\data\Model; |
||||
6 | use Epesi\Core\Data\HasEpesiConnection; |
||||
0 ignored issues
–
show
|
|||||
7 | use Epesi\Core\System\User\Database\Models\atk4\User; |
||||
8 | |||||
9 | class FileAccessLog extends Model |
||||
10 | { |
||||
11 | use HasEpesiConnection; |
||||
12 | |||||
13 | public $table = 'filestorage_access_log'; |
||||
14 | |||||
15 | function init() { |
||||
16 | parent::init(); |
||||
17 | |||||
18 | $this->addFields([ |
||||
19 | 'file_id', |
||||
20 | 'accessed_at' => ['caption' => __('Accessed At'), 'type' => 'datetime'], |
||||
21 | 'action' => ['caption' => __('Action'), 'type' => 'enum', 'values' => ['download' => __('Download'), 'preview' => __('Preview'), 'inline' => __('Inline')]], |
||||
22 | 'ip_address' => ['caption' => __('IP Address')], |
||||
23 | 'host_name' => ['caption' => __('Host Name')] |
||||
24 | ]); |
||||
25 | |||||
26 | $this->hasOne('accessed_by', [User::class, 'our_field' => 'accessed_by'])->addTitle(['field' => 'accessed_by_user', 'caption' => __('Accessed By')]); |
||||
0 ignored issues
–
show
The method
addTitle() does not exist on atk4\data\Reference . It seems like you code against a sub-type of atk4\data\Reference such as atk4\data\Reference\HasOne_SQL .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
27 | } |
||||
28 | } |
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:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths