Skip to content

Commit

Permalink
fix CS return statement, remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
jaugustin committed Apr 14, 2012
1 parent 09ec779 commit 45aebf2
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions src/Propel/Generator/Builder/Om/AbstractOMBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ public function getQualifiedClassname()
{
if ($namespace = $this->getNamespace()) {
return $namespace . '\\' . $this->getUnqualifiedClassname();
} else {
return $this->getUnqualifiedClassname();
}

return $this->getUnqualifiedClassname();
}

/**
Expand All @@ -147,11 +147,6 @@ public function getQualifiedClassname()
public function getFullyQualifiedClassname()
{
return '\\' . $this->getQualifiedClassname();
if ($namespace = $this->getNamespace()) {
return '\\' . $this->getQualifiedClassname();
} else {
return 'namespace\\' . $this->getQualifiedClassname();
}
}
/**
* Returns FQCN alias of getFullyQualifiedClassname
Expand All @@ -171,12 +166,10 @@ public function getClassname()
public function getClasspath()
{
if ($this->getPackage()) {
$path = $this->getPackage() . '.' . $this->getUnqualifiedClassname();
} else {
$path = $this->getUnqualifiedClassname();
return $this->getPackage() . '.' . $this->getUnqualifiedClassname();
}

return $path;
return $this->getUnqualifiedClassname();
}

/**
Expand Down Expand Up @@ -297,9 +290,9 @@ public function declareClassNamespace($class, $namespace = '', $alias = false)
if (false !== $alias) {
if ('\\Base' == substr($namespace, -5) || 'Base' == $namespace) {
return $this->declareClassNamespace($class, $namespace, 'Base' . $class);
} else {
return $this->declareClassNamespace($class, $namespace, 'Child' . $class);
}

return $this->declareClassNamespace($class, $namespace, 'Child' . $class);
}

throw new LogicException(
Expand Down Expand Up @@ -374,10 +367,9 @@ public function declareClass($fullyQualifiedClassName, $aliasPrefix = false)
$fullyQualifiedClassName = trim($fullyQualifiedClassName, '\\');
if (($pos = strrpos($fullyQualifiedClassName, '\\')) !== false) {
return $this->declareClassNamespacePrefix(substr($fullyQualifiedClassName, $pos + 1), substr($fullyQualifiedClassName, 0, $pos), $aliasPrefix);
} else {
// root namespace
return $this->declareClassNamespacePrefix($fullyQualifiedClassName, '', $aliasPrefix);
}
// root namespace
return $this->declareClassNamespacePrefix($fullyQualifiedClassName, '', $aliasPrefix);
}

/**
Expand Down Expand Up @@ -410,9 +402,9 @@ public function getDeclaredClasses($namespace = null)
{
if (null !== $namespace && isset($this->declaredClasses[$namespace])) {
return $this->declaredClasses[$namespace];
} else {
return $this->declaredClasses;
}

return $this->declaredClasses;
}

/**
Expand Down Expand Up @@ -586,9 +578,9 @@ public function getFKPhpNameAffix(ForeignKey $fk, $plural = false)
if ($fk->getPhpName()) {
if ($plural) {
return $this->getPluralizer()->getPluralForm($fk->getPhpName());
} else {
return $fk->getPhpName();
}

return $fk->getPhpName();
} else {
$className = $fk->getForeignTable()->getPhpName();
if ($plural) {
Expand Down

0 comments on commit 45aebf2

Please sign in to comment.