1 | <?php |
||||
2 | |||||
3 | namespace Signify\Models; |
||||
4 | |||||
5 | use SilverStripe\ORM\DataObject; |
||||
6 | use SilverStripe\ORM\FieldType\DBField; |
||||
7 | |||||
8 | class CSPViolation extends DataObject |
||||
9 | { |
||||
10 | private static $plural_name = 'CSP Violations'; |
||||
0 ignored issues
–
show
introduced
by
![]() |
|||||
11 | |||||
12 | private static $table_name = 'Signify_CSPViolation'; |
||||
0 ignored issues
–
show
|
|||||
13 | |||||
14 | private static $db = [ |
||||
0 ignored issues
–
show
|
|||||
15 | 'ReportedTime' => 'Datetime', |
||||
16 | 'Disposition' => 'Varchar(7)', |
||||
17 | 'BlockedURI' => 'Varchar(255)', |
||||
18 | 'EffectiveDirective' => 'Varchar(255)', |
||||
19 | 'Violations' => 'Int', |
||||
20 | ]; |
||||
21 | |||||
22 | private static $many_many = [ |
||||
0 ignored issues
–
show
|
|||||
23 | 'Documents' => CSPDocument::class, |
||||
24 | ]; |
||||
25 | |||||
26 | private static $summary_fields = [ |
||||
0 ignored issues
–
show
|
|||||
27 | 'ReportedTime' => 'Latest Report', |
||||
28 | 'Disposition', |
||||
29 | 'BlockedURI', |
||||
30 | 'DocumentURIs', |
||||
31 | 'EffectiveDirective', |
||||
32 | 'Violations', |
||||
33 | ]; |
||||
34 | |||||
35 | private static $default_sort = 'ReportedTime DESC'; |
||||
0 ignored issues
–
show
|
|||||
36 | |||||
37 | public function getDocumentURIs() |
||||
38 | { |
||||
39 | return DBField::create_field('Text', implode(', ', $this->Documents()->Column('URI'))); |
||||
0 ignored issues
–
show
The method
Documents() does not exist on Signify\Models\CSPViolation . Since you implemented __call , consider adding a @method annotation.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
![]() |
|||||
40 | } |
||||
41 | } |
||||
42 |