diff --git a/lib/filesystem/FileType.php b/lib/filesystem/FileType.php index 60bfa441eab99b36d475d4a751f73ce503b674d6..003ee856a9ac46120dd80214953526f61860a1b3 100644 --- a/lib/filesystem/FileType.php +++ b/lib/filesystem/FileType.php @@ -2,14 +2,6 @@ interface FileType { - /** - * StandardFile constructor. - * @param $fileref - * @param null $file : (optional) Is set if fileref and file are both new and not connected with - * each other in the database. - */ - public function __construct($fileref, $file = null); - /** * Returns the name of the icon shape that shall be used with the FileType implementation. * diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 3fe3672e723691029c7502d9157aa713da393219..5c9b5e8b76ea4c8812319c4084d4951a3231cd2b 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -12,7 +12,7 @@ * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 * @category Stud.IP */ -class StandardFile implements FileType, ArrayAccess +class StandardFile implements FileType, ArrayAccess, StandardFileInterface { /** diff --git a/lib/filesystem/StandardFileInterface.php b/lib/filesystem/StandardFileInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..a246550538c8d8e34d77972b1332a659b9782738 --- /dev/null +++ b/lib/filesystem/StandardFileInterface.php @@ -0,0 +1,11 @@ +<?php +interface StandardFileInterface +{ + /** + * StandardFile constructor. + * @param $fileref + * @param null $file : (optional) Is set if fileref and file are both new and not connected with + * each other in the database. + */ + public function __construct($fileref, $file = null); +} diff --git a/lib/filesystem/UnknownFileType.php b/lib/filesystem/UnknownFileType.php index c8df875fe09e46cbf1dd9274868e212aeab2cd3a..effe75178de1083e10838c0fa7a509be711677e9 100644 --- a/lib/filesystem/UnknownFileType.php +++ b/lib/filesystem/UnknownFileType.php @@ -20,7 +20,7 @@ class UnknownFileType implements FileType, ArrayAccess */ protected $fileref = null; - public function __construct($fileref = null, $file = null) + public function __construct($fileref = null) { $this->fileref = $fileref; }