for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Smindel\GIS\ORM;
use SilverStripe\ORM\Connect\MySQLSchemaManager;
use SilverStripe\ORM\DB;
use Smindel\GIS\GIS;
class MySQLGISSchemaManager extends MySQLSchemaManager
{
use GISSchemaManager;
Smindel\GIS\ORM\GISSchemaManager
Smindel\GIS\ORM\MySQLGISSchemaManager
$wkt
$srid
public function geography($values)
$values
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function geography(/** @scrutinizer ignore-unused */ $values)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
// ATTENTION: GEOGRAPHY IS NOT SUPPORTED BY MYSQL. THIS IS STRICTLY FOR COMPATIBILITY
return 'geometry';
}
public function translateStGeometryTypeFilter($field, $value, $inclusive)
$null = $inclusive ? '' : ' OR ' . DB::get_conn()->nullCheckClause($field, true);
$fragment = sprintf(
'%sLOWER(ST_GeometryType(%s)) = ?%s',
$inclusive ? '' : 'NOT ',
$field,
$null
);
return [$fragment => strtolower($value)];