Showing 693 of 740 total issues
Method queryMethods
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function queryMethods(QueryBuilder $builder): string
{
$this->setBuilder($builder);
$script = '';
Method build
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function build(array &$params): PreparedStatementDto
{
$sourceTableNamesCollector = [];
$selectSql = $this->buildSelectClause($sourceTableNamesCollector);
Method doUpdate
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doUpdate($updateValues, ConnectionInterface $con, bool $forceIndividualSaves = false): int
{
if ($forceIndividualSaves) {
if ($updateValues instanceof Criteria) {
throw new LogicException('Parameter #1 `$updateValues` must be an array while `$forceIndividualSaves = true`.');
Method addIndexes
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addIndexes(Table $table): void
{
/** @var \PDOStatement $stmt */
$stmt = $this->dbh->query(sprintf('SHOW INDEX FROM %s', $this->getPlatform()->doQuoting($table->getName())));
Method addPrimaryKey
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addPrimaryKey(Table $table, int $oid): void
{
$stmt = $this->dbh->prepare("SELECT
DISTINCT ON(cls.relname)
cls.relname as idxname,
Method addRefFKSet
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addRefFKSet(string &$script, ForeignKey $refFK): void
{
$relatedName = $this->getRefFKPhpNameAffix($refFK, true);
$relatedObjectClassName = $this->getRefFKPhpNameAffix($refFK, false);
Method addColumnMutatorMethods
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addColumnMutatorMethods(string &$script): void
{
foreach ($this->getTable()->getColumns() as $col) {
if ($col->getType() === PropelTypes::OBJECT) {
$this->addObjectMutator($script, $col);
Consider simplifying this complex logical expression. Open
Open
if (
$col->isPrimaryKey()
&& $col->isAutoIncrement()
&& $table->getIdMethod() !== 'none'
&& !$table->isAllowPkInsert()
Consider simplifying this complex logical expression. Open
Open
if (
($this->isNumber($fromSqlType) && $this->isNumber($toSqlType)) ||
($this->isString($fromSqlType) && $this->isString($toSqlType)) ||
($this->isNumber($fromSqlType) && $this->isString($toSqlType)) ||
($this->isUuid($fromSqlType) && $this->isString($toSqlType))
Method createSelectSqlPart
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function createSelectSqlPart(Criteria $criteria, array &$fromClause, bool $aliasAll = false): string
{
$selectClause = [];
if ($aliasAll) {
Method declareClassNamespace
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function declareClassNamespace(string $class, string $namespace = '', $alias = false): string
{
$namespace = trim($namespace, '\\');
// check if the class is already declared
Method addDelete
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addDelete(string &$script): void
{
$script .= "
/**
* Performs a DELETE on the database based on the current ModelCriteria
Method addFilterByPrimaryKey
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addFilterByPrimaryKey(string &$script): void
{
$script .= "
/**
* Filter the query by primary key
Method compareForeignKeys
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function compareForeignKeys(bool $caseInsensitive = false): int
{
$fkDifferences = 0;
$fromTableFks = $this->getFromTable()->getForeignKeys();
$toTableFks = $this->getToTable()->getForeignKeys();
Method addExtraIndices
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addExtraIndices(): void
{
/**
* A collection of indexed columns. The key is the column name
* (concatenated with a comma in the case of multi-col index), the value is
Method getColumnDefaultValueDDL
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getColumnDefaultValueDDL(Column $col): string
{
$default = '';
$defaultValue = $col->getDefaultValue();
if ($defaultValue !== null) {
Method comparePrimaryKeys
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function comparePrimaryKeys(bool $caseInsensitive = false): int
{
$pkDifferences = 0;
$fromTablePk = $this->getFromTable()->getPrimaryKey();
$toTablePk = $this->getToTable()->getPrimaryKey();
Method setupObject
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function setupObject(): void
{
parent::setupObject();
$this->commonName = $this->originCommonName = $this->getAttribute('name');
Method queryMethods
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function queryMethods(AbstractOMBuilder $builder): string
{
$this->setBuilder($builder);
$this->builder->declareClasses(
'\Propel\Runtime\Propel',
Method modifyTable
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function modifyTable(): void
{
$table = $this->getTable();
$database = $table->getDatabase();
$delegates = explode(',', $this->parameters['to']);