Showing 693 of 740 total issues
Method addFindPks
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addFindPks(string &$script): void
{
$this->declareClasses(
'\Propel\Runtime\Collection\Collection',
'\Propel\Runtime\Connection\ConnectionInterface',
Method computeDiff
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function computeDiff(ForeignKey $fromFk, ForeignKey $toFk, bool $caseInsensitive = false): bool
{
// Check for differences in local and remote table
$fromDifferentTable = $caseInsensitive ?
strtolower($fromFk->getTableName()) !== strtolower($toFk->getTableName()) :
Method addDoSelect
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addDoSelect(string &$script): void
{
$script .= "
public function doSelect(?ConnectionInterface \$con = null): \Propel\Runtime\DataFetcher\DataFetcherInterface
{
Method addObjectCompute
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addObjectCompute(ObjectBuilder $builder): string
{
$conditions = [];
if ($this->getParameter('condition')) {
$conditions[] = $this->getParameter('condition');
Method resolveString
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function resolveString(string $value, array $resolving = [])
{
/*
* %%: to be unescaped
* %[^%\s]++%: a parameter
Method parseTables
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function parseTables(Database $database, ?Table $filterTable = null): void
{
$sql = 'SHOW FULL TABLES';
if ($filterTable) {
Method addForeignKeys
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addForeignKeys(Table $table): void
{
$database = $table->getDatabase();
/** @var \PDOStatement $stmt */
Method addColumns
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addColumns(Table $table): void
{
/** @var \Propel\Runtime\DataFetcher\PDODataFetcher $dataFetcher */
$dataFetcher = $this->dbh->query("sp_columns '" . $table->getName() . "'");
$dataFetcher->setStyle(PDO::FETCH_ASSOC);
Method addPopulateObject
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addPopulateObject(string &$script): void
{
$table = $this->getTable();
$script .= "
/**
Method addGetPrimaryKeyHash
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addGetPrimaryKeyHash(string &$script): void
{
// We have to iterate through all the columns so that we know the offset of the primary
// key columns.
$n = 0;
Method compareIndices
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function compareIndices(bool $caseInsensitive = false): int
{
$indexDifferences = 0;
$fromTableIndices = array_merge($this->getFromTable()->getIndices(), $this->getFromTable()->getUnices());
$toTableIndices = array_merge($this->getToTable()->getIndices(), $this->getToTable()->getUnices());
Method addDeleteDescendants
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addDeleteDescendants(string &$script): void
{
$objectClassName = $this->builder->getObjectClassName();
$queryClassName = $this->builder->getQueryClassName();
$tableMapClass = $this->builder->getTableMapClass();
Method addSyncParentToChild
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addSyncParentToChild(string &$script): void
{
$parentTable = $this->getParentTable();
$parentClass = $this->builder->getClassNameFromBuilder($this->builder->getNewStubObjectBuilder($parentTable));
Method getProfileBetween
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getProfileBetween(array $startSnapshot, array $endSnapshot): string
{
$profile = '';
if ($this->slowThreshold) {
Method init
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function init(?ConnectionInterface $con = null): void
{
$this->con = $con;
$maxRecordLimit = $this->getMaxRecordLimit();
$hasMaxRecordLimit = (bool)$maxRecordLimit;
Method simpleXmlToArray
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected static function simpleXmlToArray(SimpleXMLElement $xml): array
{
$ar = [];
foreach ($xml->children() as $k => $v) {
// recurse the child
Method search
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function search($element)
{
$hashes = [];
$isActiveRecord = [];
foreach (func_get_args() as $pos => $obj) {
Method addIndexes
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addIndexes(Table $table): void
{
/** @var \Propel\Runtime\DataFetcher\PDODataFetcher $dataFetcher */
$dataFetcher = $this->dbh->query("sp_indexes_rowset '" . $table->getName() . "'");
$dataFetcher->setStyle(PDO::FETCH_ASSOC);
Method addCrossFKAdd
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addCrossFKAdd(string &$script, CrossForeignKeys $crossFKs): void
{
$refFK = $crossFKs->getIncomingForeignKey();
foreach ($crossFKs->getCrossForeignKeys() as $crossFK) {
Method addRefFKGetJoinMethods
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addRefFKGetJoinMethods(string &$script, ForeignKey $refFK): void
{
$table = $this->getTable();
$tblFK = $refFK->getTable();
$joinBehavior = $this->getBuildProperty('generator.objectModel.useLeftJoinsInDoJoinMethods') ? 'Criteria::LEFT_JOIN' : 'Criteria::INNER_JOIN';