Commit f2eb1537 authored by pookey's avatar pookey

replacing tabs with spaces

parent ff7aac8b
...@@ -272,16 +272,16 @@ END; ...@@ -272,16 +272,16 @@ END;
$ret = ''; $ret = '';
foreach ($columns as $name => $column) { foreach ($columns as $name => $column) {
// getters // getters
$ret .= "\n\tpublic function get".Doctrine::classify($name)."(\$load = true)\n"; $ret .= "\n public function get".Doctrine::classify($name)."(\$load = true)\n";
$ret .= "\t{\n"; $ret .= " {\n";
$ret .= "\t\treturn \$this->get('{$name}', \$load);\n"; $ret .= " return \$this->get('{$name}', \$load);\n";
$ret .= "\t}\n"; $ret .= " }\n";
// setters // setters
$ret .= "\n\tpublic function set".Doctrine::classify($name)."(\${$name}, \$load = true)\n"; $ret .= "\n public function set".Doctrine::classify($name)."(\${$name}, \$load = true)\n";
$ret .= "\t{\n"; $ret .= " {\n";
$ret .= "\t\treturn \$this->set('{$name}', \${$name}, \$load);\n"; $ret .= " return \$this->set('{$name}', \${$name}, \$load);\n";
$ret .= "\t}\n"; $ret .= " }\n";
} }
return $ret; return $ret;
...@@ -300,18 +300,18 @@ END; ...@@ -300,18 +300,18 @@ END;
$i = 0; $i = 0;
if (isset($options['inheritance']['extends']) && !(isset($options['override_parent']) && $options['override_parent'] == false)) { if (isset($options['inheritance']['extends']) && !(isset($options['override_parent']) && $options['override_parent'] == false)) {
$ret[$i] = "\t\tparent::setTableDefinition();"; $ret[$i] = " parent::setTableDefinition();";
$i++; $i++;
} }
if (isset($options['tableName']) && !empty($options['tableName'])) { if (isset($options['tableName']) && !empty($options['tableName'])) {
$ret[$i] = "\t\t".'$this->setTableName(\''. $options['tableName'].'\');'; $ret[$i] = " ".'$this->setTableName(\''. $options['tableName'].'\');';
$i++; $i++;
} }
foreach ($columns as $name => $column) { foreach ($columns as $name => $column) {
$ret[$i] = "\t\t".'$this->hasColumn(\'' . $name . '\', \'' . $column['type'] . '\''; $ret[$i] = " ".'$this->hasColumn(\'' . $name . '\', \'' . $column['type'] . '\'';
if ($column['length']) { if ($column['length']) {
$ret[$i] .= ', ' . $column['length']; $ret[$i] .= ', ' . $column['length'];
...@@ -372,7 +372,7 @@ END; ...@@ -372,7 +372,7 @@ END;
$code = trim($code); $code = trim($code);
if ($code) { if ($code) {
return "\n\tpublic function setTableDefinition()"."\n\t{\n\t\t".$code."\n\t}"; return "\n public function setTableDefinition()"."\n {\n ".$code."\n }";
} }
} }
...@@ -390,12 +390,12 @@ END; ...@@ -390,12 +390,12 @@ END;
if (is_array($options) && !empty($options)) { if (is_array($options) && !empty($options)) {
$optionsPhp = $this->arrayToPhpArrayCode($options); $optionsPhp = $this->arrayToPhpArrayCode($options);
$build .= "\t\t\$this->loadTemplate('" . $name . "', " . $optionsPhp . ");\n"; $build .= " \$this->loadTemplate('" . $name . "', " . $optionsPhp . ");\n";
} else { } else {
if (isset($templates[0])) { if (isset($templates[0])) {
$build .= "\t\t\$this->loadTemplate('" . $options . "');\n"; $build .= " \$this->loadTemplate('" . $options . "');\n";
} else { } else {
$build .= "\t\t\$this->loadTemplate('" . $name . "');\n"; $build .= " \$this->loadTemplate('" . $name . "');\n";
} }
} }
} }
...@@ -416,12 +416,12 @@ END; ...@@ -416,12 +416,12 @@ END;
if (is_array($options) && !empty($options)) { if (is_array($options) && !empty($options)) {
$optionsPhp = $this->arrayToPhp($options); $optionsPhp = $this->arrayToPhp($options);
$build .= "\t\t\$this->actAs('" . $name . "', " . $optionsPhp . ");\n"; $build .= " \$this->actAs('" . $name . "', " . $optionsPhp . ");\n";
} else { } else {
if (isset($actAs[0])) { if (isset($actAs[0])) {
$build .= "\t\t\$this->actAs('" . $options . "');\n"; $build .= " \$this->actAs('" . $options . "');\n";
} else { } else {
$build .= "\t\t\$this->actAs('" . $name . "');\n"; $build .= " \$this->actAs('" . $name . "');\n";
} }
} }
} }
...@@ -473,7 +473,7 @@ END; ...@@ -473,7 +473,7 @@ END;
$values = substr($values, 0, strlen($values) - 3); $values = substr($values, 0, strlen($values) - 3);
} }
$build .= "\t\t\$this->setAttribute(Doctrine::ATTR_" . strtoupper($key) . ", " . $values . ");\n"; $build .= " \$this->setAttribute(Doctrine::ATTR_" . strtoupper($key) . ", " . $values . ");\n";
} }
return $build; return $build;
...@@ -490,7 +490,7 @@ END; ...@@ -490,7 +490,7 @@ END;
$build = ''; $build = '';
foreach ($indexes as $indexName => $definitions) { foreach ($indexes as $indexName => $definitions) {
$build .= "\n\t\t".'$this->index(\'' . $indexName . '\', array('; $build .= "\n ".'$this->index(\'' . $indexName . '\', array(';
foreach ($definitions as $name => $value) { foreach ($definitions as $name => $value) {
...@@ -559,7 +559,7 @@ END; ...@@ -559,7 +559,7 @@ END;
$i = 0; $i = 0;
if (isset($options['inheritance']['extends']) && !(isset($options['override_parent']) && $options['override_parent'] == false)) { if (isset($options['inheritance']['extends']) && !(isset($options['override_parent']) && $options['override_parent'] == false)) {
$ret[$i] = "\t\tparent::setUp();"; $ret[$i] = " parent::setUp();";
$i++; $i++;
} }
...@@ -573,9 +573,9 @@ END; ...@@ -573,9 +573,9 @@ END;
if ($relation['type'] === Doctrine_Relation::ONE || if ($relation['type'] === Doctrine_Relation::ONE ||
$relation['type'] === Doctrine_Relation::ONE_COMPOSITE) { $relation['type'] === Doctrine_Relation::ONE_COMPOSITE) {
$ret[$i] = "\t\t".'$this->hasOne(\'' . $class . $alias . '\''; $ret[$i] = " ".'$this->hasOne(\'' . $class . $alias . '\'';
} else { } else {
$ret[$i] = "\t\t".'$this->hasMany(\'' . $class . $alias . '\''; $ret[$i] = " ".'$this->hasMany(\'' . $class . $alias . '\'';
} }
$a = array(); $a = array();
...@@ -620,14 +620,14 @@ END; ...@@ -620,14 +620,14 @@ END;
if (isset($options['inheritance']['keyField']) && isset($options['inheritance']['keyValue'])) { if (isset($options['inheritance']['keyField']) && isset($options['inheritance']['keyValue'])) {
$i++; $i++;
$ret[$i] = "\t\t".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => '.$options['inheritance']['keyValue'].'));'; $ret[$i] = " ".'$this->setInheritanceMap(array(\''.$options['inheritance']['keyField'].'\' => '.$options['inheritance']['keyValue'].'));';
} }
$code = implode("\n", $ret); $code = implode("\n", $ret);
$code = trim($code); $code = trim($code);
if ($code) { if ($code) {
return "\n\tpublic function setUp()\n\t{\n\t\t".$code."\n\t}"; return "\n public function setUp()\n {\n ".$code."\n }";
} }
} }
...@@ -867,4 +867,4 @@ END; ...@@ -867,4 +867,4 @@ END;
throw new Doctrine_Import_Builder_Exception("Couldn't write file " . $writePath); throw new Doctrine_Import_Builder_Exception("Couldn't write file " . $writePath);
} }
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment