Issues (4)

src/Model/DataPoint.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Sunnysideup\ImageClickSpots\Modeel;
4
5
class DataPoint extends DataObject
0 ignored issues
show
The type Sunnysideup\ImageClickSpots\Modeel\DataObject 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
    private static $db = [
8
       'Title' => 'Varchar',
9
       'Description' => 'HTMLText',
10
       'XCoordinate' => 'Float', //todo: check if this works or try Varchar
11
       'YCoordinate' => 'Float',
12
    ];
13
14
    private static $has_one = [
15
        'Parent' => DataObject::class,
16
    ];
17
18
    public function getCMSFields()
19
    {
20
       $fields = parent::getCMSFields();
21
       $fields->addFieldToTab(
22
           'Root.Main',
23
           ImageCoordField::create(
0 ignored issues
show
The type Sunnysideup\ImageClickSpots\Modeel\ImageCoordField 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...
24
               $name = 'DataPointImageCoordinates',
25
               $xFieldName = 'XCoordinate',
26
               $yFieldName = 'YCoordinate',
27
               $imageURL = $this->Parent()->DataPointImage()->Link(),
28
               $width = $this->Parent()->DataPointImage()->width(),
29
               $height = $this->Parent()->DataPointImage()->height(),
30
               $cssGrid = true
31
           )
32
       );
33
       return $fields;
34
    }
35
}
36