Completed
Pull Request — master (#5)
by Jacob
02:19
created
src/StorageMetadataFactory.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use As3\Modlr\Exception\MetadataException;
6 6
 use As3\Modlr\Metadata\EntityMetadata;
7
-use As3\Modlr\Metadata\Interfaces\StorageLayerInterface;
8 7
 use As3\Modlr\Metadata\Interfaces\StorageMetadataFactoryInterface;
9 8
 use As3\Modlr\Util\EntityUtility;
10 9
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,12 +38,12 @@  discard block
 block discarded – undo
38 38
     {
39 39
         $persistence = new StorageMetadata();
40 40
 
41
-        if (isset($mapping['db'])) {
42
-            $persistence->db = $mapping['db'];
41
+        if (isset($mapping[ 'db' ])) {
42
+            $persistence->db = $mapping[ 'db' ];
43 43
         }
44 44
 
45
-        if (isset($mapping['collection'])) {
46
-            $persistence->collection = $mapping['collection'];
45
+        if (isset($mapping[ 'collection' ])) {
46
+            $persistence->collection = $mapping[ 'collection' ];
47 47
         }
48 48
         return $persistence;
49 49
     }
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     private function validateIdStrategy(EntityMetadata $metadata)
114 114
     {
115 115
         $persistence = $metadata->persistence;
116
-        $validIdStrategies = ['object'];
116
+        $validIdStrategies = [ 'object' ];
117 117
         if (!in_array($persistence->idStrategy, $validIdStrategies)) {
118 118
             throw MetadataException::invalidMetadata($metadata->type, sprintf('The persistence id strategy "%s" is invalid. Valid types are "%s"', $persistence->idStrategy, implode('", "', $validIdStrategies)));
119 119
         }
Please login to merge, or discard this patch.