Skip to content

Conversation

@frankmayer
Copy link
Contributor

@frankmayer frankmayer commented Dec 13, 2016

Summary of Changes

  • Simplified some ternary operations with elvis operator

This PR is part of a set to try to separate some of the changes done in some of my previous batch PR's for site/components, which are still on hold (#12290, #12292, #12293, #12294).

Testing Instructions

None, should not change behavior

Documentation Changes Required

None.

@andrepereiradasilva
Copy link
Contributor

I have tested this item ✅ successfully on 414f378

code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13185.

@alikon
Copy link
Contributor

alikon commented Dec 13, 2016

I have tested this item ✅ successfully on 414f378

on code review


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13185.

@jeckodevelopment
Copy link
Member

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13185.

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Dec 13, 2016
@jeckodevelopment jeckodevelopment added this to the Joomla 3.7.0 milestone Dec 13, 2016
…nent

# Conflicts:
#	components/com_config/model/cms.php
#	components/com_content/views/archive/tmpl/default_items.php
#	components/com_content/views/article/tmpl/default_links.php
@frankmayer
Copy link
Contributor Author

Conflicts resolved. Could you pls review and merge if OK?

@wilsonge wilsonge merged commit 471db2f into joomla:staging Dec 15, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Dec 15, 2016
@frankmayer frankmayer deleted the simplify-ternary-with-elvis-in-site-component branch December 15, 2016 21:37
}

$method = $input->get('method') ? $input->get('method') : 'get';
$method = $input->get('method') ?: 'get';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to point out that there is no need for a ternary / elvis operator here at all. The method should be retrieved / set via the second parameter (default) that can be passed to the get method of JInput.
get(string $name, mixed $default = null, string $filter = 'cmd') : mixed

I would do a PR for that, if there are no objections.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matrikular Of course 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants