Page MenuHomeDevCentral

D1637.id4178.diff
No OneTemporary

D1637.id4178.diff

diff --git a/src/Reflection/CodeFile.php b/src/Reflection/CodeFile.php
--- a/src/Reflection/CodeFile.php
+++ b/src/Reflection/CodeFile.php
@@ -2,49 +2,7 @@
namespace Keruald\OmniTools\Reflection;
-class CodeFile {
-
- /**
- * @var string
- */
- private $filename;
-
- ///
- /// Constructors
- ///
-
- public static function from (string $filename) : self {
- $instance = new self;
- $instance->filename = $filename;
-
- return $instance;
- }
-
- ///
- /// Getters and setters
- ///
-
- public function getFilename () : string {
- return $this->filename;
- }
-
- public function setFilename (string $filename) : self {
- $this->filename = $filename;
-
- return $this;
- }
-
- ///
- /// File properties methods
- ///
-
- public function exists () : bool {
- return file_exists($this->filename);
- }
-
- public function isReadable () : bool {
- return is_readable($this->filename);
- }
+class CodeFile extends File {
///
/// Include methods
@@ -55,7 +13,7 @@
return false;
}
- include($this->filename);
+ include($this->getFilename());
return true;
}
diff --git a/src/Reflection/CodeFile.php b/src/Reflection/File.php
copy from src/Reflection/CodeFile.php
copy to src/Reflection/File.php
--- a/src/Reflection/CodeFile.php
+++ b/src/Reflection/File.php
@@ -2,7 +2,7 @@
namespace Keruald\OmniTools\Reflection;
-class CodeFile {
+class File {
/**
* @var string

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 14:45 (4 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2260418
Default Alt Text
D1637.id4178.diff (1 KB)

Event Timeline