We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36091f5 commit d5f0dc1Copy full SHA for d5f0dc1
src/Annotator/ModelAnnotator.php
@@ -21,17 +21,15 @@ public function annotate($path) {
21
22
$modelName = substr($className, 0, -5);
23
$plugin = $this->getConfig(static::CONFIG_PLUGIN);
24
+
25
+ $table = TableRegistry::get($plugin ? ($plugin . '.' . $modelName) : $modelName);
26
27
try {
- $table = TableRegistry::get($plugin ? ($plugin . '.' . $modelName) : $modelName);
28
+ $schema = $table->getSchema();
29
} catch (Exception $e) {
30
return null;
31
}
-
- $schema = $table->getSchema();
- if (!$schema) {
32
- return null;
33
- }
34
35
$associations = $this->_getAssociations($table->associations());
36
37
$entityClassName = $table->getEntityClass();
0 commit comments