Skip to content

Commit

Permalink
Use empty to check for empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
mleko committed Aug 28, 2017
1 parent c382fbf commit bfa4889
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MistakeChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ class MistakeChecker
*/
public function __construct(array $rules = null)
{
$this->rules = null === $rules ? static::$possibleMistakes : $rules;
$this->rules = null === $rules ? self::$possibleMistakes : $rules;
}

public function checkForMistakes($composerJson, Output $output)
{
$mistakes = array_intersect_key($this->rules, (array)$composerJson);
if (!$mistakes) {
if (empty($mistakes)) {
return;
}
$output->write("Potential mistakes have been found\n");
Expand Down

0 comments on commit bfa4889

Please sign in to comment.