Merge pull request #457 from marc1706/ticket/456
[ticket/456] Modify files for passing code sniffer
This commit is contained in:
@@ -116,7 +116,6 @@ class main
|
|||||||
|
|
||||||
if (!function_exists('obtain_portal_config'))
|
if (!function_exists('obtain_portal_config'))
|
||||||
{
|
{
|
||||||
include($this->includes_path . 'functions_modules' . $this->php_ext);
|
|
||||||
include($this->includes_path . 'functions' . $this->php_ext);
|
include($this->includes_path . 'functions' . $this->php_ext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,18 +7,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @codingStandardsIgnoreStart
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
|
* @codingStandardsIgnoreFile
|
||||||
*/
|
*/
|
||||||
if (!defined('IN_PHPBB'))
|
if (!defined('IN_PHPBB'))
|
||||||
{
|
{
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// @codingStandardsIgnoreEnd
|
|
||||||
|
|
||||||
// Get portal config
|
// Get portal config
|
||||||
function obtain_portal_config()
|
function obtain_portal_config()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package Board3 Portal v2.1
|
|
||||||
* @copyright (c) 2013 Board3 Group ( www.board3.de )
|
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
// @codingStandardsIgnoreStart
|
|
||||||
/**
|
|
||||||
* @ignore
|
|
||||||
*/
|
|
||||||
if (!defined('IN_PHPBB'))
|
|
||||||
{
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// @codingStandardsIgnoreEnd
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert column number to string equivalent
|
|
||||||
*
|
|
||||||
* @param int $column Column number
|
|
||||||
*
|
|
||||||
* @return string String representation of column number; default: ''
|
|
||||||
* @deprecated 2.1.0-RC1 (to be removed: 2.1.0)
|
|
||||||
*/
|
|
||||||
function column_num_string($column)
|
|
||||||
{
|
|
||||||
$portal_columns = new \board3\portal\portal\columns();
|
|
||||||
return $portal_columns->number_to_string($column);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert column string to equivalent number
|
|
||||||
*
|
|
||||||
* @param string $column Column name
|
|
||||||
*
|
|
||||||
* @return int The column number; default: 0
|
|
||||||
* @deprecated 2.1.0-RC1 (to be removed: 2.1.0)
|
|
||||||
*/
|
|
||||||
function column_string_num($column)
|
|
||||||
{
|
|
||||||
$portal_columns = new \board3\portal\portal\columns();
|
|
||||||
return $portal_columns->string_to_number($column);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Convert column string to equivalent constant
|
|
||||||
*
|
|
||||||
* @param string $column Column name
|
|
||||||
*
|
|
||||||
* @return int Column constant; default: 0
|
|
||||||
* @deprecated 2.1.0-RC1 (to be removed: 2.1.0)
|
|
||||||
*/
|
|
||||||
function column_string_const($column)
|
|
||||||
{
|
|
||||||
$portal_columns = new \board3\portal\portal\columns();
|
|
||||||
return $portal_columns->string_to_constant($column);
|
|
||||||
}
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @package Board3 Portal testing
|
|
||||||
* @copyright (c) Board3 Group ( www.board3.de )
|
|
||||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
require_once(dirname(__FILE__) . '/../../../includes/functions_modules.php');
|
|
||||||
|
|
||||||
class phpbb_functions_functions_modules_test extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
public function data_column_num_string()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array('', ''),
|
|
||||||
array('', false),
|
|
||||||
array('left', 1),
|
|
||||||
array('center', 2),
|
|
||||||
array('right', 3),
|
|
||||||
array('top', 4),
|
|
||||||
array('bottom', 5),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider data_column_num_string
|
|
||||||
*/
|
|
||||||
public function test_column_num_string($expected, $input)
|
|
||||||
{
|
|
||||||
$this->assertEquals($expected, column_num_string($input));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function data_column_string_num()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array(0, ''),
|
|
||||||
array(0, false),
|
|
||||||
array(1, 'left'),
|
|
||||||
array(2, 'center'),
|
|
||||||
array(3, 'right'),
|
|
||||||
array(4, 'top'),
|
|
||||||
array(5, 'bottom'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider data_column_string_num
|
|
||||||
*/
|
|
||||||
public function test_column_string_num($expected, $input)
|
|
||||||
{
|
|
||||||
$this->assertEquals($expected, column_string_num($input));
|
|
||||||
}
|
|
||||||
|
|
||||||
public function data_column_string_const()
|
|
||||||
{
|
|
||||||
return array(
|
|
||||||
array(0, ''),
|
|
||||||
array(0, ''),
|
|
||||||
array(2, 'left'),
|
|
||||||
array(4, 'center'),
|
|
||||||
array(8, 'right'),
|
|
||||||
array(1, 'top'),
|
|
||||||
array(16, 'bottom'),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dataProvider data_column_string_const
|
|
||||||
*/
|
|
||||||
public function test_column_string_const($expected, $input)
|
|
||||||
{
|
|
||||||
$this->assertEquals($expected, column_string_const($input));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user