Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3750668
D1637.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D1637.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 02:36 (20 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2250125
Default Alt Text
D1637.diff (1 KB)
Attached To
Mode
D1637: Split CodeFile into CodeFile and File classes
Attached
Detach File
Event Timeline
Log In to Comment