From 3070356e6944bea602cde728cf28fd2b283ff877 Mon Sep 17 00:00:00 2001 From: wapmorgan Date: Thu, 13 Jul 2017 15:28:45 +0300 Subject: [PATCH] Fix errors on php < 7 --- src/Russian/TimeUnitSpeller.php | 2 +- src/TimeUnitSpeller.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Russian/TimeUnitSpeller.php b/src/Russian/TimeUnitSpeller.php index ec118a0..e9a19e0 100644 --- a/src/Russian/TimeUnitSpeller.php +++ b/src/Russian/TimeUnitSpeller.php @@ -17,7 +17,7 @@ class TimeUnitSpeller extends \morphos\TimeUnitSpeller const AGO = 'назад'; const IN = 'через'; - const AND = 'и'; + const AND_WORD = 'и'; const JUST_NOW = 'только что'; diff --git a/src/TimeUnitSpeller.php b/src/TimeUnitSpeller.php index 1b99e43..7a8f5a2 100644 --- a/src/TimeUnitSpeller.php +++ b/src/TimeUnitSpeller.php @@ -15,7 +15,7 @@ abstract class TimeUnitSpeller const AGO = 'ago'; const IN = 'in'; - const AND = 'and'; + const AND_WORD = 'and'; const JUST_NOW = 'just now'; @@ -44,7 +44,7 @@ public static function spellInterval(DateInterval $interval, $options = 0) if ($options & self::SEPARATE && count($parts) > 1) { $last_part = array_pop($parts); - $spelled = implode(', ', $parts).' '.static::AND.' '.$last_part; + $spelled = implode(', ', $parts).' '.static::AND_WORD.' '.$last_part; } else $spelled = implode(' ', $parts);