Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply PHPCS 2.x autofixers #30

Merged
merged 4 commits into from
Jan 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ public function testConstruct()
'featured' => '47',
'categories' => array(14 => '48'),
'category' => array (20 => '49'))
), $this->object->get('lookup'));
), $this->object->get('lookup')
);
}

/**
Expand All @@ -110,7 +111,7 @@ public function testConstruct()
public function casesPreprocess()
{
$cases = array();

// Check direct link to a simple view
$cases[] = array(array('option' => 'com_content', 'view' => 'featured'),
array('option' => 'com_content', 'view' => 'featured', 'Itemid' => '47'));
Expand Down Expand Up @@ -225,8 +226,9 @@ public function testBuildLookup()
'featured' => '47',
'categories' => array(14 => '48'),
'category' => array (20 => '49'))
), $this->object->get('lookup'));

), $this->object->get('lookup')
);

$this->object->runBuildLookUp('en-GB');
$this->assertEquals(array(
'*' => array(
Expand All @@ -237,6 +239,7 @@ public function testBuildLookup()
'featured' => '51',
'categories' => array(14 => '50'),
'category' => array (20 => '49'))
), $this->object->get('lookup'));
), $this->object->get('lookup')
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class JComponentRouterRulesMenuInspector extends JComponentRouterRulesMenu
{
/**
* Gets an attribute of the object
*
*
* @param string $key Attributename to return
*
* @return mixed Attributes of the object
Expand All @@ -32,7 +32,7 @@ public function get($key)

/**
* Sets an attribute of the object
*
*
* @param string $key Attributename to return
* @param mixed $value Value to be set
*
Expand All @@ -44,7 +44,7 @@ public function set($key, $value)
{
$this->$key = $value;
}

public function runBuildLookup($language = '*')
{
return $this->buildLookup($language);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class JComponentRouterRulesNomenuInspector extends JComponentRouterRulesNomenu
{
/**
* Gets an attribute of the object
*
*
* @param string $key Attributename to return
*
* @return mixed Attributes of the object
Expand All @@ -32,7 +32,7 @@ public function get($key)

/**
* Sets an attribute of the object
*
*
* @param string $key Attributename to return
* @param mixed $value Value to be set
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,104 +18,104 @@ class MockJComponentRouterRulesMenuMenuObject
{
/**
* Menuitems
*
*
* @var array
*/
protected $items = array();

/**
* Active menuitem
*
*
* @var integer
*/
public $active = 49;

/**
* Constructor for this object
*
*
* @since 3.4
*/
public function __construct()
{
$this->items[47] = (object) array(
'id' => '47',
'menutype' => 'testmenu',
'title' => 'Content Home',
'alias' => 'content-home',
'route' => 'content-home',
'link' => 'index.php?option=com_content&view=featured',
'type' => 'component',
'level' => '1',
'language' => '*',
'id' => '47',
'menutype' => 'testmenu',
'title' => 'Content Home',
'alias' => 'content-home',
'route' => 'content-home',
'link' => 'index.php?option=com_content&view=featured',
'type' => 'component',
'level' => '1',
'language' => '*',
'component_id' => '22',
'component' => 'com_content',
'parent_id' => '0',
'parent_id' => '0',
'query' => array('option' => 'com_content', 'view' => 'featured'));

$this->items[48] = (object) array(
'id' => '48',
'menutype' => 'testmenu',
'title' => 'Categories View',
'alias' => 'categories',
'route' => 'content-home/categories',
'link' => 'index.php?option=com_content&view=categories&id=14',
'type' => 'component',
'level' => '2',
'language' => '*',
'component_id' => '22',
'id' => '48',
'menutype' => 'testmenu',
'title' => 'Categories View',
'alias' => 'categories',
'route' => 'content-home/categories',
'link' => 'index.php?option=com_content&view=categories&id=14',
'type' => 'component',
'level' => '2',
'language' => '*',
'component_id' => '22',
'component' => 'com_content',
'parent_id' => '47',
'parent_id' => '47',
'query' => array('option' => 'com_content', 'view' => 'categories', 'id' => '14'));

$this->items[49] = (object) array(
'id' => '49',
'menutype' => 'testmenu',
'title' => 'Category View',
'alias' => 'category-view',
'route' => 'category-view',
'link' => 'index.php?option=com_content&view=category&id=20',
'type' => 'component',
'level' => '1',
'language' => '*',
'component_id' => '22',
'id' => '49',
'menutype' => 'testmenu',
'title' => 'Category View',
'alias' => 'category-view',
'route' => 'category-view',
'link' => 'index.php?option=com_content&view=category&id=20',
'type' => 'component',
'level' => '1',
'language' => '*',
'component_id' => '22',
'component' => 'com_content',
'parent_id' => '47',
'parent_id' => '47',
'query' => array('option' => 'com_content', 'view' => 'category', 'id' => '20'));

$this->items[50] = (object) array(
'id' => '50',
'menutype' => 'testmenu',
'title' => 'Categories View',
'alias' => 'categories',
'route' => 'content-home/categories',
'link' => 'index.php?option=com_content&view=categories&id=14',
'type' => 'component',
'level' => '2',
'language' => 'en-GB',
'component_id' => '22',
'id' => '50',
'menutype' => 'testmenu',
'title' => 'Categories View',
'alias' => 'categories',
'route' => 'content-home/categories',
'link' => 'index.php?option=com_content&view=categories&id=14',
'type' => 'component',
'level' => '2',
'language' => 'en-GB',
'component_id' => '22',
'component' => 'com_content',
'parent_id' => '47',
'parent_id' => '47',
'query' => array('option' => 'com_content', 'view' => 'categories', 'id' => '14'));

$this->items[51] = (object) array(
'id' => '51',
'menutype' => 'testmenu',
'title' => 'Content Home',
'alias' => 'content-home',
'route' => 'content-home',
'link' => 'index.php?option=com_content&view=featured',
'type' => 'component',
'level' => '1',
'language' => 'en-GB',
'component_id' => '22',
'id' => '51',
'menutype' => 'testmenu',
'title' => 'Content Home',
'alias' => 'content-home',
'route' => 'content-home',
'link' => 'index.php?option=com_content&view=featured',
'type' => 'component',
'level' => '1',
'language' => 'en-GB',
'component_id' => '22',
'component' => 'com_content',
'parent_id' => '0',
'parent_id' => '0',
'query' => array('option' => 'com_content', 'view' => 'featured'));
}

