summaryrefslogtreecommitdiff
path: root/src/File
diff options
context:
space:
mode:
Diffstat (limited to 'src/File')
-rw-r--r--src/File/Handler.php20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/File/Handler.php b/src/File/Handler.php
index 61c78a8..eecedc0 100644
--- a/src/File/Handler.php
+++ b/src/File/Handler.php
@@ -1,6 +1,6 @@
<?php
-namespace App\File\Handler;
+namespace App\File;
use Exception;
@@ -11,14 +11,13 @@ class Handler
{
protected $filename;
protected $file;
- protected $array;
/**
* Check file can be read
* Read and parse file into array
*
* @author Phil Burton <phil@pgburton.com>
- * @param string $filename [description]
+ * @param string $filename string
*/
public function __construct(string $filename)
{
@@ -26,7 +25,8 @@ class Handler
if (!is_readable($filename)) {
throw new Exception('Cannot read from file: ' . $filename);
}
- $this->load;
+
+ $this->load();
}
/**
@@ -40,17 +40,13 @@ class Handler
}
/**
- * Parse file and return array
+ * Retun the raw file contents
*
* @author Phil Burton <phil@pgburton.com>
- * @return array
+ * @return string
*/
- public function getVendorArray(): array
+ public function getFileContents(): string
{
- if (!$this->array) {
- $this->array = [];
- }
-
- return $this->array;
+ return $this->file;
}
}