From: Roland Häder Date: Tue, 1 Dec 2020 23:49:26 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=977b9bbb804eda74ad2d819d1de082933dd0bb08;p=core.git Continued: - added some type-hints for primitive variables Signed-off-by: Roland Häder --- diff --git a/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php b/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php index cd8745f6..d4c84ae6 100644 --- a/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php +++ b/framework/main/classes/file_directories/text/input/csv/class_CsvInputFile.php @@ -67,7 +67,7 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer { * @param $columnSeparator Character to use separting columns * @return $lineArray An indexed array with the read line */ - public function readCsvFileLine ($columnSeparator) { + public function readCsvFileLine (string $columnSeparator) { // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] columnSeparator=%s - CALLED!', __METHOD__, __LINE__, $columnSeparator)); @@ -94,7 +94,7 @@ class CsvInputFile extends BaseInputTextFile implements CsvInputStreamer { * @param $columnSeparator Character to use separting columns * @return $lineArray An indexed array with the read line */ - private function parseDataToIndexedArray ($data, $columnSeparator) { + private function parseDataToIndexedArray (string $data, string $columnSeparator) { // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('[%s:%d:] data()=%d,columnSeparator=%s - CALLED!', __METHOD__, __LINE__, strlen($data), $columnSeparator)); diff --git a/framework/main/interfaces/io/file/csv/class_CsvInputStreamer.php b/framework/main/interfaces/io/file/csv/class_CsvInputStreamer.php index df7c8564..30267c1e 100644 --- a/framework/main/interfaces/io/file/csv/class_CsvInputStreamer.php +++ b/framework/main/interfaces/io/file/csv/class_CsvInputStreamer.php @@ -34,6 +34,6 @@ interface CsvInputStreamer extends FileInputStreamer { * @param $columnSeparator Character to use separting columns * @return $lineArray An index array with the read line */ - function readCsvFileLine ($columnSeparator); + function readCsvFileLine (string $columnSeparator); }