Skip to content

Commit

Permalink
Trim ignore data
Browse files Browse the repository at this point in the history
  • Loading branch information
bruli committed Feb 27, 2016
1 parent e997f44 commit 78645e2
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/IgnoreFiles/Infrastructure/Disk/FileReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,24 @@ private function fileExists()
*/
private function getFileContent()
{
return file($this->file);
$content = file($this->file);

return $this->trimContent($content);
}

/**
* @param array $contentData
*
* @return array
*/
private function trimContent(array $contentData)
{
$data = [];

foreach ($contentData as $item) {
$data[] = trim($item);
}

return $data;
}
}

0 comments on commit 78645e2

Please sign in to comment.