Skip to content

Commit

Permalink
refacotring based on comments in #10 pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
enygma committed Jun 12, 2018
1 parent 5bc6008 commit f36470a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,9 @@ private function parseKeyValue($raw_line)
*/
public function getContent($keyName = null)
{
if ($keyName !== null) {
if (!is_null($keyName)) {
return (array_key_exists($keyName, $this->lines)) ? $this->lines[$keyName] : null;
} else {
return $this->lines;
}
return $this->lines;
}
}

0 comments on commit f36470a

Please sign in to comment.