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

Commit 087ea0d

Browse files
authored
Merge pull request #199 from samsonasik/count-improve
replace count() usage to empty() when possible
2 parents 1afca73 + 997b5b1 commit 087ea0d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Tool/ConfigDumperCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function __invoke(array $args)
124124
*/
125125
private function parseArgs(array $args)
126126
{
127-
if (! count($args)) {
127+
if (! $args) {
128128
return $this->createHelpArgument();
129129
}
130130

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

143-
if (! count($args)) {
143+
if (! $args) {
144144
return $this->createErrorArgument('Missing class name');
145145
}
146146

src/Tool/FactoryCreatorCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function __invoke(array $args)
104104
*/
105105
private function parseArgs(array $args)
106106
{
107-
if (! count($args)) {
107+
if (! $args) {
108108
return $this->createArguments(self::COMMAND_HELP);
109109
}
110110

0 commit comments

Comments
 (0)