mirror of
https://github.com/wallabag/wallabag.git
synced 2025-08-21 18:11:10 +00:00
CS
This commit is contained in:
parent
f40c88eb1f
commit
3ef055ced3
27 changed files with 37 additions and 37 deletions
|
@ -348,7 +348,7 @@ class ConfigController extends Controller
|
|||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
foreach ($tags as $tag) {
|
||||
if (count($tag->getEntries()) === 0) {
|
||||
if (0 === count($tag->getEntries())) {
|
||||
$em->remove($tag);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -195,7 +195,7 @@ class EntryController extends Controller
|
|||
public function showUnreadAction(Request $request, $page)
|
||||
{
|
||||
// load the quickstart if no entry in database
|
||||
if ((int) $page === 1 && $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId()) === 0) {
|
||||
if (1 === (int) $page && 0 === $this->get('wallabag_core.entry_repository')->countAllEntriesByUser($this->getUser()->getId())) {
|
||||
return $this->redirect($this->generateUrl('quickstart'));
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ class ExportController extends Controller
|
|||
$methodBuilder = 'getBuilderFor' . $method . 'ByUser';
|
||||
$repository = $this->get('wallabag_core.entry_repository');
|
||||
|
||||
if ($category === 'tag_entries') {
|
||||
if ('tag_entries' === $category) {
|
||||
$tag = $this->get('wallabag_core.tag_repository')->findOneBySlug($request->query->get('tag'));
|
||||
|
||||
$entries = $repository->findAllByTagId(
|
||||
|
|
|
@ -65,7 +65,7 @@ class TagController extends Controller
|
|||
$em->flush();
|
||||
|
||||
// remove orphan tag in case no entries are associated to it
|
||||
if (count($tag->getEntries()) === 0) {
|
||||
if (0 === count($tag->getEntries())) {
|
||||
$em->remove($tag);
|
||||
$em->flush();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue