1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Modernize to PHP 7.4

This commit is contained in:
Yassine Guedidi 2025-04-05 13:20:44 +02:00
parent ce8ed589d5
commit 4168727f36
21 changed files with 31 additions and 75 deletions

View file

@ -95,9 +95,7 @@ class ChromeImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $chromeImport->setMarkAsRead(true)->import();

View file

@ -95,9 +95,7 @@ class FirefoxImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $firefoxImport->setMarkAsRead(true)->import();

View file

@ -97,9 +97,7 @@ class InstapaperImportTest extends TestCase
$this->em
->expects($this->once())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $instapaperImport->setMarkAsRead(true)->import();

View file

@ -95,9 +95,7 @@ class PocketHtmlImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $pocketHtmlImport
->setMarkAsRead(true)

View file

@ -207,9 +207,7 @@ JSON
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived() && (bool) $persistedEntry->isStarred();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived() && (bool) $persistedEntry->isStarred()));
$entry = new Entry($this->user);
@ -299,9 +297,7 @@ JSON
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$entry = new Entry($this->user);

View file

@ -95,9 +95,7 @@ class ReadabilityImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $readabilityImport->setMarkAsRead(true)->import();

View file

@ -95,9 +95,7 @@ class ShaarliImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $shaarliImport
->setMarkAsRead(true)

View file

@ -99,9 +99,7 @@ class WallabagV1ImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $wallabagV1Import->setMarkAsRead(true)->import();

View file

@ -93,9 +93,7 @@ class WallabagV2ImportTest extends TestCase
$this->em
->expects($this->any())
->method('persist')
->with($this->callback(function ($persistedEntry) {
return (bool) $persistedEntry->isArchived();
}));
->with($this->callback(fn ($persistedEntry) => (bool) $persistedEntry->isArchived()));
$res = $wallabagV2Import->setMarkAsRead(true)->import();