]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Strict types: fix an issue in daily where the date could be an int 1592/head
authorArthurHoaro <arthur@hoa.ro>
Fri, 16 Oct 2020 10:04:46 +0000 (12:04 +0200)
committerArthurHoaro <arthur@hoa.ro>
Fri, 16 Oct 2020 10:04:46 +0000 (12:04 +0200)
application/bookmark/BookmarkFileService.php
tests/bookmark/BookmarkFileServiceTest.php

index 804b25207a95bf1c698682bf49f009a58b35ea46..eb7899bf7edc24b85ed4462fbb0f24dd50dedd6c 100644 (file)
@@ -349,7 +349,7 @@ class BookmarkFileService implements BookmarkServiceInterface
         $bookmarkDays = array_keys($bookmarkDays);
         sort($bookmarkDays);
 
-        return $bookmarkDays;
+        return array_map('strval', $bookmarkDays);
     }
 
     /**
index 59c0608c5a7c701db3a363733d7492563df27718..42485c99b3fb0a829c384494854b6ba87e4579ad 100644 (file)
@@ -690,12 +690,12 @@ class BookmarkFileServiceTest extends TestCase
      */
     public function testDays()
     {
-        $this->assertEquals(
+        $this->assertSame(
             ['20100309', '20100310', '20121206', '20121207', '20130614', '20150310'],
             $this->publicLinkDB->days()
         );
 
-        $this->assertEquals(
+        $this->assertSame(
             ['20100309', '20100310', '20121206', '20121207', '20130614', '20141125', '20150310'],
             $this->privateLinkDB->days()
         );