Skip to content

Commit

Permalink
make the bake templates pass phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Nov 25, 2014
1 parent 367fc4e commit 22d0947
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion tests/bake_compare/Model/testBakeEntityHidden.php
Expand Up @@ -8,7 +8,6 @@
*/
class BakeUser extends Entity {


/**
* Fields that are excluded from JSON an array versions of the entity.
*
Expand All @@ -17,4 +16,5 @@ class BakeUser extends Entity {
protected $_hidden = [
'password'
];

}
1 change: 0 additions & 1 deletion tests/bake_compare/Model/testBakeTableConfig.php
Expand Up @@ -23,5 +23,4 @@ public function initialize(array $config) {
$this->addBehavior('Timestamp');
}


}
13 changes: 6 additions & 7 deletions tests/bake_compare/Model/testBakeTableRelations.php
Expand Up @@ -19,24 +19,23 @@ class BakeArticlesTable extends Table {
public function initialize(array $config) {
$this->primaryKey('id');
$this->belongsTo('SomethingElse', [
'alias' => 'SomethingElse',
'alias' => 'SomethingElse',
'foreignKey' => 'something_else_id'
]);
$this->belongsTo('BakeUser', [
'alias' => 'BakeUser',
'alias' => 'BakeUser',
'foreignKey' => 'bake_user_id'
]);
$this->hasMany('BakeComment', [
'alias' => 'BakeComment',
'alias' => 'BakeComment',
'foreignKey' => 'parent_id'
]);
$this->belongsToMany('BakeTag', [
'alias' => 'BakeTag',
'foreignKey' => 'bake_article_id',
'joinTable' => 'bake_articles_bake_tags',
'alias' => 'BakeTag',
'foreignKey' => 'bake_article_id',
'joinTable' => 'bake_articles_bake_tags',
'targetForeignKey' => 'bake_tag_id'
]);
}


}
2 changes: 1 addition & 1 deletion tests/bake_compare/Model/testBakeTableValidation.php
Expand Up @@ -23,7 +23,7 @@ public function initialize(array $config) {
/**
* Default validation rules.
*
* @param \Cake\Validation\Validator $validator
* @param \Cake\Validation\Validator $validator instance
* @return \Cake\Validation\Validator
*/
public function validationDefault(Validator $validator) {
Expand Down
1 change: 0 additions & 1 deletion tests/bake_compare/Model/testBakeTableWithPlugin.php
Expand Up @@ -20,5 +20,4 @@ public function initialize(array $config) {
$this->primaryKey('id');
}


}
Expand Up @@ -4,6 +4,6 @@
*/
use Cake\Routing\Router;

Router::plugin('Special', function($routes) {
Router::plugin('Special', function ($routes) {
$routes->fallbacks();
});
1 change: 0 additions & 1 deletion tests/bake_compare/Test/testBakeBehaviorTest.php
Expand Up @@ -18,7 +18,6 @@ public function setUp() {
parent::setUp();

$this->Example = new ExampleBehavior();

}

/**
Expand Down
1 change: 0 additions & 1 deletion tests/bake_compare/Test/testBakeCellTest.php
Expand Up @@ -20,7 +20,6 @@ public function setUp() {
$this->response = $this->getMock('Cake\Network\Response');

$this->Articles = new ArticlesCell($this->request, $this->response);

}

/**
Expand Down
3 changes: 1 addition & 2 deletions tests/bake_compare/Test/testBakeComponentTest.php
Expand Up @@ -2,8 +2,8 @@
namespace TestApp\Test\TestCase\Controller\Component;

use Cake\Controller\ComponentRegistry;
use TestApp\Controller\Component\AppleComponent;
use Cake\TestSuite\TestCase;
use TestApp\Controller\Component\AppleComponent;

/**
* TestApp\Controller\Component\AppleComponent Test Case
Expand All @@ -20,7 +20,6 @@ public function setUp() {
$registry = new ComponentRegistry();

$this->Apple = new AppleComponent($registry);

}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/bake_compare/Test/testBakeControllerTest.php
@@ -1,8 +1,8 @@
<?php
namespace TestApp\Test\TestCase\Controller;

use TestApp\Controller\PostsController;
use Cake\TestSuite\IntegrationTestCase;
use TestApp\Controller\PostsController;

/**
* TestApp\Controller\PostsController Test Case
Expand Down
7 changes: 3 additions & 4 deletions tests/bake_compare/Test/testBakeFixturesParam.php
@@ -1,8 +1,8 @@
<?php
namespace App\Test\TestCase\Model\Table;

use Cake\ORM\TableRegistry;
use App\Model\Table\ArticlesTable;
use Cake\ORM\TableRegistry;
use Cake\TestSuite\TestCase;

/**
Expand All @@ -16,8 +16,8 @@ class ArticlesTableTest extends TestCase {
* @var array
*/
public $fixtures = [
'app.posts',
'app.comments',
'app.posts',
'app.comments',
'app.users'
];

Expand All @@ -31,7 +31,6 @@ public function setUp() {
$config = TableRegistry::exists('Articles') ? [] : ['className' => 'App\Model\Table\ArticlesTable'];

$this->Articles = TableRegistry::get('Articles', $config);

}

/**
Expand Down

0 comments on commit 22d0947

Please sign in to comment.