private function openLogfile(): string
    {
        $logfileName = $this->getLogfileName();
        $pathToLogfile = $this->logsDir . $logfileName;
        if (!file_exists($pathToLogfile)) {
            $openedMsg = sprintf('[ %s ] Logfile opened', date('Y-m-d H:i:s')) . PHP_EOL;
            file_put_contents($pathToLogfile, $openedMsg);
        }
        return $pathToLogfile;
    }
private function openLogfile(): string
    {
        $logfileName = $this->getLogfileName();
        $pathToLogfile = $this->logsDir . $logfileName;
        if (!file_exists($pathToLogfile)) {
            $openedMsg = sprintf('[ %s ] Logfile opened', date('Y-m-d H:i:s')) . PHP_EOL;
            file_put_contents($pathToLogfile, $openedMsg);
        }
        return $pathToLogfile;
    }
private function openLogfile ( ) : string { $ logfileName = $ this -> getLogfileName ( ) ; $ pathToLogfile = $ this -> logsDir . $ logfileName ; if ( ! file_exists ( $ pathToLogfile ) ) { $ openedMsg = sprintf ( '[ %s ] Logfile opened' , date ( 'Y-m-d H:i:s' ) ) . PHP_EOL ; file_put_contents ( $ pathToLogfile , $ openedMsg ) ; } return $ pathToLogfile ; }
Creates new logfile if not yet existing.

@return string
Creates new logfile if not yet existing .