improve coding style

This commit is contained in:
Dieter Adriaenssens 2013-01-15 20:42:18 +01:00
parent df4c535d06
commit 95068b4983
2 changed files with 6 additions and 4 deletions

View File

@ -87,8 +87,7 @@ class PMA_NodeFactory
$name = 'default',
$type = Node::OBJECT,
$is_group = false
)
{
) {
$class = self::_sanitizeClass($class);
include_once sprintf(self::$_path, $class);
return new $class($name, $type, $is_group);

View File

@ -19,7 +19,8 @@ class NodeFactory_test extends PHPUnit_Framework_TestCase
$GLOBALS['token'] = 'token';
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
if (! function_exists('__')) {
function __($str) {
function __($str)
{
return $str;
}
}
@ -43,7 +44,9 @@ class NodeFactory_test extends PHPUnit_Framework_TestCase
public function testGroupContainer()
{
$node = PMA_NodeFactory::getInstance('Node', 'default', Node::CONTAINER, true);
$node = PMA_NodeFactory::getInstance(
'Node', 'default', Node::CONTAINER, true
);
$this->assertEquals('default', $node->name);
$this->assertEquals(Node::CONTAINER, $node->type);
$this->assertEquals(true, $node->is_group);