Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/briannesbitt/Carbon into 3.x
Browse files Browse the repository at this point in the history
� Conflicts:
�	tests/Carbon/LocalizationTest.php
�	tests/CarbonImmutable/LocalizationTest.php
  • Loading branch information
kylekatarnls committed May 17, 2020
2 parents 223d3ba + 06d48c6 commit c93e4f6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
An international PHP extension for DateTime. [http://carbon.nesbot.com](http://carbon.nesbot.com)

```php
<?php

use Carbon\Carbon;

printf("Right now is %s", Carbon::now()->toDateTimeString());
Expand Down
3 changes: 2 additions & 1 deletion src/Carbon/Traits/Localization.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ public static function getTranslationMessageWith($translator, string $key, strin
{
if (!($translator instanceof TranslatorBagInterface && $translator instanceof TranslatorInterface)) {
throw new InvalidTypeException(
'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'.'
'Translator does not implement '.TranslatorInterface::class.' and '.TranslatorBagInterface::class.'. '.
(is_object($translator) ? get_class($translator) : gettype($translator)).' has been given.'
);
}

Expand Down
3 changes: 2 additions & 1 deletion tests/Carbon/LocalizationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,8 @@ public function testTranslationCustomWithCustomTranslator()
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage(
'Translator does not implement Symfony\Contracts\Translation\TranslatorInterface '.
'and Symfony\Component\Translation\TranslatorBagInterface.'
'and Symfony\Component\Translation\TranslatorBagInterface. '.
'Symfony\Component\Translation\IdentityTranslator has been given.'
);

$date = Carbon::create(2018, 1, 1, 0, 0, 0);
Expand Down
3 changes: 2 additions & 1 deletion tests/CarbonImmutable/LocalizationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,8 @@ public function testTranslationCustomWithCustomTranslator()
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage(
'Translator does not implement Symfony\Contracts\Translation\TranslatorInterface '.
'and Symfony\Component\Translation\TranslatorBagInterface.'
'and Symfony\Component\Translation\TranslatorBagInterface. '.
'Symfony\Component\Translation\IdentityTranslator has been given.'
);

$date = Carbon::create(2018, 1, 1, 0, 0, 0);
Expand Down

0 comments on commit c93e4f6

Please sign in to comment.