for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Lagdo\DbAdmin\Driver\Db;
use Lagdo\DbAdmin\Driver\Entity\TableFieldEntity;
use function substr;
use function str_replace;
trait GrammarTrait
{
/**
* @inheritDoc
*/
public function escapeId(string $idf)
return $idf;
}
public function unescapeId(string $idf)
$last = substr($idf, -1);
return str_replace($last . $last, $last, substr($idf, 1, -1));
public function convertField(TableFieldEntity $field)
$field
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function convertField(/** @scrutinizer ignore-unused */ TableFieldEntity $field)
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
return '';
public function unconvertField(TableFieldEntity $field, string $value)
public function unconvertField(/** @scrutinizer ignore-unused */ TableFieldEntity $field, string $value)
return $value;
public function getCreateTableQuery(string $table, bool $autoIncrement, string $style)
$style
public function getCreateTableQuery(string $table, bool $autoIncrement, /** @scrutinizer ignore-unused */ string $style)
$autoIncrement
public function getCreateTableQuery(string $table, /** @scrutinizer ignore-unused */ bool $autoIncrement, string $style)
$table
public function getCreateTableQuery(/** @scrutinizer ignore-unused */ string $table, bool $autoIncrement, string $style)
public function getCreateIndexQuery(string $table, string $type, string $name, string $columns)
$columns
public function getCreateIndexQuery(string $table, string $type, string $name, /** @scrutinizer ignore-unused */ string $columns)
$type
public function getCreateIndexQuery(string $table, /** @scrutinizer ignore-unused */ string $type, string $name, string $columns)
$name
public function getCreateIndexQuery(string $table, string $type, /** @scrutinizer ignore-unused */ string $name, string $columns)
public function getCreateIndexQuery(/** @scrutinizer ignore-unused */ string $table, string $type, string $name, string $columns)
public function getUseDatabaseQuery(string $database)
$database
public function getUseDatabaseQuery(/** @scrutinizer ignore-unused */ string $database)
public function getForeignKeysQuery(string $table)
public function getForeignKeysQuery(/** @scrutinizer ignore-unused */ string $table)
public function getTruncateTableQuery(string $table)
public function getTruncateTableQuery(/** @scrutinizer ignore-unused */ string $table)
public function getCreateTriggerQuery(string $table)
public function getCreateTriggerQuery(/** @scrutinizer ignore-unused */ string $table)
public function getAutoIncrementModifier()
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.