SinSquare/silex-doctrine-orm-provider

View on GitHub
src/Sins/Doctrine/DoctrineOrmServiceProvider.php

Summary

Maintainability
D
1 day
Test Coverage

Method register has 207 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function register(Container $app)
    {
        $app['doctrine.orm.em_default_options'] = array(
            'query_cache_driver' => array(
                'type' => 'array',
Severity: Major
Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 1 day to fix

    Avoid too many return statements within this method.
    Open

                return new DefaultRepositoryFactory();
    Severity: Major
    Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return new DefaultEntityListenerResolver();
      Severity: Major
      Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                        return $app['doctrine.orm.em_factory']($name, $options);
        Severity: Major
        Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return new ManagerRegistry($app);
          Severity: Major
          Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        return $config;
            Severity: Major
            Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          return new DefaultQuoteStrategy();
              Severity: Major
              Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return $config->newDefaultAnnotationDriver(array($options['path']), $useSimpleAnnotationReader);
                Severity: Major
                Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                              return $manager;
                  Severity: Major
                  Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                return $app[$name];
                    Severity: Major
                    Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return new DefaultNamingStrategy();
                      Severity: Major
                      Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return $app[$mappingName]($options, $config);
                        Severity: Major
                        Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                      return $app['doctrine.orm.em_factory.postinit']($name, $options, $em);
                          Severity: Major
                          Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return $app[$cacheInstanceKey] = $cache;
                            Severity: Major
                            Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  return $app['doctrine.orm.em.'.$name];
                              Severity: Major
                              Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return $ems;
                                Severity: Major
                                Found in src/Sins/Doctrine/DoctrineOrmServiceProvider.php - About 30 mins to fix

                                  There are no issues that match your filters.

                                  Category
                                  Status