From f8c3363de39a2def361da2c7fa271f7f0cfd8af0 Mon Sep 17 00:00:00 2001 From: MarkBaker Date: Wed, 17 Aug 2016 00:36:24 +0100 Subject: [PATCH] Fix some Case-sensitivity problems --- src/PhpSpreadsheet/Shared/Date.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/PhpSpreadsheet/Shared/Date.php b/src/PhpSpreadsheet/Shared/Date.php index 48fc6377e2..00d3108ef7 100644 --- a/src/PhpSpreadsheet/Shared/Date.php +++ b/src/PhpSpreadsheet/Shared/Date.php @@ -112,7 +112,7 @@ public static function getExcelCalendar() /** * Set the Default timezone to use for dates * - * @param string|\DateTimeZone $timezone The timezone to set for all Excel datetimestamp to PHP DateTime Object conversions + * @param string|\DateTimeZone $timeZone The timezone to set for all Excel datetimestamp to PHP DateTime Object conversions * @return boolean Success or failure * @throws \Exception */ @@ -141,7 +141,7 @@ public static function getDefaultTimezone() /** * Validate a timezone * - * @param string|\DateTimeZone $timezone The timezone to validate, either as a timezone string or object + * @param string|\DateTimeZone $timeZone The timezone to validate, either as a timezone string or object * @return \DateTimeZone The timezone as a timezone object * @throws \Exception */ @@ -158,8 +158,8 @@ protected static function validateTimeZone($timeZone) /** * Convert a MS serialized datetime value from Excel to a PHP Date/Time object * - * @param integer|float $dateValue MS Excel serialized date/time value - * @param \DateTimeZone|string|null $timezone The timezone to assume for the Excel timestamp, + * @param integer|float $excelTimestamp MS Excel serialized date/time value + * @param \DateTimeZone|string|null $timeZone The timezone to assume for the Excel timestamp, * if you don't want to treat it as a UTC value * Use the default (UST) unless you absolutely need a conversion * @return \DateTime PHP date/time object @@ -196,8 +196,8 @@ public static function excelToDateTimeObject($excelTimestamp = 0, $timeZone = nu /** * Convert a MS serialized datetime value from Excel to a unix timestamp * - * @param integer|float $dateValue MS Excel serialized date/time value - * @param \DateTimeZone|string|null $timezone The timezone to assume for the Excel timestamp, + * @param integer|float $excelTimestamp MS Excel serialized date/time value + * @param \DateTimeZone|string|null $timeZone The timezone to assume for the Excel timestamp, * if you don't want to treat it as a UTC value * Use the default (UST) unless you absolutely need a conversion * @return integer Unix timetamp for this date/time @@ -212,16 +212,16 @@ public static function excelToTimestamp($excelTimestamp = 0, $timeZone = null) /** * Convert a date from PHP to an MS Excel serialized date/time value * - * @param mixed $dateValue PHP serialized date/time or date object + * @param mixed $dateValue Unix Timestamp or PHP DateTime object or a string * @return float|boolean Excel date/time value * or boolean FALSE on failure */ public static function PHPToExcel($dateValue = 0) { if ((is_object($dateValue)) && ($dateValue instanceof \DateTimeInterface)) { - return self::DateTimeToExcel($dateValue); + return self::dateTimeToExcel($dateValue); } elseif (is_numeric($dateValue)) { - return self::TimestampToExcel($dateValue); + return self::timestampToExcel($dateValue); } elseif (is_string($dateValue)) { return self::stringToExcel($dateValue); } @@ -230,7 +230,7 @@ public static function PHPToExcel($dateValue = 0) } /** - * Convert a DateTime object to an MS Excel serialized date/time value + * Convert a PHP DateTime object to an MS Excel serialized date/time value * * @param \DateTimeInterface $dateValue PHP DateTime object * @return float MS Excel serialized date/time value @@ -250,7 +250,7 @@ public static function dateTimeToExcel(\DateTimeInterface $dateValue = null) /** * Convert a Unix timestamp to an MS Excel serialized date/time value * - * @param \DateTimeInterface $dateValue PHP DateTime object + * @param \DateTimeInterface $dateValue Unix Timestamp * @return float MS Excel serialized date/time value */ public static function timestampToExcel($dateValue = 0) @@ -258,7 +258,7 @@ public static function timestampToExcel($dateValue = 0) if (!is_numeric($dateValue)) { return false; } - return self::DateTimeToExcel(new \DateTime('@' . $dateValue)); + return self::dateTimeToExcel(new \DateTime('@' . $dateValue)); } /**