Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

replace count() usage to empty() when possible #199

Merged
merged 2 commits into from
Aug 10, 2017

Conversation

samsonasik
Copy link
Contributor

@samsonasik samsonasik changed the title replace count() usage to empty when possible replace count() usage to empty() when possible Aug 8, 2017
@Ocramius Ocramius added this to the 3.4.0 milestone Aug 10, 2017
@Ocramius Ocramius self-assigned this Aug 10, 2017
@@ -124,7 +124,7 @@ public function __invoke(array $args)
*/
private function parseArgs(array $args)
{
if (! count($args)) {
if (empty($args)) {
Copy link
Member

Choose a reason for hiding this comment

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

Can be replaced with if ($args) {

@@ -140,7 +140,7 @@ private function parseArgs(array $args)
$arg1 = array_shift($args);
}

if (! count($args)) {
if (empty($args)) {
Copy link
Member

Choose a reason for hiding this comment

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

Can be replaced with if ($args) {

@@ -104,7 +104,7 @@ public function __invoke(array $args)
*/
private function parseArgs(array $args)
{
if (! count($args)) {
if (empty($args)) {
Copy link
Member

Choose a reason for hiding this comment

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

Can be replaced with if ($args) {

@Ocramius Ocramius assigned samsonasik and unassigned Ocramius Aug 10, 2017
@samsonasik
Copy link
Contributor Author

@Ocramius I've updated empty($args) with ! $args

@Ocramius
Copy link
Member

LGTM 👍

@Ocramius Ocramius merged commit 087ea0d into zendframework:develop Aug 10, 2017
@samsonasik samsonasik deleted the count-improve branch August 10, 2017 13:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants