1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Modernize to PHP 7.0

This commit is contained in:
Yassine Guedidi 2025-04-05 13:14:32 +02:00
parent 745fef44f4
commit 241cddc899
6 changed files with 7 additions and 11 deletions

View file

@ -14,5 +14,5 @@ return RectorConfig::configure()
])
->withImportNames(importShortClasses: false)
->withAttributesSets(doctrine: true)
->withPhpSets(php55: true)
->withPhpSets(php70: true)
->withTypeCoverageLevel(0);

View file

@ -626,7 +626,7 @@ class EntryController extends AbstractController
private function showEntries($type, Request $request, $page)
{
$searchTerm = (isset($request->query->all('search_entry')['term']) ? trim($request->query->all('search_entry')['term']) : '');
$currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : '');
$currentRoute = $request->query->get('currentRoute') ?? '';
$currentEntryId = $request->attributes->getInt('id');
$formOptions = [];

View file

@ -77,8 +77,8 @@ class ExportController extends AbstractController
$title = 'Tag ' . $tag->getLabel();
} elseif ('search' === $category) {
$searchTerm = (isset($request->query->all('search_entry')['term']) ? $request->query->all('search_entry')['term'] : '');
$currentRoute = (null !== $request->query->get('currentRoute') ? $request->query->get('currentRoute') : '');
$searchTerm = $request->query->all('search_entry')['term'] ?? '';
$currentRoute = $request->query->get('currentRoute') ?? '';
$entries = $entryRepository->getBuilderForSearchByUser(
$this->getUser()->getId(),

View file

@ -161,7 +161,7 @@ class UserController extends AbstractController
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$searchTerm = (isset($request->query->all('search_user')['term']) ? $request->query->all('search_user')['term'] : '');
$searchTerm = $request->query->all('search_user')['term'] ?? '';
$qb = $userRepository->getQueryBuilderForSearch($searchTerm);
}

View file

@ -59,7 +59,7 @@ class ContentProxy
$fetchedContent['title'] = $this->sanitizeContentTitle(
$fetchedContent['title'],
isset($fetchedContent['headers']['content-type']) ? $fetchedContent['headers']['content-type'] : ''
$fetchedContent['headers']['content-type'] ?? ''
);
// when content is imported, we have information in $content

View file

@ -25,10 +25,6 @@ class ArraySiteConfigBuilder implements SiteConfigBuilder
$host = substr($host, 4);
}
if (isset($this->configs[$host])) {
return $this->configs[$host];
}
return false;
return $this->configs[$host] ?? false;
}
}