From 977b9bbb804eda74ad2d819d1de082933dd0bb08 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 2 Dec 2020 00:49:26 +0100 Subject: [PATCH] Continued: - added some type-hints for primitive variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../file_directories/text/input/csv/class_CsvInputFile.php | 4 ++-- .../main/interfaces/io/file/csv/class_CsvInputStreamer.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.39.2