Showing 693 of 740 total issues
Method format
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function format(?DataFetcherInterface $dataFetcher = null)
{
$this->checkInit();
if ($dataFetcher) {
$this->setDataFetcher($dataFetcher);
Method addRefFKCount
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addRefFKCount(string &$script, ForeignKey $refFK): void
{
$fkQueryClassName = $this->getClassNameFromBuilder($this->getNewStubQueryBuilder($refFK->getTable()));
$relCol = $this->getRefFKPhpNameAffix($refFK, true);
$collName = $this->getRefFKCollVarName($refFK);
Method needAliasForClassName
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function needAliasForClassName(string $class, string $classNamespace): bool
{
// Should remove this check by not allowing nullable return values in getNamespace
if ($this->getNamespace() === null) {
return false;
Method addReference
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function addReference($ref1, $ref2 = null): void
{
if (is_array($ref1)) {
$this->localColumns[] = $ref1['local'] ?? null;
$this->foreignColumns[] = $ref1['foreign'] ?? null;
Method includeExternalSchemas
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function includeExternalSchemas(DOMDocument $dom, string $srcDir): int
{
$databaseNode = $dom->getElementsByTagName('database')->item(0);
$externalSchemaNodes = $dom->getElementsByTagName('external-schema');
Method initializeTypeMap
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function initializeTypeMap(): void
{
parent::initializeTypeMap();
$this->schemaDomainMap[PropelTypes::BOOLEAN] = new Domain(PropelTypes::BOOLEAN_EMU, 'NUMBER', 1, 0);
$this->schemaDomainMap[PropelTypes::CLOB] = new Domain(PropelTypes::CLOB_EMU, 'CLOB');
Method objectCall
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function objectCall(ObjectBuilder $builder): string
{
$script = '';
foreach ($this->delegates as $delegate => $type) {
$delegateTable = $this->getDelegateTable($delegate);
Method addInsertAsFirstChildOf
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addInsertAsFirstChildOf(string &$script): void
{
$objectClassName = $this->builder->getObjectClassName();
$queryClassName = $this->builder->getQueryClassName(true);
$useScope = $this->behavior->useScope();
Method objectMethods
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function objectMethods(AbstractOMBuilder $builder): string
{
$this->setBuilder($builder);
$script = '';
if ($this->getParameter('rank_column') !== 'rank') {
Method addSwapWith
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addSwapWith(string &$script): void
{
$script .= "
/**
* Exchange the rank of the object with the one passed as argument, and saves both objects
Method objectFilter
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function objectFilter(string &$script): void
{
$p = new PhpParser($script, true);
$text = (string)$p->findMethod('toArray');
$matches = [];
Method __construct
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function __construct(int $error)
{
$message = 'Error while parsing Json configuration file: ';
if (!function_exists('json_last_error_msg')) {
Method getParams
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getParams(): array
{
$params = [];
$dbMap = Propel::getServiceContainer()->getDatabaseMap($this->getDbName());
Method getClause
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getClause(array &$params): string
{
if ($this->joinCondition === null) {
$conditions = [];
for ($i = 0; $i < $this->count; $i++) {
Method log
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function log(string $message, int $level = self::LOG_DEBUG): void
{
$logger = self::$serviceContainer->getLogger();
switch ($level) {
Method execute
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function execute(InputInterface $input, OutputInterface $output): int
{
$manager = new SqlManager();
$configOptions = [];
Method updateDB
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function updateDB(ConnectionInterface $con): ?Database
{
$database = $this->readConnectedDatabase();
$diff = DatabaseComparator::computeDiff($database, $this->database);
Method addRemoveArrayElement
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addRemoveArrayElement(string &$script, Column $col): void
{
$clo = $col->getLowercasedName();
$cfc = $col->getPhpName();
$visibility = $col->getAccessorVisibility();
Method addHasOnlyDefaultValuesBody
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addHasOnlyDefaultValuesBody(string &$script): void
{
$table = $this->getTable();
$colsWithDefaults = [];
foreach ($table->getColumns() as $col) {
Method addCrossFKIsLoaded
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function addCrossFKIsLoaded(string &$script, CrossForeignKeys $crossFKs): void
{
$inits = [];
if (1 < count($crossFKs->getCrossForeignKeys()) || $crossFKs->getUnclassifiedPrimaryKeys()) {