propelorm/Propel2

View on GitHub

Showing 693 of 740 total issues

Method addForeignKeys has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    protected function addForeignKeys(Table $table): void
    {
        $database = $table->getDatabase();

        /** @var \Propel\Runtime\DataFetcher\PDODataFetcher $dataFetcher */
Severity: Minor
Found in src/Propel/Generator/Reverse/MssqlSchemaParser.php - About 1 hr to fix

    Method needAliasForClassName has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    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;
    Severity: Minor
    Found in src/Propel/Generator/Builder/Om/AbstractOMBuilder.php - About 1 hr to fix

      Method addRefFKCount has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      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);
      Severity: Minor
      Found in src/Propel/Generator/Builder/Om/ObjectBuilder.php - About 1 hr to fix

        Method initializeTypeMap has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        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');
        Severity: Minor
        Found in src/Propel/Generator/Platform/OraclePlatform.php - About 1 hr to fix

          Method includeExternalSchemas has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              protected function includeExternalSchemas(DOMDocument $dom, string $srcDir): int
              {
                  $databaseNode = $dom->getElementsByTagName('database')->item(0);
                  $externalSchemaNodes = $dom->getElementsByTagName('external-schema');
          
          
          Severity: Minor
          Found in src/Propel/Generator/Manager/AbstractManager.php - About 1 hr to fix

            Method addReference has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function addReference($ref1, $ref2 = null): void
                {
                    if (is_array($ref1)) {
                        $this->localColumns[] = $ref1['local'] ?? null;
                        $this->foreignColumns[] = $ref1['foreign'] ?? null;
            Severity: Minor
            Found in src/Propel/Generator/Model/ForeignKey.php - About 1 hr to fix

              Method objectCall has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function objectCall(ObjectBuilder $builder): string
                  {
                      $script = '';
                      foreach ($this->delegates as $delegate => $type) {
                          $delegateTable = $this->getDelegateTable($delegate);
              Severity: Minor
              Found in src/Propel/Generator/Behavior/Delegate/DelegateBehavior.php - About 1 hr to fix

                Method addSwapWith has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                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 objectMethods has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function objectMethods(AbstractOMBuilder $builder): string
                      {
                          $this->setBuilder($builder);
                          $script = '';
                          if ($this->getParameter('rank_column') !== 'rank') {

                    Method objectFilter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function objectFilter(string &$script): void
                        {
                            $p = new PhpParser($script, true);
                            $text = (string)$p->findMethod('toArray');
                            $matches = [];
                    Severity: Minor
                    Found in src/Propel/Generator/Behavior/Delegate/DelegateBehavior.php - About 1 hr to fix

                      Method addInsertAsFirstChildOf has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          protected function addInsertAsFirstChildOf(string &$script): void
                          {
                              $objectClassName = $this->builder->getObjectClassName();
                              $queryClassName = $this->builder->getQueryClassName(true);
                              $useScope = $this->behavior->useScope();

                        Method getClause has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function getClause(array &$params): string
                            {
                                if ($this->joinCondition === null) {
                                    $conditions = [];
                                    for ($i = 0; $i < $this->count; $i++) {
                        Severity: Minor
                        Found in src/Propel/Runtime/ActiveQuery/Join.php - About 1 hr to fix

                          Method getParams has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public function getParams(): array
                              {
                                  $params = [];
                                  $dbMap = Propel::getServiceContainer()->getDatabaseMap($this->getDbName());
                          
                          
                          Severity: Minor
                          Found in src/Propel/Runtime/ActiveQuery/ModelCriteria.php - About 1 hr to fix

                            Method __construct has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function __construct(int $error)
                                {
                                    $message = 'Error while parsing Json configuration file: ';
                            
                                    if (!function_exists('json_last_error_msg')) {
                            Severity: Minor
                            Found in src/Propel/Common/Config/Exception/JsonParseException.php - About 1 hr to fix

                              Method log has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function log(string $message, int $level = self::LOG_DEBUG): void
                                  {
                                      $logger = self::$serviceContainer->getLogger();
                              
                                      switch ($level) {
                              Severity: Minor
                              Found in src/Propel/Runtime/Propel.php - About 1 hr to fix

                                Method execute has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    protected function execute(InputInterface $input, OutputInterface $output): int
                                    {
                                        $manager = new SqlManager();
                                
                                        $configOptions = [];
                                Severity: Minor
                                Found in src/Propel/Generator/Command/SqlInsertCommand.php - About 1 hr to fix

                                  Method updateDB has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function updateDB(ConnectionInterface $con): ?Database
                                      {
                                          $database = $this->readConnectedDatabase();
                                          $diff = DatabaseComparator::computeDiff($database, $this->database);
                                  
                                  
                                  Severity: Minor
                                  Found in src/Propel/Generator/Util/QuickBuilder.php - About 1 hr to fix

                                    Method addCrossFKIsLoaded has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        protected function addCrossFKIsLoaded(string &$script, CrossForeignKeys $crossFKs): void
                                        {
                                            $inits = [];
                                    
                                            if (1 < count($crossFKs->getCrossForeignKeys()) || $crossFKs->getUnclassifiedPrimaryKeys()) {
                                    Severity: Minor
                                    Found in src/Propel/Generator/Builder/Om/ObjectBuilder.php - About 1 hr to fix

                                      Method addHasOnlyDefaultValuesBody has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          protected function addHasOnlyDefaultValuesBody(string &$script): void
                                          {
                                              $table = $this->getTable();
                                              $colsWithDefaults = [];
                                              foreach ($table->getColumns() as $col) {
                                      Severity: Minor
                                      Found in src/Propel/Generator/Builder/Om/ObjectBuilder.php - About 1 hr to fix

                                        Method addRemoveArrayElement has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            protected function addRemoveArrayElement(string &$script, Column $col): void
                                            {
                                                $clo = $col->getLowercasedName();
                                                $cfc = $col->getPhpName();
                                                $visibility = $col->getAccessorVisibility();
                                        Severity: Minor
                                        Found in src/Propel/Generator/Builder/Om/ObjectBuilder.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language