|
@@ -41,14 +41,14 @@ class CsvFileLoader extends ArrayLoader implements LoaderInterface
|
|
|
|
|
|
try {
|
|
try {
|
|
$file = new \SplFileObject($resource, 'rb');
|
|
$file = new \SplFileObject($resource, 'rb');
|
|
- } catch(\RuntimeException $e) {
|
|
|
|
|
|
+ } catch (\RuntimeException $e) {
|
|
throw new \InvalidArgumentException(sprintf('Error opening file "%s".', $resource));
|
|
throw new \InvalidArgumentException(sprintf('Error opening file "%s".', $resource));
|
|
}
|
|
}
|
|
|
|
|
|
$file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY);
|
|
$file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::SKIP_EMPTY);
|
|
$file->setCsvControl($this->delimiter, $this->enclosure, $this->escape);
|
|
$file->setCsvControl($this->delimiter, $this->enclosure, $this->escape);
|
|
|
|
|
|
- foreach($file as $data) {
|
|
|
|
|
|
+ foreach ($file as $data) {
|
|
if (substr($data[0], 0, 1) === '#') {
|
|
if (substr($data[0], 0, 1) === '#') {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|