Completed
Push — master ( 0f0d76...292229 )
by
unknown
02:14
created
src/NOSQL/Models/base/NOSQLParserTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -73,20 +73,20 @@
 block discarded – undo
73 73
      * @throws \PSFS\base\exception\GeneratorException
74 74
      */
75 75
     protected function hydrate() {
76
-        if(empty($this->domain)) {
76
+        if (empty($this->domain)) {
77 77
             throw new NOSQLParserException(t('Domain not defined'), NOSQLParserException::NOSQL_PARSER_DOMAIN_NOT_DEFINED);
78 78
         }
79 79
         //$schemaFilename = CORE_DIR . DIRECTORY_SEPARATOR . $this->domain . DIRECTORY_SEPARATOR . 'Config' . DIRECTORY_SEPARATOR . 'schema.json';
80 80
         $schemaFilename = Config::getParam("nosql.schema.path", VENDOR_DIR . DIRECTORY_SEPARATOR . "tks" . DIRECTORY_SEPARATOR .
81 81
                     strtolower($this->domain) . DIRECTORY_SEPARATOR . "src" . DIRECTORY_SEPARATOR . $this->domain .
82
-                    DIRECTORY_SEPARATOR . "Config". DIRECTORY_SEPARATOR . "schema.json");
83
-        if(file_exists($schemaFilename)) {
82
+                    DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "schema.json");
83
+        if (file_exists($schemaFilename)) {
84 84
             $schema = Cache::getInstance()->getDataFromFile($schemaFilename, Cache::JSON, true);
85 85
             $class = get_called_class();
86 86
             $this->schema = new CollectionDto(false);
87
-            foreach($schema as $collection) {
87
+            foreach ($schema as $collection) {
88 88
                 $collectionName = $collection['name'];
89
-                if(false !== strpos($class, $collectionName)) {
89
+                if (false !== strpos($class, $collectionName)) {
90 90
                     $this->schema->fromArray($collection);
91 91
                     break;
92 92
                 }
Please login to merge, or discard this patch.