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:
parent
745fef44f4
commit
241cddc899
6 changed files with 7 additions and 11 deletions
|
@ -14,5 +14,5 @@ return RectorConfig::configure()
|
|||
])
|
||||
->withImportNames(importShortClasses: false)
|
||||
->withAttributesSets(doctrine: true)
|
||||
->withPhpSets(php55: true)
|
||||
->withPhpSets(php70: true)
|
||||
->withTypeCoverageLevel(0);
|
||||
|
|
|
@ -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 = [];
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue