@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | protected $fileTpl = "entity.php"; |
| 23 | 23 | protected $overwrite = true; |
| 24 | 24 | |
| 25 | - protected $validFunc = array (); |
|
| 25 | + protected $validFunc = array(); |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @param \Classes\MakerFile $makerFile |
@@ -30,68 +30,68 @@ discard block |
||
| 30 | 30 | * |
| 31 | 31 | * @return array |
| 32 | 32 | */ |
| 33 | - public function parseRelation ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable ) |
|
| 33 | + public function parseRelation(\Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable) |
|
| 34 | 34 | { |
| 35 | 35 | |
| 36 | - $parents = array (); |
|
| 37 | - $depends = array (); |
|
| 38 | - foreach ( $dbTable->getForeingkeys () as $fks ) |
|
| 36 | + $parents = array(); |
|
| 37 | + $depends = array(); |
|
| 38 | + foreach ($dbTable->getForeingkeys() as $fks) |
|
| 39 | 39 | { |
| 40 | - $constrant = $fks->getFks (); |
|
| 40 | + $constrant = $fks->getFks(); |
|
| 41 | 41 | $name = |
| 42 | 42 | 'Parent' |
| 43 | 43 | . ZendFrameworkOne::SEPARETOR |
| 44 | - . AbstractMaker::getClassName ( $constrant->getTable () ) |
|
| 44 | + . AbstractMaker::getClassName($constrant->getTable()) |
|
| 45 | 45 | . ZendFrameworkOne::SEPARETOR |
| 46 | 46 | . 'By' |
| 47 | 47 | . ZendFrameworkOne::SEPARETOR |
| 48 | 48 | . $fks->getName(); |
| 49 | 49 | |
| 50 | - $parents[] = array ( |
|
| 51 | - 'class' => $makerFile->getConfig () |
|
| 52 | - ->createClassNamespace ( $constrant ) |
|
| 50 | + $parents[] = array( |
|
| 51 | + 'class' => $makerFile->getConfig() |
|
| 52 | + ->createClassNamespace($constrant) |
|
| 53 | 53 | . ZendFrameworkOne::SEPARETOR |
| 54 | - . AbstractMaker::getClassName ( $constrant->getTable () ), |
|
| 55 | - 'function' => AbstractMaker::getClassName ( $name ), |
|
| 56 | - 'table' => $constrant->getTable (), |
|
| 57 | - 'column' => $fks->getName (), |
|
| 58 | - 'name' => $constrant->getNameConstrant (), |
|
| 54 | + . AbstractMaker::getClassName($constrant->getTable()), |
|
| 55 | + 'function' => AbstractMaker::getClassName($name), |
|
| 56 | + 'table' => $constrant->getTable(), |
|
| 57 | + 'column' => $fks->getName(), |
|
| 58 | + 'name' => $constrant->getNameConstrant(), |
|
| 59 | 59 | ); |
| 60 | - unset( $name ); |
|
| 60 | + unset($name); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - foreach ( $dbTable->getDependences () as $objColumn ) |
|
| 63 | + foreach ($dbTable->getDependences() as $objColumn) |
|
| 64 | 64 | { |
| 65 | - foreach ( $objColumn->getDependences () as $dependence ) |
|
| 65 | + foreach ($objColumn->getDependences() as $dependence) |
|
| 66 | 66 | { |
| 67 | 67 | $name = |
| 68 | 68 | 'Depend' |
| 69 | 69 | . ZendFrameworkOne::SEPARETOR |
| 70 | - . AbstractMaker::getClassName ( $dependence->getTable () ) |
|
| 70 | + . AbstractMaker::getClassName($dependence->getTable()) |
|
| 71 | 71 | . ZendFrameworkOne::SEPARETOR |
| 72 | 72 | . 'By' |
| 73 | 73 | . ZendFrameworkOne::SEPARETOR |
| 74 | 74 | . $fks->getName(); |
| 75 | 75 | |
| 76 | - if ( !key_exists ( $name, $this->validFunc ) ) |
|
| 76 | + if ( ! key_exists($name, $this->validFunc)) |
|
| 77 | 77 | { |
| 78 | - $this->validFunc[ $name ] = true; |
|
| 79 | - $depends[] = array ( |
|
| 80 | - 'class' => $makerFile->getConfig () |
|
| 81 | - ->createClassNamespace ( $dependence ) |
|
| 78 | + $this->validFunc[$name] = true; |
|
| 79 | + $depends[] = array( |
|
| 80 | + 'class' => $makerFile->getConfig() |
|
| 81 | + ->createClassNamespace($dependence) |
|
| 82 | 82 | . ZendFrameworkOne::SEPARETOR |
| 83 | - . AbstractMaker::getClassName ( $dependence->getTable () ), |
|
| 84 | - 'function' => AbstractMaker::getClassName ( $name ), |
|
| 85 | - 'table' => $dependence->getTable (), |
|
| 86 | - 'column' => $dependence->getColumn (), |
|
| 87 | - 'name' => $dependence->getNameConstrant () |
|
| 83 | + . AbstractMaker::getClassName($dependence->getTable()), |
|
| 84 | + 'function' => AbstractMaker::getClassName($name), |
|
| 85 | + 'table' => $dependence->getTable(), |
|
| 86 | + 'column' => $dependence->getColumn(), |
|
| 87 | + 'name' => $dependence->getNameConstrant() |
|
| 88 | 88 | ); |
| 89 | 89 | } |
| 90 | - unset( $name ); |
|
| 90 | + unset($name); |
|
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - return array ( |
|
| 94 | + return array( |
|
| 95 | 95 | 'parents' => $parents, |
| 96 | 96 | 'depends' => $depends |
| 97 | 97 | ); |