Skip to content

Commit

Permalink
Add missing visibility keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
shama committed Feb 17, 2012
1 parent a9c279a commit 45ec5d7
Show file tree
Hide file tree
Showing 34 changed files with 74 additions and 74 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/BakeTask.php
Expand Up @@ -52,7 +52,7 @@ class BakeTask extends AppShell {
*
* @return void
*/
function startup() {
public function startup() {
Configure::write('debug', 2);
Configure::write('Cache.disable', 1);
parent::startup();
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Postgres.php
Expand Up @@ -898,7 +898,7 @@ public function renderStatement($type, $data) {
*
* @return string The schema name
*/
function getSchemaName() {
public function getSchemaName() {
return $this->config['schema'];
}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php
Expand Up @@ -78,7 +78,7 @@ public function testReadAndWriteCache() {
*
* @return void
*/
function testReadWriteDurationZero() {
public function testReadWriteDurationZero() {
Cache::config('apc', array('engine' => 'Apc', 'duration' => 0, 'prefix' => 'cake_'));
Cache::write('zero', 'Should save', 'apc');
sleep(1);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Cache/Engine/MemcacheEngineTest.php
Expand Up @@ -169,7 +169,7 @@ public function testParseServerStringNonLatin() {
*
* @return void
*/
function testParseServerStringUnix() {
public function testParseServerStringUnix() {
$Memcache =& new TestMemcacheEngine();
$result = $Memcache->parseServerString('unix:///path/to/memcached.sock');
$this->assertEquals($result, array('unix:///path/to/memcached.sock', 0));
Expand Down
Expand Up @@ -177,7 +177,7 @@ public function testImportOptionsAlternateConnection() {
*
* @return void
*/
function testImportRecordsNoEscaping() {
public function testImportRecordsNoEscaping() {
$db = ConnectionManager::getDataSource('test');
if ($db instanceof Sqlserver) {
$this->markTestSkipped('This test does not run on SQLServer');
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php
Expand Up @@ -42,7 +42,7 @@ class TestAuthComponent extends AuthComponent {
*
* @return void
*/
function _stop($status = 0) {
protected function _stop($status = 0) {
$this->testStop = true;
}

Expand Down Expand Up @@ -117,7 +117,7 @@ class AuthTestController extends Controller {
*
* @return void
*/
function __construct($request, $response) {
public function __construct($request, $response) {
$request->addParams(Router::parse('/auth_test'));
$request->here = '/auth_test';
$request->webroot = '/';
Expand Down
Expand Up @@ -539,7 +539,7 @@ public function testDeleteRemovesChildren() {
*
* @return void
*/
function testDeleteChildrenNotExist() {
public function testDeleteChildrenNotExist() {
$this->assertNull($this->Cookie->delete('NotFound'));
$this->assertNull($this->Cookie->delete('Not.Found'));
}
Expand Down Expand Up @@ -573,7 +573,7 @@ protected function _implode(array $array) {
* @param mixed $value
* @return string
*/
function __encrypt($value) {
protected function __encrypt($value) {
if (is_array($value)) {
$value = $this->_implode($value);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Controller/Component/DbAclTest.php
Expand Up @@ -155,7 +155,7 @@ class DbAclTwoTest extends DbAcl {
*
* @return void
*/
function __construct() {
public function __construct() {
$this->Aro = new AroTwoTest();
$this->Aro->Permission = new PermissionTwoTest();
$this->Aco = new AcoTwoTest();
Expand Down Expand Up @@ -480,7 +480,7 @@ public function testRevoke() {
* @param bool $treesToo
* @return void
*/
function __debug ($printTreesToo = false) {
protected function __debug ($printTreesToo = false) {
$this->Acl->Aro->displayField = 'alias';
$this->Acl->Aco->displayField = 'alias';
$aros = $this->Acl->Aro->find('list', array('order' => 'lft'));
Expand Down Expand Up @@ -527,7 +527,7 @@ function __debug ($printTreesToo = false) {
* @param int $len
* @return void
*/
function __pad($string = '', $len = 14) {
protected function __pad($string = '', $len = 14) {
return str_pad($string, $len);
}
}
Expand Up @@ -861,7 +861,7 @@ public function testPaginateMaxLimit() {
*
* @return void
*/
function testPaginateOrderVirtualFieldSharedWithRealField() {
public function testPaginateOrderVirtualFieldSharedWithRealField() {
$Controller =& new Controller($this->request);
$Controller->uses = array('PaginatorControllerPost', 'PaginatorControllerComment');
$Controller->constructClasses();
Expand Down
Expand Up @@ -107,7 +107,7 @@ public function setUp() {
*
* @return void
*/
function _init() {
protected function _init() {
$request = new CakeRequest('controller_posts/index');
$response = new CakeResponse();
$this->Controller = new RequestHandlerTestController($request, $response);
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Controller/ScaffoldTest.php
Expand Up @@ -90,7 +90,7 @@ class TestScaffoldMock extends Scaffold {
*
* @param unknown_type $params
*/
function _scaffold(CakeRequest $request) {
protected function _scaffold(CakeRequest $request) {
$this->_params = $request;
}

Expand All @@ -99,7 +99,7 @@ function _scaffold(CakeRequest $request) {
*
* @return unknown
*/
function getParams() {
public function getParams() {
return $this->_params;
}
}
Expand Down Expand Up @@ -277,7 +277,7 @@ public function testScaffoldFlashMessages() {
*
* @return void
*/
function testHabtmFieldAdditionWithScaffoldForm() {
public function testHabtmFieldAdditionWithScaffoldForm() {
CakePlugin::unload();
$params = array(
'plugin' => null,
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php
Expand Up @@ -3511,7 +3511,7 @@ public function testResetMultipleHabtmAssociations() {
/**
* test that bindModel and unbindModel work with find() calls in between.
*/
function testBindMultipleTimesWithFind() {
public function testBindMultipleTimesWithFind() {
$binding = array(
'hasOne' => array(
'ArticlesTag' => array(
Expand Down Expand Up @@ -3624,7 +3624,7 @@ public function testLazyLoad() {
* @param array $contain
* @return void
*/
function __containments(&$Model, $contain = array()) {
protected function __containments(&$Model, $contain = array()) {
if (!is_array($Model)) {
$result = $Model->containments($contain);
return $this->__containments($result['models']);
Expand All @@ -3645,7 +3645,7 @@ function __containments(&$Model, $contain = array()) {
* @param array $expected
* @return void
*/
function __assertBindings(&$Model, $expected = array()) {
protected function __assertBindings(&$Model, $expected = array()) {
$expected = array_merge(array('belongsTo' => array(), 'hasOne' => array(), 'hasMany' => array(), 'hasAndBelongsToMany' => array()), $expected);

foreach ($expected as $binding => $expect) {
Expand All @@ -3661,7 +3661,7 @@ function __assertBindings(&$Model, $expected = array()) {
* @param bool $output
* @return void
*/
function __bindings(&$Model, $extra = array(), $output = true) {
protected function __bindings(&$Model, $extra = array(), $output = true) {
$relationTypes = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');

$debug = '[';
Expand Down
Expand Up @@ -63,7 +63,7 @@ public function tearDown() {
*
* @return void
*/
function testCountWithConditions() {
public function testCountWithConditions() {
$this->loadFixtures('Translate', 'TranslatedItem');

$Model =& new TranslatedItem();
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
Expand Up @@ -178,7 +178,7 @@ public function testLocalizedFloats() {
*
* @return void
*/
function testScientificNotation() {
public function testScientificNotation() {
$result = $this->db->value(2.2E-54, 'float');
$this->assertEquals('2.2E-54', (string)$result);

Expand Down Expand Up @@ -1055,7 +1055,7 @@ public function testGenerateAssociationQuerySelfJoin() {
* @param mixed $model
* @return void
*/
function _buildRelatedModels($model) {
protected function _buildRelatedModels($model) {
foreach ($model->associations() as $type) {
foreach ($model->{$type} as $assoc => $assocData) {
if (is_string($assocData)) {
Expand All @@ -1077,7 +1077,7 @@ function _buildRelatedModels($model) {
* @param mixed $binding
* @return void
*/
function &_prepareAssociationQuery($model, &$queryData, $binding) {
protected function &_prepareAssociationQuery($model, &$queryData, $binding) {
$type = $binding['type'];
$assoc = $binding['model'];
$assocData = $model->{$type}[$assoc];
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php
Expand Up @@ -43,7 +43,7 @@ class DboPostgresTestDb extends Postgres {
* @param mixed $sql
* @return void
*/
function _execute($sql, $params = array(), $prepareOptions = array()) {
protected function _execute($sql, $params = array(), $prepareOptions = array()) {
$this->simulated[] = $sql;
return null;
}
Expand Down Expand Up @@ -757,7 +757,7 @@ public function testVirtualFields() {
*
* @return void
*/
function testVirtualFieldAsAConstant() {
public function testVirtualFieldAsAConstant() {
$this->loadFixtures('Article', 'Comment');
$Article = ClassRegistry::init('Article');
$Article->virtualFields = array(
Expand Down
Expand Up @@ -42,7 +42,7 @@ class DboSqliteTestDb extends Sqlite {
* @param mixed $sql
* @return void
*/
function _execute($sql, $params = array(), $prepareOptions = array()) {
protected function _execute($sql, $params = array(), $prepareOptions = array()) {
$this->simulated[] = $sql;
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
Expand Up @@ -790,15 +790,15 @@ public function testFieldsUsingMethodCache() {
*
* @return void
*/
function testGroupNoModel() {
public function testGroupNoModel() {
$result = $this->db->group('created');
$this->assertEquals(' GROUP BY created', $result);
}

/**
* Test getting the last error.
*/
function testLastError() {
public function testLastError() {
$stmt = $this->getMock('PDOStatement');
$stmt->expects($this->any())
->method('errorInfo')
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Model/DbAclTest.php
Expand Up @@ -214,7 +214,7 @@ class TestDbAcl extends DbAcl {
*
* @return void
*/
function __construct() {
public function __construct() {
$this->Aro = new DbAroTest();
$this->Aro->Permission = new DbPermissionTest();
$this->Aco = new DbAcoTest();
Expand Down
24 changes: 12 additions & 12 deletions lib/Cake/Test/Case/Model/ModelIntegrationTest.php
Expand Up @@ -240,7 +240,7 @@ public function testDynamicBehaviorAttachment() {
* @access public
* @return void
*/
function testFindWithJoinsOption() {
public function testFindWithJoinsOption() {
$this->loadFixtures('Article', 'User');
$TestUser =& new User();

Expand Down Expand Up @@ -626,7 +626,7 @@ public function testCrossDatabaseJoins() {
*
* @return void
*/
function testHABTMKeepExisting() {
public function testHABTMKeepExisting() {
$this->loadFixtures('Site', 'Domain', 'DomainsSite');

$Site = new Site();
Expand Down Expand Up @@ -674,8 +674,8 @@ function testHABTMKeepExisting() {
$results = $Site->Domain->DomainsSite->find('count', array(
'conditions' => array(
'DomainsSite.active' => true,
),
));
),
));
$expected = 5;
$this->assertEquals($expected, $results);

Expand All @@ -687,8 +687,8 @@ function testHABTMKeepExisting() {
$results = $Site->DomainsSite->find('count', array(
'conditions' => array(
'DomainsSite.active' => true,
),
));
),
));
$expected = 6;
$this->assertEquals($expected, $results);

Expand All @@ -697,8 +697,8 @@ function testHABTMKeepExisting() {
'Site' => array('id' => 1, 'name' => 'cakephp (modified)'),
'Domain' => array(
'Domain' => array(3),
)
);
)
);
$Site->create($data);
$Site->save($data);

Expand All @@ -715,12 +715,12 @@ function testHABTMKeepExisting() {
*
* @return void
*/
function testHABTMKeepExistingWithThreeDbs() {
public function testHABTMKeepExistingWithThreeDbs() {
$config = ConnectionManager::enumConnectionObjects();
$this->skipIf(
!isset($config['test']) || !isset($config['test2']) || !isset($config['test_database_three']),
'Primary, secondary, and tertiary test databases not configured, skipping test. To run this test define $test, $test2, and $test_database_three in your database configuration.'
);
);

$this->loadFixtures('Player', 'Guild', 'GuildsPlayer', 'Armor', 'ArmorsPlayer');
$Player = ClassRegistry::init('Player');
Expand All @@ -729,9 +729,9 @@ function testHABTMKeepExistingWithThreeDbs() {
'Armor' => array(
'with' => 'ArmorsPlayer',
'unique' => 'keepExisting',
),
),
), false);
),
), false);
$this->assertEquals('test', $Player->useDbConfig);
$this->assertEquals('test', $Player->Guild->useDbConfig);
$this->assertEquals('test2', $Player->Guild->GuildsPlayer->useDbConfig);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Model/ModelValidationTest.php
Expand Up @@ -766,7 +766,7 @@ public function testValidationMessageAsArray() {
*
* @return void
*/
function testStateValidation() {
public function testStateValidation() {
$this->loadFixtures('Article');
$Article = new Article();

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Test/Case/Network/CakeRequestTest.php
Expand Up @@ -815,7 +815,7 @@ public function testAddDetector() {
*
* @return void
*/
function _detectCallback($request) {
protected function _detectCallback($request) {
return $request->return == true;
}

Expand Down Expand Up @@ -1709,7 +1709,7 @@ public function testIsRequested() {
* @param mixed $env
* @return void
*/
function __loadEnvironment($env) {
protected function __loadEnvironment($env) {
if (isset($env['App'])) {
Configure::write('App', $env['App']);
}
Expand Down

0 comments on commit 45ec5d7

Please sign in to comment.