]> git.andy128k.dev Git - ipf-legacy-orm.git/commitdiff
cleanup
authorAndrey Kutejko <andy128k@gmail.com>
Sat, 3 Aug 2013 11:49:59 +0000 (14:49 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Sat, 3 Aug 2013 11:49:59 +0000 (14:49 +0300)
ipf/orm/relation.php
ipf/orm/relation/localkey.php
ipf/orm/table.php

index 8c43bccba34b80a8fa956535bcdf573570c8198e..da16b0e04015fbc01e966f7d130bb6e279351fed 100644 (file)
@@ -48,10 +48,11 @@ abstract class IPF_ORM_Relation implements ArrayAccess
 
     public function hasConstraint()
     {
-        return ($this->definition['constraint'] ||
-                ($this->definition['onUpdate']) ||
-                ($this->definition['onDelete']));
+        return $this->definition['constraint'] ||
+               $this->definition['onUpdate'] ||
+               $this->definition['onDelete'];
     }
+
     public function isDeferred()
     {
         return $this->definition['deferred'];
@@ -181,4 +182,5 @@ abstract class IPF_ORM_Relation implements ArrayAccess
         $r[] = "</pre>";
         return implode("\n", $r);
     }
-}
\ No newline at end of file
+}
+
index ebe8e6672a861b4d37bd66978614c81cfa3ef313..635402b22e1921b2378dcbde906bc5b6393ba754 100644 (file)
@@ -35,4 +35,5 @@ class IPF_ORM_Relation_LocalKey extends IPF_ORM_Relation
         }
         return $alias . '.' . $this->definition['foreign'] . ' = ?';
     }
-}
\ No newline at end of file
+}
+
index fcf2e235ae6301771844bbf2ee82272faccf5c6b..f09b9e55e0416668b200ac8d4ff93941ac35049d 100644 (file)
@@ -197,11 +197,6 @@ class IPF_ORM_Table extends IPF_ORM_Configurable implements Countable
         }
     }
 
-    public function addForeignKey(array $definition)
-    {
-        $this->_options['foreignKeys'][] = $definition;
-    }
-
     public function addCheckConstraint($definition, $name)
     {
         if (is_string($name)) {