Skip to content
Permalink
Browse files

attempt to get baked code output closer to phpcs standard

  • Loading branch information...
AD7six committed Apr 30, 2012
1 parent 9001844 commit d1f522e53a0ce1585e15a7a271d03180964b6abe
@@ -25,13 +25,15 @@
*
*/
class <?php echo $model; ?>Fixture extends CakeTestFixture {

<?php if ($table): ?>
/**
* Table name
*
* @var string
*/
public $table = '<?php echo $table; ?>';

<?php endif; ?>
<?php if ($import): ?>
/**
@@ -40,23 +42,24 @@ class <?php echo $model; ?>Fixture extends CakeTestFixture {
* @var array
*/
public $import = <?php echo $import; ?>;
<?php endif; ?>

<?php endif; ?>
<?php if ($schema): ?>
/**
* Fields
*
* @var array
*/
public $fields = <?php echo $schema; ?>;
<?php endif;?>

<?php endif;?>
<?php if ($records): ?>
/**
* Records
*
* @var array
*/
public $records = <?php echo $records; ?>;

<?php endif;?>
}
@@ -36,18 +36,20 @@ foreach (array('hasOne', 'belongsTo', 'hasMany', 'hasAndBelongsToMany') as $asso
?>
*/
class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {

<?php if ($useDbConfig != 'default'): ?>
/**
* Use database config
*
* @var string
*/
public $useDbConfig = '<?php echo $useDbConfig; ?>';

<?php endif;?>
<?php if ($useTable && $useTable !== Inflector::tableize($name)):
$table = "'$useTable'";
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
echo "\tpublic \$useTable = $table;\n";
echo "\tpublic \$useTable = $table;\n\n";
endif;
if ($primaryKey !== 'id'): ?>
/**
@@ -56,6 +58,7 @@ if ($primaryKey !== 'id'): ?>
* @var string
*/
public $primaryKey = '<?php echo $primaryKey; ?>';

<?php endif;
if ($displayField): ?>
/**
@@ -64,6 +67,7 @@ if ($displayField): ?>
* @var string
*/
public $displayField = '<?php echo $displayField; ?>';

<?php endif;
if (!empty($validate)):
@@ -29,6 +29,7 @@ App::uses('<?php echo $dependency[0]; ?>', '<?php echo $dependency[1]; ?>');
*
*/
class Test<?php echo $fullClassName; ?> extends <?php echo $fullClassName; ?> {

/**
* Auto render
*
@@ -55,13 +56,16 @@ class Test<?php echo $fullClassName; ?> extends <?php echo $fullClassName; ?> {
*
*/
class <?php echo $fullClassName; ?>Test extends CakeTestCase {

<?php if (!empty($fixtures)): ?>
/**
* Fixtures
*
* @var array
*/
public $fixtures = array('<?php echo join("', '", $fixtures); ?>');
public $fixtures = array(
'<?php echo join("',\n\t\t'", $fixtures); ?>'
);

<?php endif; ?>
/**
@@ -96,5 +100,6 @@ class <?php echo $fullClassName; ?>Test extends CakeTestCase {
public function test<?php echo Inflector::camelize($method); ?>() {

}

<?php endforeach;?>
}

0 comments on commit d1f522e

Please sign in to comment.
You can’t perform that action at this time.