app/Map/Layer.php
Avoid using static access to class '\App\Config' in method 'getTileServer'. Open
Open
$url = \App\Config::module('OpenStreetMap', 'tileLayerServer');
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Reference to static property site_URL
from undeclared class \Config\Main
Open
Open
$url = \Config\Main::$site_URL . 'file.php?module=OpenStreetMap&action=TileLayer&z={z}&x={x}&y={y}';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*/
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$url = \App\Config::module('OpenStreetMap', 'tileLayerServer');
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
$url = \Config\Main::$site_URL . 'file.php?module=OpenStreetMap&action=TileLayer&z={z}&x={x}&y={y}';
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
}
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* @return string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
{
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
return $url;
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
public static function getTileServer(): string
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
if ('YetiForce' === $url) {
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
* Get url for tile server.
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
*
- Exclude checks
Spaces must be used to indent lines; tabs are not allowed Open
Open
/**
- Exclude checks