Merge pull request #1186 from D-storm/scrutinizer
documentation & coding style issues fix
This commit is contained in:
commit
82ff185f39
@ -2938,8 +2938,9 @@ class PMA_Util
|
||||
// convert to lowercase just to be sure
|
||||
$type = strtolower(chop(substr($columnspec, 0, $first_bracket_pos)));
|
||||
} else {
|
||||
// Split trailing attributes such as unsigned, binary, zerofill and get data type name
|
||||
$type_parts = explode(' ',$columnspec);
|
||||
// Split trailing attributes such as unsigned,
|
||||
// binary, zerofill and get data type name
|
||||
$type_parts = explode(' ', $columnspec);
|
||||
$type = strtolower($type_parts[0]);
|
||||
$spec_in_brackets = '';
|
||||
}
|
||||
|
||||
@ -1262,6 +1262,7 @@ function PMA_getForeignData(
|
||||
}
|
||||
} // end if $foreigners
|
||||
|
||||
$foreignData = array();
|
||||
$foreignData['foreign_link'] = $foreign_link;
|
||||
$foreignData['the_total'] = isset($the_total) ? $the_total : null;
|
||||
$foreignData['foreign_display'] = (
|
||||
|
||||
@ -80,6 +80,7 @@ class PMA_BrowseForeignersTest extends PHPUnit_Framework_TestCase
|
||||
PMA_getHtmlForShowAll(null)
|
||||
);
|
||||
|
||||
$foreignData = array();
|
||||
$foreignData['disp_row'] = array();
|
||||
$GLOBALS['cfg']['ShowAll'] = false;
|
||||
|
||||
@ -119,6 +120,7 @@ class PMA_BrowseForeignersTest extends PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$_REQUEST['pos'] = 15;
|
||||
$foreignData = array();
|
||||
$foreignData['disp_row'] = array();
|
||||
$foreignData['the_total'] = 5;
|
||||
|
||||
@ -258,9 +260,10 @@ class PMA_BrowseForeignersTest extends PHPUnit_Framework_TestCase
|
||||
$db = '';
|
||||
$table = '';
|
||||
$field = 'foo';
|
||||
$foreignData = array();
|
||||
$foreignData['disp_row'] = '';
|
||||
$fieldkey = 'bar';
|
||||
$data = '';
|
||||
$data = array();
|
||||
$_REQUEST['rownumber'] = 1;
|
||||
$_REQUEST['foreign_filter'] = '5';
|
||||
$result = PMA_getHtmlForRelationalFieldSelection(
|
||||
|
||||
@ -720,6 +720,7 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
|
||||
$column['True_Type'] = '';
|
||||
$column['Field'] = 'f';
|
||||
$foreigners['f'] = true;
|
||||
$foreignData = array();
|
||||
$foreignData['foreign_link'] = '';
|
||||
$this->assertEquals(
|
||||
'4',
|
||||
@ -773,6 +774,7 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testDispRowForeignData()
|
||||
{
|
||||
$foreignData = array();
|
||||
$foreignData['disp_row'] = array();
|
||||
$foreignData['foreign_field'] = null;
|
||||
$foreignData['foreign_display'] = null;
|
||||
@ -822,7 +824,8 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertTag(
|
||||
PMA_getTagArray(
|
||||
'<textarea name="fieldsb" class="char" maxlength="10" rows="5" cols="1" dir="abc/" '
|
||||
'<textarea name="fieldsb" class="char" '
|
||||
. 'maxlength="10" rows="5" cols="1" dir="abc/" '
|
||||
. 'id="field_1_3" tabindex="2">',
|
||||
array('content' => 'foobar')
|
||||
),
|
||||
@ -1195,7 +1198,8 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals(
|
||||
"\na\n"
|
||||
. '<textarea name="fieldsb" class="char" maxlength="255" rows="5" cols="1" dir="/" '
|
||||
. '<textarea name="fieldsb" class="char" '
|
||||
. 'maxlength="255" rows="5" cols="1" dir="/" '
|
||||
. 'id="field_1_3" c tabindex="3"></textarea><br /><input type="file" '
|
||||
. 'name="fields_uploadfoo[123]" class="textfield" id="field_1_3" '
|
||||
. 'size="10" c/> (Max: 64KiB)' . "\n",
|
||||
@ -1341,7 +1345,8 @@ class PMA_InsertEditTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals(
|
||||
"a\n\na\n"
|
||||
. '<textarea name="fieldsb" class="char" maxlength="25" rows="5" cols="1" dir="/" '
|
||||
. '<textarea name="fieldsb" class="char" '
|
||||
. 'maxlength="25" rows="5" cols="1" dir="/" '
|
||||
. 'id="field_1_3" c tabindex="34"><</textarea>',
|
||||
$result
|
||||
);
|
||||
|
||||
@ -146,7 +146,7 @@ class PMA_TblGisVisualizaionTest extends PHPUnit_Framework_TestCase
|
||||
$sql_query = "sql_query";
|
||||
$visualization = "visualization";
|
||||
$svg_support = array();
|
||||
$data = "data";
|
||||
$data = array();
|
||||
|
||||
$html = PMA_getHtmlForGisVisualization(
|
||||
$url_params, $labelCandidates, $spatialCandidates,
|
||||
|
||||
@ -38,15 +38,15 @@ class PMA_TRI_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test for PMA_TRI_getEditorForm
|
||||
*
|
||||
* @param string $data Data for trigger
|
||||
* @param array $matcher Matcher
|
||||
* @param array $data Data for trigger
|
||||
* @param array $matcher Matcher
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider provider_add
|
||||
* @dataProvider providerAdd
|
||||
* @group medium
|
||||
*/
|
||||
public function testgetEditorForm_add($data, $matcher)
|
||||
public function testGetEditorFormAdd($data, $matcher)
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = false;
|
||||
PMA_TRI_setGlobals();
|
||||
@ -54,11 +54,11 @@ class PMA_TRI_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider for testgetEditorForm_add
|
||||
* Provider for testGetEditorFormAdd
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provider_add()
|
||||
public function providerAdd()
|
||||
{
|
||||
$data = array(
|
||||
'item_name' => '',
|
||||
@ -149,15 +149,15 @@ class PMA_TRI_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test for PMA_TRI_getEditorForm
|
||||
*
|
||||
* @param string $data Data for trigger
|
||||
* @param array $matcher Matcher
|
||||
* @param array $data Data for trigger
|
||||
* @param array $matcher Matcher
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider provider_edit
|
||||
* @dataProvider providerEdit
|
||||
* @group medium
|
||||
*/
|
||||
public function testgetEditorForm_edit($data, $matcher)
|
||||
public function testGetEditorFormEdit($data, $matcher)
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = false;
|
||||
PMA_TRI_setGlobals();
|
||||
@ -165,11 +165,11 @@ class PMA_TRI_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider for testgetEditorForm_edit
|
||||
* Provider for testGetEditorFormEdit
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provider_edit()
|
||||
public function providerEdit()
|
||||
{
|
||||
$data = array(
|
||||
'item_name' => 'foo',
|
||||
@ -260,14 +260,14 @@ class PMA_TRI_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* Test for PMA_TRI_getEditorForm
|
||||
*
|
||||
* @param string $data Data for trigger
|
||||
* @param array $matcher Matcher
|
||||
* @param array $data Data for trigger
|
||||
* @param array $matcher Matcher
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @dataProvider provider_ajax
|
||||
* @dataProvider providerAjax
|
||||
*/
|
||||
public function testgetEditorForm_ajax($data, $matcher)
|
||||
public function testGetEditorFormAjax($data, $matcher)
|
||||
{
|
||||
$GLOBALS['is_ajax_request'] = true;
|
||||
PMA_TRI_setGlobals();
|
||||
@ -275,11 +275,11 @@ class PMA_TRI_GetEditorForm_Test extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* Provider for testgetEditorForm_ajax
|
||||
* Provider for testGetEditorFormAjax
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provider_ajax()
|
||||
public function providerAjax()
|
||||
{
|
||||
$data = array(
|
||||
'item_name' => 'foo',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user