Bladeren bron

[DoctrineBundle] fixed CS, removed some use statements

Fabien Potencier 14 jaren geleden
bovenliggende
commit
8b244f4f5e

+ 4 - 7
src/Symfony/Bundle/DoctrineBundle/Command/CreateDatabaseDoctrineCommand.php

@@ -11,13 +11,10 @@
 
 namespace Symfony\Bundle\DoctrineBundle\Command;
 
-use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\Output;
-use Symfony\Component\HttpKernel\Util\Filesystem;
-use Doctrine\DBAL\Connection;
+use Doctrine\DBAL\DriverManager;
 
 /**
  * Database tool allows you to easily drop and create your configured databases.
@@ -50,11 +47,11 @@ EOT
         $connection = $this->getDoctrineConnection($input->getOption('connection'));
 
         $params = $connection->getParams();
-        $name = isset($params['path']) ? $params['path']:$params['dbname'];
+        $name = isset($params['path']) ? $params['path'] : $params['dbname'];
 
         unset($params['dbname']);
 
-        $tmpConnection = \Doctrine\DBAL\DriverManager::getConnection($params);
+        $tmpConnection = DriverManager::getConnection($params);
 
         try {
             $tmpConnection->getSchemaManager()->createDatabase($name);
@@ -66,4 +63,4 @@ EOT
 
         $tmpConnection->close();
     }
-}
+}

+ 1 - 5
src/Symfony/Bundle/DoctrineBundle/Command/DropDatabaseDoctrineCommand.php

@@ -11,13 +11,9 @@
 
 namespace Symfony\Bundle\DoctrineBundle\Command;
 
-use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\Output;
-use Symfony\Component\HttpKernel\Util\Filesystem;
-use Doctrine\DBAL\Connection;
 
 /**
  * Database tool allows you to easily drop and create your configured databases.
@@ -78,4 +74,4 @@ EOT
             $output->writeln('<error>All data will be lost!</error>');
         }
     }
-}
+}

+ 0 - 1
src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntitiesDoctrineCommand.php

@@ -15,7 +15,6 @@ use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\Output;
 
 /**
  * Generate entity classes from mapping information

+ 0 - 2
src/Symfony/Bundle/DoctrineBundle/Command/GenerateEntityDoctrineCommand.php

@@ -15,9 +15,7 @@ use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\Output;
 use Doctrine\ORM\Tools\Export\ClassMetadataExporter;
-use Doctrine\ORM\Tools\EntityGenerator;
 use Doctrine\ORM\Mapping\ClassMetadataInfo;
 
 /**

+ 1 - 2
src/Symfony/Bundle/DoctrineBundle/Command/GenerateRepositoriesDoctrineCommand.php

@@ -15,7 +15,6 @@ use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\Output;
 use Doctrine\ORM\Tools\EntityRepositoryGenerator;
 
 /**
@@ -72,4 +71,4 @@ EOT
             throw new \RuntimeException(sprintf('Bundle "%s" does not contain any mapped entities.', $bundleName));
         }
     }
-}
+}

+ 0 - 4
src/Symfony/Bundle/DoctrineBundle/Command/ImportMappingDoctrineCommand.php

@@ -15,10 +15,6 @@ use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
-use Symfony\Component\Console\Output\Output;
-use Doctrine\ORM\Tools\Console\Command\ConvertMappingCommand;
-use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
-use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
 use Doctrine\ORM\Mapping\Driver\DatabaseDriver;
 use Doctrine\ORM\Tools\DisconnectedClassMetadataFactory;
 use Doctrine\ORM\Tools\Export\ClassMetadataExporter;

+ 1 - 2
src/Symfony/Bundle/DoctrineBundle/Command/InfoDoctrineCommand.php

@@ -12,7 +12,6 @@
 namespace Symfony\Bundle\DoctrineBundle\Command;
 
 use Doctrine\ORM\Mapping\MappingException;
-use Symfony\Component\Console\Input\InputArgument;
 use Symfony\Component\Console\Input\InputOption;
 use Symfony\Component\Console\Input\InputInterface;
 use Symfony\Component\Console\Output\OutputInterface;
@@ -76,4 +75,4 @@ EOT
             }
         }
     }
-}
+}