Completed
Push — master ( b6018a...af2f64 )
by Andreas
03:13
created
src/mgdschema/translator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         if (!array_key_exists($typeattribute, self::$typemap)) {
39 39
             throw new \Exception('unknown type ' . $typeattribute);
40 40
         }
41
-        $search = array('unsigned ', 'guid',   'datetime', 'text', 'longtext');
41
+        $search = array('unsigned ', 'guid', 'datetime', 'text', 'longtext');
42 42
         $replace = array('', 'string', 'midgard_datetime', 'string', 'string');
43 43
 
44 44
         return str_replace($search, $replace, $typeattribute);
Please login to merge, or discard this patch.
src/command/schema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         $mgd_config = midgard_connection::get_instance()->config;
57 57
         $mgdschema_file = $mgd_config->vardir . '/mgdschema_classes.php';
58
-        if (   file_exists($mgdschema_file)
58
+        if (file_exists($mgdschema_file)
59 59
             && !unlink($mgdschema_file)) {
60 60
             throw new \RuntimeException('Could not unlink ' . $mgdschema_file);
61 61
         }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $cms = $em->getMetadataFactory()->getAllMetadata();
73 73
 
74 74
         // create storage
75
-        if (    !midgard_storage::create_base_storage()
75
+        if (!midgard_storage::create_base_storage()
76 76
              && midgard_connection::get_instance()->get_error_string() != 'MGD_ERR_OK') {
77 77
             throw new \Exception("Failed to create base database structures" . midgard_connection::get_instance()->get_error_string());
78 78
         }
Please login to merge, or discard this patch.
api/midgard/storage.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -56,6 +56,9 @@  discard block
 block discarded – undo
56 56
         return true;
57 57
     }
58 58
 
59
+    /**
60
+     * @param string $classname
61
+     */
59 62
     public static function create_class_storage($classname)
60 63
     {
61 64
         $em = connection::get_em();
@@ -87,6 +90,11 @@  discard block
 block discarded – undo
87 90
         $generator->generateProxyClass($cm, $filename);
88 91
     }
89 92
 
93
+    /**
94
+     * @param Doctrine\ORM\EntityManager $em
95
+     *
96
+     * @return ClassMetadata
97
+     */
90 98
     private static function get_cm($em, $classname)
91 99
     {
92 100
         if (!class_exists($classname)) {
Please login to merge, or discard this patch.