// Import framework stuff
use Org\Mxchange\CoreFramework\Filesystem\File\BaseAbstractFile;
+use Org\Mxchange\CoreFramework\Generic\FrameworkInterface;
use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException;
// Import SPL stuff
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
* @param $className Name of the class
* @return void
*/
- protected function __construct ($className) {
+ protected function __construct (string $className) {
// Call parent constructor
parent::__construct($className);
}
*/
public function determineSeekPosition () {
// Not possible in text files
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
}
/**
* @param $whence Added to offset (default: only use offset to seek to)
* @return $status Status of file seek: 0 = success, -1 = failed
*/
- public function seek ($offset, $whence = SEEK_SET) {
+ public function seek (int $offset, int $whence = SEEK_SET) {
// Not possible in text files
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] offset=' . $offset . ',whence=' . $whence);
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEXT-FILE: offset=' . $offset . ',whence=' . $whence);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
}
/**
* This class (or its implementations) are special file readers/writers.
* There is no need to read/write the whole file.
*/
- self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] infoInstance=' . $infoInstance);
- throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
+ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEXT-FILE: infoInstance=' . $infoInstance);
+ throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION);
}
}