/**
* Gets the menu item set that fits the search array
*
*
* @param array $attributes Search criteria
* @param array $values Search criteria
*
Expand Down Expand Up @@ -164,7 +164,7 @@ public function getItems($attributes, $values)

/**
* Return the currently active menuitem
*
*
* @return object Menuitem
* @since 3.4
*/
Expand All @@ -175,9 +175,9 @@ public function getActive()

/**
* Return the default menuitem for the language
*
*
* @param string $language Language for the default
*
*
* @return object Menuitem
* @since 3.4
*/
Expand All @@ -187,7 +187,7 @@ public function getDefault($language = '*')
{
return $this->items[47];
}

if ($language == 'en-GB')
{
return $this->items[51];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class JComponentRouterBaseInspector extends JComponentRouterBase
{
/**
* Runs the protected createURI() method
*
*
* @param array $url valid inputs to the createURI() method
*
* @return object JUri object from the given parameters
Expand All @@ -29,13 +29,13 @@ public function get($key)
{
return $this->$key;
}

public function build(&$query)
{
}

public function parse(&$segments)
{

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class JComponentRouterViewInspector extends JComponentRouterView
{
/**
* Gets an attribute of the object
*
*
* @param string $key Attributename to return
*
* @return mixed Attributes of the object
Expand All @@ -32,7 +32,7 @@ public function get($key)

/**
* Sets an attribute of the object
*
*
* @param string $key Attributename to return
* @param mixed $value Value to be set
*
Expand All @@ -46,14 +46,14 @@ public function set($key, $value)
}

/**
* Get content items of the type category
*
* @param int $id ID of the category to load
*
* @return array Categories path identified by $id
*
* @since 3.4
*/
* Get content items of the type category
*
* @param int $id ID of the category to load
*
* @return array Categories path identified by $id
*
* @since 3.4
*/
public function getCategorySegment($id, $query)
{
$category = JCategories::getInstance($this->getName())->get($id);
Expand All @@ -67,28 +67,28 @@ public function getCategorySegment($id, $query)
}

/**
* Get content items of the type categories
*
* @param int $id ID of the category to load
*
* @return array Categories path identified by $id
*
* @since 3.4
*/
* Get content items of the type categories
*
* @param int $id ID of the category to load
*
* @return array Categories path identified by $id
*
* @since 3.4
*/
public function getCategoriesSegment($id, $query)
{
return $this->getCategorySegment($id, $query);
}

/**
* Get content items of the type article
*
* @param int $id ID of the article to load
*
* @return array article identified by $id
*
* @since 3.4
*/
* Get content items of the type article
*
* @param int $id ID of the article to load
*
* @return array article identified by $id
*
* @since 3.4
*/
public function getArticleSegment($id, $query)
{
return array((int) $id => $id);
Expand Down
Loading