Commit f246a1d1 authored by Keval Pandya's avatar Keval Pandya

[Codereview-improvement] remove unused code

parent 36d93e62
Pipeline #6851 passed with stages
in 2 minutes and 47 seconds
......@@ -71,7 +71,7 @@ class T3planetArticlesController extends \TYPO3\CMS\Extbase\Mvc\Controller\Actio
// Records per page
$limit = 4;
if ($this->settings['articlesPerPage']) {
$limit = (int) $this->settings['articlesPerPage'];
$limit = (int)$this->settings['articlesPerPage'];
}
$t3planetArticles = $this->t3planetArticlesRepository->getFeaturedArticles($limit);
$this->view->assign('t3planetArticles', $t3planetArticles);
......@@ -83,7 +83,7 @@ class T3planetArticlesController extends \TYPO3\CMS\Extbase\Mvc\Controller\Actio
$t3planetTags = $this->t3planetTagsRepository->findAll();
$argument = $this->request->getArguments();
if ($argument['category']) {
$category = (int) $this->request->getArgument('category');
$category = (int)$this->request->getArgument('category');
$t3planetArticles = $this->t3planetArticlesRepository->getAcceptedArticlesByCategoryId($category);
} else {
$t3planetArticles = $this->t3planetArticlesRepository->getAcceptedArticles();
......@@ -135,7 +135,6 @@ class T3planetArticlesController extends \TYPO3\CMS\Extbase\Mvc\Controller\Actio
} else {
$t3planetArticles = $this->t3planetArticlesRepository->findAll();
}
} else {
$userID = $GLOBALS['TSFE']->fe_user->user['uid'];
$t3planetArticles = $this->t3planetArticlesRepository->getArticlesByUser($userID);
......
......@@ -51,6 +51,6 @@ class FileReference extends \TYPO3\CMS\Extbase\Domain\Model\FileReference
private function setFileReference(\TYPO3\CMS\Core\Resource\FileReference $originalResource)
{
$this->originalResource = $originalResource;
$this->originalFileIdentifier = (int) $originalResource->getOriginalFile()->getUid();
$this->originalFileIdentifier = (int)$originalResource->getOriginalFile()->getUid();
}
}
......@@ -52,7 +52,7 @@ class DeleteViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHel
$this->registerFieldNameForFormTokenGeneration($name);
$this->tag->addAttribute('name', $name . '[submittedFile][resourcePointer]');
$this->tag->addAttribute('type', 'checkbox');
$this->tag->addAttribute('value', htmlspecialchars($this->hashService->appendHmac((string) $resourcePointerValue)));
$this->tag->addAttribute('value', htmlspecialchars($this->hashService->appendHmac((string)$resourcePointerValue)));
if ($checked) {
$this->tag->addAttribute('checked', 'checked');
}
......
......@@ -66,7 +66,7 @@ class UploadViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\Form\UploadViewHelpe
// Use the file UID instead, but prefix it with "file:" to communicate this to the type converter
$resourcePointerValue = 'file:' . $resource->getOriginalResource()->getOriginalFile()->getUid();
}
$output .= '<input type="hidden" name="' . $this->getName() . '[submittedFile][resourcePointer]" value="' . htmlspecialchars($this->hashService->appendHmac((string) $resourcePointerValue)) . '"' . $resourcePointerIdAttribute . '/>';
$output .= '<input type="hidden" name="' . $this->getName() . '[submittedFile][resourcePointer]" value="' . htmlspecialchars($this->hashService->appendHmac((string)$resourcePointerValue)) . '"' . $resourcePointerIdAttribute . '/>';
$this->templateVariableContainer->add('resource', $resource);
$output .= $this->renderChildren();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment