mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Fix CS
This commit is contained in:
parent
11031114e2
commit
381f9681b5
7 changed files with 9 additions and 9 deletions
|
@ -327,7 +327,7 @@ class ConfigController extends Controller
|
||||||
$backupCodes = (new BackupCodes())->toArray();
|
$backupCodes = (new BackupCodes())->toArray();
|
||||||
$backupCodesHashed = array_map(
|
$backupCodesHashed = array_map(
|
||||||
function ($backupCode) {
|
function ($backupCode) {
|
||||||
return password_hash($backupCode, PASSWORD_DEFAULT);
|
return password_hash($backupCode, \PASSWORD_DEFAULT);
|
||||||
},
|
},
|
||||||
$backupCodes
|
$backupCodes
|
||||||
);
|
);
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Tag
|
||||||
*/
|
*/
|
||||||
public function setLabel($label)
|
public function setLabel($label)
|
||||||
{
|
{
|
||||||
$this->label = mb_convert_case($label, MB_CASE_LOWER);
|
$this->label = mb_convert_case($label, \MB_CASE_LOWER);
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ class ContentProxy
|
||||||
$date = $value;
|
$date = $value;
|
||||||
|
|
||||||
// is it a timestamp?
|
// is it a timestamp?
|
||||||
if (false !== filter_var($date, FILTER_VALIDATE_INT)) {
|
if (false !== filter_var($date, \FILTER_VALIDATE_INT)) {
|
||||||
$date = '@' . $date;
|
$date = '@' . $date;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ class ContentProxy
|
||||||
*/
|
*/
|
||||||
public function setEntryDomainName(Entry $entry)
|
public function setEntryDomainName(Entry $entry)
|
||||||
{
|
{
|
||||||
$domainName = parse_url($entry->getUrl(), PHP_URL_HOST);
|
$domainName = parse_url($entry->getUrl(), \PHP_URL_HOST);
|
||||||
if (false !== $domainName) {
|
if (false !== $domainName) {
|
||||||
$entry->setDomainName($domainName);
|
$entry->setDomainName($domainName);
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ class ContentProxy
|
||||||
public function setDefaultEntryTitle(Entry $entry)
|
public function setDefaultEntryTitle(Entry $entry)
|
||||||
{
|
{
|
||||||
$url = parse_url($entry->getUrl());
|
$url = parse_url($entry->getUrl());
|
||||||
$path = pathinfo($url['path'], PATHINFO_BASENAME);
|
$path = pathinfo($url['path'], \PATHINFO_BASENAME);
|
||||||
|
|
||||||
if (empty($path)) {
|
if (empty($path)) {
|
||||||
$path = $url['host'];
|
$path = $url['host'];
|
||||||
|
|
|
@ -44,7 +44,7 @@ class TagsAssigner
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($tags as $label) {
|
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
|
// avoid empty tag
|
||||||
if (0 === \strlen($label)) {
|
if (0 === \strlen($label)) {
|
||||||
|
|
|
@ -158,7 +158,7 @@ class WallabagExtension extends AbstractExtension implements GlobalsInterface
|
||||||
$nbDays = (int) $interval->format('%a') ?: 1;
|
$nbDays = (int) $interval->format('%a') ?: 1;
|
||||||
|
|
||||||
// force setlocale for date translation
|
// 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', [
|
return $this->translator->trans('footer.stats', [
|
||||||
'%user_creation%' => strftime('%e %B %Y', $user->getCreatedAt()->getTimestamp()),
|
'%user_creation%' => strftime('%e %B %Y', $user->getCreatedAt()->getTimestamp()),
|
||||||
|
|
|
@ -246,7 +246,7 @@ class PocketImport extends AbstractImport
|
||||||
{
|
{
|
||||||
$data = json_decode((string) $response->getBody(), true);
|
$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());
|
throw new \InvalidArgumentException('Unable to parse JSON data: ' . json_last_error_msg());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -832,7 +832,7 @@ class EntryRestControllerTest extends WallabagApiTestCase
|
||||||
|
|
||||||
$this->client->request('GET', '/api/entries/' . $entry->getId() . '/tags');
|
$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()
|
public function testPostTagsOnEntry()
|
||||||
|
|
Loading…
Reference in a new issue