]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove invalid type hinting and cleanup namespaces a bit
authorRobin Appelman <icewind@owncloud.com>
Fri, 2 Aug 2013 13:09:50 +0000 (15:09 +0200)
committerRobin Appelman <icewind@owncloud.com>
Fri, 2 Aug 2013 13:09:50 +0000 (15:09 +0200)
lib/db/mdb2schemamanager.php

index 2f828beb824ddb31c61a37e4c0fb2cf52cfa1829..a34bc9dae7509d8f53e5bb16f8de591543b91ef3 100644 (file)
@@ -14,7 +14,10 @@ class MDB2SchemaManager {
         */
        protected $conn;
 
-       public function __construct(Connection $conn) {
+       /**
+        * @param \Doctrine\DBAL\Connection $conn
+        */
+       public function __construct($conn) {
                $this->conn = $conn;
        }
 
@@ -26,7 +29,7 @@ class MDB2SchemaManager {
         *
         * TODO: write more documentation
         */
-       public function getDbStructure( $file, $mode=MDB2_SCHEMA_DUMP_STRUCTURE) {
+       public function getDbStructure( $file, $mode = MDB2_SCHEMA_DUMP_STRUCTURE) {
                $sm = $this->conn->getSchemaManager();
 
                return \OC_DB_MDB2SchemaWriter::saveSchemaToFile($file, $sm);
@@ -40,7 +43,7 @@ class MDB2SchemaManager {
         * TODO: write more documentation
         */
        public function createDbFromStructure( $file ) {
-               $schemaReader = new \OC\DB\MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
+               $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
                $toSchema = $schemaReader->loadSchemaFromFile($file);
                return $this->executeSchemaChange($toSchema);
        }
@@ -54,7 +57,7 @@ class MDB2SchemaManager {
                $sm = $this->conn->getSchemaManager();
                $fromSchema = $sm->createSchema();
 
-               $schemaReader = new \OC\DB\MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
+               $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
                $toSchema = $schemaReader->loadSchemaFromFile($file);
 
                // remove tables we don't know about
@@ -100,7 +103,7 @@ class MDB2SchemaManager {
         * @param string $file the xml file describing the tables
         */
        public function removeDBStructure($file) {
-               $schemaReader = new \OC\DB\MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
+               $schemaReader = new MDB2SchemaReader(\OC_Config::getObject(), $this->conn->getDatabasePlatform());
                $fromSchema = $schemaReader->loadSchemaFromFile($file);
                $toSchema = clone $fromSchema;
                foreach($toSchema->getTables() as $table) {