mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
coding standards according to new sniffer rules
This commit is contained in:
parent
19b4021276
commit
1339a9dfe1
25 changed files with 75 additions and 75 deletions
|
@ -401,7 +401,7 @@ class FileEngineTest extends CakeTestCase {
|
|||
Cache::config('mask_test', array('engine' => 'File', 'path' => TMP . 'tests'));
|
||||
$data = 'This is some test content';
|
||||
$write = Cache::write('masking_test', $data, 'mask_test');
|
||||
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$result = substr(sprintf('%o', fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$expected = '0664';
|
||||
$this->assertEquals($expected, $result);
|
||||
Cache::delete('masking_test', 'mask_test');
|
||||
|
@ -409,7 +409,7 @@ class FileEngineTest extends CakeTestCase {
|
|||
|
||||
Cache::config('mask_test', array('engine' => 'File', 'mask' => 0666, 'path' => TMP . 'tests'));
|
||||
$write = Cache::write('masking_test', $data, 'mask_test');
|
||||
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$result = substr(sprintf('%o', fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$expected = '0666';
|
||||
$this->assertEquals($expected, $result);
|
||||
Cache::delete('masking_test', 'mask_test');
|
||||
|
@ -417,7 +417,7 @@ class FileEngineTest extends CakeTestCase {
|
|||
|
||||
Cache::config('mask_test', array('engine' => 'File', 'mask' => 0644, 'path' => TMP . 'tests'));
|
||||
$write = Cache::write('masking_test', $data, 'mask_test');
|
||||
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$result = substr(sprintf('%o', fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$expected = '0644';
|
||||
$this->assertEquals($expected, $result);
|
||||
Cache::delete('masking_test', 'mask_test');
|
||||
|
@ -425,7 +425,7 @@ class FileEngineTest extends CakeTestCase {
|
|||
|
||||
Cache::config('mask_test', array('engine' => 'File', 'mask' => 0640, 'path' => TMP . 'tests'));
|
||||
$write = Cache::write('masking_test', $data, 'mask_test');
|
||||
$result = substr(sprintf('%o',fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$result = substr(sprintf('%o', fileperms(TMP . 'tests' . DS . 'cake_masking_test')), -4);
|
||||
$expected = '0640';
|
||||
$this->assertEquals($expected, $result);
|
||||
Cache::delete('masking_test', 'mask_test');
|
||||
|
|
|
@ -598,7 +598,7 @@ class ObjectTest extends CakeTestCase {
|
|||
$this->assertEquals(null, $result['plugin']);
|
||||
|
||||
$result = $this->object->requestAction('/request_action/params_pass/sort:desc/limit:5');
|
||||
$expected = array('sort' => 'desc', 'limit' => 5,);
|
||||
$expected = array('sort' => 'desc', 'limit' => 5);
|
||||
$this->assertEquals($expected, $result['named']);
|
||||
|
||||
$result = $this->object->requestAction(
|
||||
|
|
|
@ -528,7 +528,7 @@ class ExceptionRendererTest extends CakeTestCase {
|
|||
404
|
||||
),
|
||||
array(
|
||||
new PrivateActionException(array('controller' => 'PostsController' , 'action' => '_secretSauce')),
|
||||
new PrivateActionException(array('controller' => 'PostsController', 'action' => '_secretSauce')),
|
||||
array(
|
||||
'/<h2>Private Method in PostsController<\/h2>/',
|
||||
'/<em>PostsController::<\/em><em>_secretSauce\(\)<\/em>/'
|
||||
|
|
|
@ -2407,7 +2407,7 @@ class MysqlTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = $this->Dbo->conditions(array(
|
||||
'NOT' => array('Course.id' => null, 'Course.vet' => 'N', 'level_of_education_id' => array(912,999)),
|
||||
'NOT' => array('Course.id' => null, 'Course.vet' => 'N', 'level_of_education_id' => array(912, 999)),
|
||||
'Enrollment.yearcompleted >' => '0')
|
||||
);
|
||||
$this->assertRegExp('/^\s*WHERE\s+\(NOT\s+\(`Course`\.`id` IS NULL\)\s+AND NOT\s+\(`Course`\.`vet`\s+=\s+\'N\'\)\s+AND NOT\s+\(`level_of_education_id` IN \(912, 999\)\)\)\s+AND\s+`Enrollment`\.`yearcompleted`\s+>\s+\'0\'\s*$/', $result);
|
||||
|
@ -3267,7 +3267,7 @@ class MysqlTest extends CakeTestCase {
|
|||
$expected = '(1 + 1) = 2';
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$conditions = array('this_moment BETWEEN ? AND ?' => array(1,2));
|
||||
$conditions = array('this_moment BETWEEN ? AND ?' => array(1, 2));
|
||||
$expected = 'NOW() BETWEEN 1 AND 2';
|
||||
$result = $this->Dbo->conditions($conditions, true, false, $Article);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
|
|
@ -836,16 +836,16 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
$this->assertEquals('test_database_three', $Player->ArmorsPlayer->useDbConfig);
|
||||
|
||||
$players = $Player->find('all');
|
||||
$this->assertEquals(4 , count($players));
|
||||
$this->assertEquals(4, count($players));
|
||||
$playersGuilds = Hash::extract($players, '{n}.Guild.{n}.GuildsPlayer');
|
||||
$this->assertEquals(3 , count($playersGuilds));
|
||||
$this->assertEquals(3, count($playersGuilds));
|
||||
$playersArmors = Hash::extract($players, '{n}.Armor.{n}.ArmorsPlayer');
|
||||
$this->assertEquals(3 , count($playersArmors));
|
||||
$this->assertEquals(3, count($playersArmors));
|
||||
unset($players);
|
||||
|
||||
$larry = $Player->findByName('larry');
|
||||
$larrysArmor = Hash::extract($larry, 'Armor.{n}.ArmorsPlayer');
|
||||
$this->assertEquals(1 , count($larrysArmor));
|
||||
$this->assertEquals(1, count($larrysArmor));
|
||||
|
||||
$larry['Guild']['Guild'] = array(1, 3); // larry joins another guild
|
||||
$larry['Armor']['Armor'] = array(2, 3); // purchases chainmail
|
||||
|
@ -854,9 +854,9 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
|
||||
$larry = $Player->findByName('larry');
|
||||
$larrysGuild = Hash::extract($larry, 'Guild.{n}.GuildsPlayer');
|
||||
$this->assertEquals(2 , count($larrysGuild));
|
||||
$this->assertEquals(2, count($larrysGuild));
|
||||
$larrysArmor = Hash::extract($larry, 'Armor.{n}.ArmorsPlayer');
|
||||
$this->assertEquals(2 , count($larrysArmor));
|
||||
$this->assertEquals(2, count($larrysArmor));
|
||||
|
||||
$Player->ArmorsPlayer->id = 3;
|
||||
$Player->ArmorsPlayer->saveField('broken', true); // larry's cloak broke
|
||||
|
|
|
@ -4941,7 +4941,7 @@ class ModelWriteTest extends BaseModelTest {
|
|||
$expected = array(
|
||||
'Comment' => array(
|
||||
array(
|
||||
'comment' => array( 'This field cannot be left blank' )
|
||||
'comment' => array('This field cannot be left blank')
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
|
@ -1669,7 +1669,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$email->to('someone@example.com')->from('someone@example.com');
|
||||
$result = $email->send('ってテーブルを作ってやってたらう');
|
||||
$this->assertContains('Content-Type: text/plain; charset=ISO-2022-JP', $result['headers']);
|
||||
$this->assertContains(mb_convert_encoding('ってテーブルを作ってやってたらう','ISO-2022-JP'), $result['message']);
|
||||
$this->assertContains(mb_convert_encoding('ってテーブルを作ってやってたらう', 'ISO-2022-JP'), $result['message']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1693,7 +1693,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$result = $email->send('①㈱');
|
||||
$this->assertTextContains("Content-Type: text/plain; charset=ISO-2022-JP", $result['headers']);
|
||||
$this->assertTextNotContains("Content-Type: text/plain; charset=ISO-2022-JP-MS", $result['headers']); // not charset=iso-2022-jp-ms
|
||||
$this->assertTextNotContains(mb_convert_encoding('①㈱','ISO-2022-JP-MS'), $result['message']);
|
||||
$this->assertTextNotContains(mb_convert_encoding('①㈱', 'ISO-2022-JP-MS'), $result['message']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1717,7 +1717,7 @@ class CakeEmailTest extends CakeTestCase {
|
|||
$result = $email->send('①㈱');
|
||||
$this->assertTextContains("Content-Type: text/plain; charset=ISO-2022-JP", $result['headers']);
|
||||
$this->assertTextNotContains("Content-Type: text/plain; charset=iso-2022-jp-ms", $result['headers']); // not charset=iso-2022-jp-ms
|
||||
$this->assertContains(mb_convert_encoding('①㈱','ISO-2022-JP-MS'), $result['message']);
|
||||
$this->assertContains(mb_convert_encoding('①㈱', 'ISO-2022-JP-MS'), $result['message']);
|
||||
}
|
||||
|
||||
protected function _checkContentTransferEncoding($message, $charset) {
|
||||
|
|
|
@ -1520,8 +1520,8 @@ class HttpSocketTest extends CakeTestCase {
|
|||
'name' => 'jim',
|
||||
'items' => array(
|
||||
'personal' => array(
|
||||
'book'
|
||||
, 'pen'
|
||||
'book',
|
||||
'pen'
|
||||
),
|
||||
'ball'
|
||||
)
|
||||
|
@ -1608,10 +1608,10 @@ class HttpSocketTest extends CakeTestCase {
|
|||
$this->Socket->reset();
|
||||
|
||||
$expected = array(
|
||||
'\x22','\x28','\x29','\x3c','\x3e','\x40','\x2c','\x3b','\x3a','\x5c','\x2f','\x5b','\x5d','\x3f','\x3d','\x7b',
|
||||
'\x7d','\x20','\x00','\x01','\x02','\x03','\x04','\x05','\x06','\x07','\x08','\x09','\x0a','\x0b','\x0c','\x0d',
|
||||
'\x0e','\x0f','\x10','\x11','\x12','\x13','\x14','\x15','\x16','\x17','\x18','\x19','\x1a','\x1b','\x1c','\x1d',
|
||||
'\x1e','\x1f','\x7f'
|
||||
'\x22', '\x28', '\x29', '\x3c', '\x3e', '\x40', '\x2c', '\x3b', '\x3a', '\x5c', '\x2f', '\x5b', '\x5d', '\x3f', '\x3d', '\x7b',
|
||||
'\x7d', '\x20', '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d',
|
||||
'\x0e', '\x0f', '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d',
|
||||
'\x1e', '\x1f', '\x7f'
|
||||
);
|
||||
$r = $this->Socket->tokenEscapeChars();
|
||||
$this->assertEquals($expected, $r);
|
||||
|
|
|
@ -923,7 +923,7 @@ class CakeRouteTest extends CakeTestCase {
|
|||
public function testUTF8PatternOnSection() {
|
||||
$route = new CakeRoute(
|
||||
'/:section',
|
||||
array('plugin' => 'blogs', 'controller' => 'posts' , 'action' => 'index' ),
|
||||
array('plugin' => 'blogs', 'controller' => 'posts', 'action' => 'index'),
|
||||
array(
|
||||
'persist' => array('section'),
|
||||
'section' => 'آموزش|weblog'
|
||||
|
|
|
@ -944,7 +944,7 @@ class RouterTest extends CakeTestCase {
|
|||
public function testUrlParsing() {
|
||||
extract(Router::getNamedExpressions());
|
||||
|
||||
Router::connect('/posts/:value/:somevalue/:othervalue/*', array('controller' => 'posts', 'action' => 'view'), array('value','somevalue', 'othervalue'));
|
||||
Router::connect('/posts/:value/:somevalue/:othervalue/*', array('controller' => 'posts', 'action' => 'view'), array('value', 'somevalue', 'othervalue'));
|
||||
$result = Router::parse('/posts/2007/08/01/title-of-post-here');
|
||||
$expected = array('value' => '2007', 'somevalue' => '08', 'othervalue' => '01', 'controller' => 'posts', 'action' => 'view', 'plugin' => '', 'pass' => array('0' => 'title-of-post-here'), 'named' => array());
|
||||
$this->assertEquals($expected, $result);
|
||||
|
|
|
@ -256,7 +256,7 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$a = array(
|
||||
0 => array('Person' => array('name' => 'Jeff'), 'Friend' => array(array('name' => 'Nate'))),
|
||||
1 => array('Person' => array('name' => 'Tracy'),'Friend' => array(array('name' => 'Lindsay'))),
|
||||
1 => array('Person' => array('name' => 'Tracy'), 'Friend' => array(array('name' => 'Lindsay'))),
|
||||
2 => array('Person' => array('name' => 'Adam'), 'Friend' => array(array('name' => 'Bob')))
|
||||
);
|
||||
$b = array(
|
||||
|
@ -268,15 +268,15 @@ class SetTest extends CakeTestCase {
|
|||
$this->assertEquals($a, $b);
|
||||
|
||||
$a = array(
|
||||
array(7,6,4),
|
||||
array(3,4,5),
|
||||
array(3,2,1),
|
||||
array(7, 6, 4),
|
||||
array(3, 4, 5),
|
||||
array(3, 2, 1),
|
||||
);
|
||||
|
||||
$b = array(
|
||||
array(3,2,1),
|
||||
array(3,4,5),
|
||||
array(7,6,4),
|
||||
array(3, 2, 1),
|
||||
array(3, 4, 5),
|
||||
array(7, 6, 4),
|
||||
);
|
||||
|
||||
$a = Set::sort($a, '{n}.{n}', 'asc');
|
||||
|
@ -884,7 +884,7 @@ class SetTest extends CakeTestCase {
|
|||
$r = Set::extract('/file/.[type=application/x-zip-compressed]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
||||
$expected = array(array('name' => 'zipfile.zip', 'type' => 'application/zip','tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'));
|
||||
$expected = array(array('name' => 'zipfile.zip', 'type' => 'application/zip', 'tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'));
|
||||
$r = Set::extract('/file/.[type=application/zip]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
||||
|
@ -922,8 +922,8 @@ class SetTest extends CakeTestCase {
|
|||
$this->assertEquals($expected, $r);
|
||||
|
||||
$expected = array(
|
||||
array('name' => 'zipfile.zip','type' => 'application/zip', 'tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'),
|
||||
array('name' => 'zipfile2.zip','type' => 'application/x zip compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784')
|
||||
array('name' => 'zipfile.zip', 'type' => 'application/zip', 'tmp_name' => '/tmp/php178.tmp', 'error' => 0, 'size' => '564647'),
|
||||
array('name' => 'zipfile2.zip', 'type' => 'application/x zip compressed', 'tmp_name' => '/tmp/php179.tmp', 'error' => 0, 'size' => '354784')
|
||||
);
|
||||
$r = Set::extract('/file/.[tmp_name=/tmp\/php17/]', $f);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
@ -1110,7 +1110,7 @@ class SetTest extends CakeTestCase {
|
|||
)
|
||||
);
|
||||
|
||||
$expected = array(7,2,1);
|
||||
$expected = array(7, 2, 1);
|
||||
$r = Set::extract('/CallType[name=Internal Voice]/../x/hour', $multiple);
|
||||
$this->assertEquals($expected, $r);
|
||||
|
||||
|
@ -1856,7 +1856,7 @@ class SetTest extends CakeTestCase {
|
|||
|
||||
$a = array(
|
||||
array('User' => array('id' => 2, 'group_id' => 1,
|
||||
'Data' => array('user' => 'mariano.iglesias','name' => 'Mariano Iglesias'))),
|
||||
'Data' => array('user' => 'mariano.iglesias', 'name' => 'Mariano Iglesias'))),
|
||||
array('User' => array('id' => 14, 'group_id' => 2,
|
||||
'Data' => array('user' => 'phpnut', 'name' => 'Larry E. Masters'))),
|
||||
array('User' => array('id' => 25, 'group_id' => 1,
|
||||
|
@ -2470,8 +2470,8 @@ class SetTest extends CakeTestCase {
|
|||
array(
|
||||
'Post' => array('id' => '1', 'author_id' => '1', 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'),
|
||||
'Author' => array('id' => '1', 'user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31', 'test' => 'working'),
|
||||
)
|
||||
, array(
|
||||
),
|
||||
array(
|
||||
'Post' => array('id' => '2', 'author_id' => '3', 'title' => 'Second Post', 'body' => 'Second Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:41:23', 'updated' => '2007-03-18 10:43:31'),
|
||||
'Author' => array('id' => '3', 'user' => 'larry', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:20:23', 'updated' => '2007-03-17 01:22:31', 'test' => 'working'),
|
||||
)
|
||||
|
|
|
@ -180,7 +180,7 @@ class StringTest extends CakeTestCase {
|
|||
$expected = "this is a long string with a few? params you know";
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
$result = String::insert('update saved_urls set url = :url where id = :id', array('url' => 'http://www.testurl.com/param1:url/param2:id','id' => 1));
|
||||
$result = String::insert('update saved_urls set url = :url where id = :id', array('url' => 'http://www.testurl.com/param1:url/param2:id', 'id' => 1));
|
||||
$expected = "update saved_urls set url = http://www.testurl.com/param1:url/param2:id where id = 1";
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
|
@ -334,7 +334,7 @@ TEXT;
|
|||
This is the song th
|
||||
at never ends. This
|
||||
is the song that n
|
||||
ever ends. This is
|
||||
ever ends. This is
|
||||
the song that never
|
||||
ends.
|
||||
TEXT;
|
||||
|
|
|
@ -1388,7 +1388,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->Form->input('Addresses.first_name', array('secure' => false));
|
||||
$this->Form->input('Addresses.city', array('type' => 'textarea', 'secure' => false));
|
||||
$this->Form->input('Addresses.zip', array(
|
||||
'type' => 'select', 'options' => array(1,2), 'secure' => false
|
||||
'type' => 'select', 'options' => array(1, 2), 'secure' => false
|
||||
));
|
||||
|
||||
$result = $this->Form->fields;
|
||||
|
@ -1719,7 +1719,7 @@ class FormHelperTest extends CakeTestCase {
|
|||
$result = $this->Form->create('ValidateUser', array('type' => 'post', 'action' => 'add'));
|
||||
$encoding = strtolower(Configure::read('App.encoding'));
|
||||
$expected = array(
|
||||
'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id','accept-charset' => $encoding),
|
||||
'form' => array('method' => 'post', 'action' => '/validate_users/add', 'id', 'accept-charset' => $encoding),
|
||||
'div' => array('style' => 'display:none;'),
|
||||
'input' => array('type' => 'hidden', 'name' => '_method', 'value' => 'POST'),
|
||||
'/div'
|
||||
|
@ -2267,8 +2267,8 @@ class FormHelperTest extends CakeTestCase {
|
|||
$this->assertRegExp('#<option value="15"[^>]*>15</option>#', $result[1]);
|
||||
|
||||
$result = $this->Form->input('prueba', array(
|
||||
'type' => 'time', 'timeFormat' => 24 , 'dateFormat' => 'DMY' , 'minYear' => 2008,
|
||||
'maxYear' => date('Y') + 1 , 'interval' => 15
|
||||
'type' => 'time', 'timeFormat' => 24, 'dateFormat' => 'DMY', 'minYear' => 2008,
|
||||
'maxYear' => date('Y') + 1, 'interval' => 15
|
||||
));
|
||||
$result = explode(':', $result);
|
||||
$this->assertNotRegExp('#<option value="12"[^>]*>12</option>#', $result[1]);
|
||||
|
|
|
@ -873,7 +873,7 @@ class JsBaseEngineTest extends CakeTestCase {
|
|||
|
||||
$object = new JsEncodingObject();
|
||||
$object->title = 'New thing';
|
||||
$object->indexes = array(5,6,7,8);
|
||||
$object->indexes = array(5, 6, 7, 8);
|
||||
$result = $this->JsEngine->object($object);
|
||||
$this->assertEquals($expected, $result);
|
||||
|
||||
|
|
|
@ -266,7 +266,7 @@ class MootoolsEngineHelperTest extends CakeTestCase {
|
|||
'start' => 'onStart',
|
||||
'drag' => 'onDrag',
|
||||
'stop' => 'onStop',
|
||||
'snapGrid' => array(10,10),
|
||||
'snapGrid' => array(10, 10),
|
||||
'wrapCallbacks' => false
|
||||
));
|
||||
$expected = '$("drag-me").makeDraggable({onComplete:onStop, onDrag:onDrag, onStart:onStart, snap:[10,10]});';
|
||||
|
|
|
@ -290,7 +290,7 @@ class PaginatorHelperTest extends CakeTestCase {
|
|||
Router::setRequestInfo(array(
|
||||
array('plugin' => null, 'controller' => 'accounts', 'action' => 'index', 'pass' => array(),
|
||||
'url' => array('url' => 'accounts/', 'mod_rewrite' => 'true')),
|
||||
array('base' => '/', 'here' => '/accounts/', 'webroot' => '/',)
|
||||
array('base' => '/', 'here' => '/accounts/', 'webroot' => '/')
|
||||
));
|
||||
$this->Paginator->options(array('url' => array('param')));
|
||||
|
||||
|
|
|
@ -47,13 +47,13 @@ class AcoTwoFixture extends CakeTestFixture {
|
|||
*/
|
||||
public $records = array(
|
||||
array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 20),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports','lft' => 2, 'rght' => 9),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'tpsReports', 'lft' => 2, 'rght' => 9),
|
||||
array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'view', 'lft' => 3, 'rght' => 6),
|
||||
array('parent_id' => 3, 'model' => null, 'foreign_key' => null, 'alias' => 'current', 'lft' => 4, 'rght' => 5),
|
||||
array('parent_id' => 2, 'model' => null, 'foreign_key' => null, 'alias' => 'update', 'lft' => 7, 'rght' => 8),
|
||||
array('parent_id' => 1, 'model' => null, 'foreign_key' => null, 'alias' => 'printers', 'lft' => 10, 'rght' => 19),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'print', 'lft' => 11, 'rght' => 14),
|
||||
array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'lettersize','lft' => 12, 'rght' => 13),
|
||||
array('parent_id' => 7, 'model' => null, 'foreign_key' => null, 'alias' => 'lettersize', 'lft' => 12, 'rght' => 13),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'refill', 'lft' => 15, 'rght' => 16),
|
||||
array('parent_id' => 6, 'model' => null, 'foreign_key' => null, 'alias' => 'smash', 'lft' => 17, 'rght' => 18),
|
||||
);
|
||||
|
|
|
@ -51,8 +51,8 @@ class AroTwoFixture extends CakeTestFixture {
|
|||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '2', 'alias' => 'managers', 'lft' => '6', 'rght' => '9'),
|
||||
array('parent_id' => 1, 'model' => 'Group', 'foreign_key' => '3', 'alias' => 'users', 'lft' => '10', 'rght' => '19'),
|
||||
array('parent_id' => 2, 'model' => 'User', 'foreign_key' => '1', 'alias' => 'Bobs', 'lft' => '3', 'rght' => '4'),
|
||||
array('parent_id' => 3, 'model' => 'User', 'foreign_key' => '2', 'alias' => 'Lumbergh', 'lft' => '7' , 'rght' => '8'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '3', 'alias' => 'Samir', 'lft' => '11' , 'rght' => '12'),
|
||||
array('parent_id' => 3, 'model' => 'User', 'foreign_key' => '2', 'alias' => 'Lumbergh', 'lft' => '7', 'rght' => '8'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '3', 'alias' => 'Samir', 'lft' => '11', 'rght' => '12'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '4', 'alias' => 'Micheal', 'lft' => '13', 'rght' => '14'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '5', 'alias' => 'Peter', 'lft' => '15', 'rght' => '16'),
|
||||
array('parent_id' => 4, 'model' => 'User', 'foreign_key' => '6', 'alias' => 'Milton', 'lft' => '17', 'rght' => '18'),
|
||||
|
|
|
@ -35,11 +35,11 @@ class FlagTreeFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer','key' => 'primary'),
|
||||
'name' => array('type' => 'string','null' => false),
|
||||
'id' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'name' => array('type' => 'string', 'null' => false),
|
||||
'parent_id' => 'integer',
|
||||
'lft' => array('type' => 'integer','null' => false),
|
||||
'rght' => array('type' => 'integer','null' => false),
|
||||
'flag' => array('type' => 'integer','null' => false, 'length' => 1, 'default' => 0)
|
||||
'lft' => array('type' => 'integer', 'null' => false),
|
||||
'rght' => array('type' => 'integer', 'null' => false),
|
||||
'flag' => array('type' => 'integer', 'null' => false, 'length' => 1, 'default' => 0)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -35,10 +35,10 @@ class NumberTreeFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer','key' => 'primary'),
|
||||
'name' => array('type' => 'string','null' => false),
|
||||
'id' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'name' => array('type' => 'string', 'null' => false),
|
||||
'parent_id' => 'integer',
|
||||
'lft' => array('type' => 'integer','null' => false),
|
||||
'rght' => array('type' => 'integer','null' => false)
|
||||
'lft' => array('type' => 'integer', 'null' => false),
|
||||
'rght' => array('type' => 'integer', 'null' => false)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -35,11 +35,11 @@ class NumberTreeTwoFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer','key' => 'primary'),
|
||||
'name' => array('type' => 'string','null' => false),
|
||||
'id' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'name' => array('type' => 'string', 'null' => false),
|
||||
'number_tree_id' => array('type' => 'integer', 'null' => false),
|
||||
'parent_id' => 'integer',
|
||||
'lft' => array('type' => 'integer','null' => false),
|
||||
'rght' => array('type' => 'integer','null' => false)
|
||||
'lft' => array('type' => 'integer', 'null' => false),
|
||||
'rght' => array('type' => 'integer', 'null' => false)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -34,10 +34,10 @@ class UnconventionalTreeFixture extends CakeTestFixture {
|
|||
* @var array
|
||||
*/
|
||||
public $fields = array(
|
||||
'id' => array('type' => 'integer','key' => 'primary'),
|
||||
'name' => array('type' => 'string','null' => false),
|
||||
'id' => array('type' => 'integer', 'key' => 'primary'),
|
||||
'name' => array('type' => 'string', 'null' => false),
|
||||
'join' => 'integer',
|
||||
'left' => array('type' => 'integer','null' => false),
|
||||
'right' => array('type' => 'integer','null' => false),
|
||||
'left' => array('type' => 'integer', 'null' => false),
|
||||
'right' => array('type' => 'integer', 'null' => false),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class CakeNumber {
|
|||
),
|
||||
'GBP' => array(
|
||||
'wholeSymbol' => '£', 'wholePosition' => 'before', 'fractionSymbol' => 'p', 'fractionPosition' => 'after',
|
||||
'zero' => 0, 'places' => 2, 'thousands' => ',', 'decimals' => '.', 'negative' => '()','escape' => false
|
||||
'zero' => 0, 'places' => 2, 'thousands' => ',', 'decimals' => '.', 'negative' => '()', 'escape' => false
|
||||
),
|
||||
'EUR' => array(
|
||||
'wholeSymbol' => '€', 'wholePosition' => 'before', 'fractionSymbol' => false, 'fractionPosition' => 'after',
|
||||
|
@ -58,7 +58,7 @@ class CakeNumber {
|
|||
*/
|
||||
protected static $_currencyDefaults = array(
|
||||
'wholeSymbol' => '', 'wholePosition' => 'before', 'fractionSymbol' => '', 'fractionPosition' => 'after',
|
||||
'zero' => '0', 'places' => 2, 'thousands' => ',', 'decimals' => '.','negative' => '()', 'escape' => true,
|
||||
'zero' => '0', 'places' => 2, 'thousands' => ',', 'decimals' => '.', 'negative' => '()', 'escape' => true,
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -317,7 +317,7 @@ class CakeNumber {
|
|||
$symbolKey = 'whole';
|
||||
$value = (float)$value;
|
||||
if (!$value) {
|
||||
if ($options['zero'] !== 0 ) {
|
||||
if ($options['zero'] !== 0) {
|
||||
return $options['zero'];
|
||||
}
|
||||
} elseif ($value < 1 && $value > -1) {
|
||||
|
|
|
@ -524,7 +524,7 @@ class String {
|
|||
}
|
||||
}
|
||||
|
||||
$truncate .= mb_substr($tag[3], 0 , $left + $entitiesLength);
|
||||
$truncate .= mb_substr($tag[3], 0, $left + $entitiesLength);
|
||||
break;
|
||||
} else {
|
||||
$truncate .= $tag[3];
|
||||
|
|
|
@ -480,7 +480,7 @@ class Helper extends Object {
|
|||
*/
|
||||
protected function _formatAttribute($key, $value, $escape = true) {
|
||||
if (is_array($value)) {
|
||||
$value = implode(' ' , $value);
|
||||
$value = implode(' ', $value);
|
||||
}
|
||||
if (is_numeric($key)) {
|
||||
return sprintf($this->_minimizedAttributeFormat, $value, $value);
|
||||
|
|
Loading…
Add table
Reference in a new issue