This commit is contained in:
Jeremy Benoist 2021-01-18 10:38:56 +01:00
parent 11031114e2
commit 381f9681b5
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
7 changed files with 9 additions and 9 deletions

View file

@ -327,7 +327,7 @@ class ConfigController extends Controller
$backupCodes = (new BackupCodes())->toArray();
$backupCodesHashed = array_map(
function ($backupCode) {
return password_hash($backupCode, PASSWORD_DEFAULT);
return password_hash($backupCode, \PASSWORD_DEFAULT);
},
$backupCodes
);

View file

@ -84,7 +84,7 @@ class Tag
*/
public function setLabel($label)
{
$this->label = mb_convert_case($label, MB_CASE_LOWER);
$this->label = mb_convert_case($label, \MB_CASE_LOWER);
return $this;
}

View file

@ -141,7 +141,7 @@ class ContentProxy
$date = $value;
// is it a timestamp?
if (false !== filter_var($date, FILTER_VALIDATE_INT)) {
if (false !== filter_var($date, \FILTER_VALIDATE_INT)) {
$date = '@' . $date;
}
@ -163,7 +163,7 @@ class ContentProxy
*/
public function setEntryDomainName(Entry $entry)
{
$domainName = parse_url($entry->getUrl(), PHP_URL_HOST);
$domainName = parse_url($entry->getUrl(), \PHP_URL_HOST);
if (false !== $domainName) {
$entry->setDomainName($domainName);
}
@ -177,7 +177,7 @@ class ContentProxy
public function setDefaultEntryTitle(Entry $entry)
{
$url = parse_url($entry->getUrl());
$path = pathinfo($url['path'], PATHINFO_BASENAME);
$path = pathinfo($url['path'], \PATHINFO_BASENAME);
if (empty($path)) {
$path = $url['host'];

View file

@ -44,7 +44,7 @@ class TagsAssigner
}
foreach ($tags as $label) {
$label = trim(mb_convert_case($label, MB_CASE_LOWER));
$label = trim(mb_convert_case($label, \MB_CASE_LOWER));
// avoid empty tag
if (0 === \strlen($label)) {

View file

@ -158,7 +158,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface
$nbDays = (int) $interval->format('%a') ?: 1;
// force setlocale for date translation
setlocale(LC_TIME, strtolower($user->getConfig()->getLanguage()) . '_' . strtoupper(strtolower($user->getConfig()->getLanguage())));
setlocale(\LC_TIME, strtolower($user->getConfig()->getLanguage()) . '_' . strtoupper(strtolower($user->getConfig()->getLanguage())));
return $this->translator->trans('footer.stats', [
'%user_creation%' => strftime('%e %B %Y', $user->getCreatedAt()->getTimestamp()),

View file

@ -246,7 +246,7 @@ class PocketImport extends AbstractImport
{
$data = json_decode((string) $response->getBody(), true);
if (JSON_ERROR_NONE !== json_last_error()) {
if (\JSON_ERROR_NONE !== json_last_error()) {
throw new \InvalidArgumentException('Unable to parse JSON data: ' . json_last_error_msg());
}

View file

@ -832,7 +832,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
$this->client->request('GET', '/api/entries/' . $entry->getId() . '/tags');
$this->assertSame(json_encode($tags, JSON_HEX_QUOT), $this->client->getResponse()->getContent());
$this->assertSame(json_encode($tags, \JSON_HEX_QUOT), $this->client->getResponse()->getContent());
}
public function testPostTagsOnEntry()