diff --git a/Classes/Controller/AbstractController.php b/Classes/Controller/AbstractController.php index 5ea9b909bd12667547bbb6705138562470accbf7..dfaf0823e7cfeb0b1b201cd3d755166ce4184c07 100644 --- a/Classes/Controller/AbstractController.php +++ b/Classes/Controller/AbstractController.php @@ -12,7 +12,6 @@ namespace Slub\Bison\Controller; */ use GuzzleHttp\Client; -use Elastic\Elasticsearch\ClientBuilder; use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; use Slub\Bison\Utility\IndexDatabaseList; @@ -20,11 +19,8 @@ use Slub\Bison\Utility\LocalFilter; use Slub\Bison\Utility\LocalPriceList; use Slub\Bison\Utility\MirrorJournalList; use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; -use TYPO3\CMS\Core\Messaging\FlashMessage; use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Utility\MathUtility; use TYPO3\CMS\Extbase\Mvc\Controller\ActionController; -use TYPO3\CMS\Extbase\Utility\LocalizationUtility; /** * Abstract base controller for the extension diff --git a/Classes/Controller/JournalController.php b/Classes/Controller/JournalController.php index c29ebd2e193abb0daf0235f86029b82a98233153..d3d79440e4e9d4bc605f63c0bcc941e37204d4db 100644 --- a/Classes/Controller/JournalController.php +++ b/Classes/Controller/JournalController.php @@ -15,12 +15,6 @@ namespace Slub\Bison\Controller; use Slub\Bison\Domain\Repository\JournalRepository; use Slub\Bison\Model\Journal; -use TYPO3\CMS\Core\Http\RequestFactory; -use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Pagination\SimplePagination; -use TYPO3\CMS\Extbase\Annotation\IgnoreValidation; -use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator; /** * The journal controller for the Bison extension. @@ -35,28 +29,12 @@ use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator; class JournalController extends AbstractController { - /** - * @var JournalRepository - * @access private - */ - private $journalRepository; - /** * @var Journal * @access private */ private $journal; - /** - * @param JournalRepository $journalRepository - * - * @return void - */ - public function injectJournalRepository(JournalRepository $journalRepository) - { - $this->journalRepository = $journalRepository; - } - /** * The journal function returning one journal based on idx. * @@ -95,7 +73,7 @@ class JournalController extends AbstractController $this->mirrorJournalList->assignMirrorJournal($this->journal); $this->localPriceList->assignLocalPrice($this->journal); } - } catch (Exception $e) { + } catch (\Exception $e) { $this->logger->error('Request error: '.$e->getMessage()); } } diff --git a/Classes/Controller/RecommenderController.php b/Classes/Controller/RecommenderController.php index 2dfc29f35fb540b6ad2bfd9b7338a225465f6a22..5252cc1e4d0ff7fb2a50105356bdbbc95393113c 100644 --- a/Classes/Controller/RecommenderController.php +++ b/Classes/Controller/RecommenderController.php @@ -17,12 +17,6 @@ use Slub\Bison\Domain\Repository\JournalRepository; use Slub\Bison\Model\Journal; use Slub\Bison\Model\Language; use Slub\Bison\Model\Subject; -use TYPO3\CMS\Core\Http\RequestFactory; -use TYPO3\CMS\Core\Messaging\FlashMessage; -use TYPO3\CMS\Core\Utility\GeneralUtility; -use TYPO3\CMS\Core\Pagination\SimplePagination; -use TYPO3\CMS\Extbase\Annotation\IgnoreValidation; -use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator; /** * The recommender controller for the Bison extension @@ -36,11 +30,6 @@ use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator; */ class RecommenderController extends AbstractController { - /** - * @var JournalRepository - * @access private - */ - private $journalRepository; /** * @var array<Journal> @@ -48,16 +37,6 @@ class RecommenderController extends AbstractController */ private $results; - /** - * @param JournalRepository $journalRepository - * - * @return void - */ - public function injectJournalRepository(JournalRepository $journalRepository) - { - $this->journalRepository = $journalRepository; - } - /** * The recommender function returning journals based on title etc. * @@ -107,7 +86,7 @@ class RecommenderController extends AbstractController $this->view->assign('countResults', $this->countResultsAfterFilter()); $this->view->assign('results', $this->results); } - } catch (Exception $e) { + } catch (\Exception $e) { $this->logger->error('Request error: '.$e->getMessage()); $this->view->assign('error', $e->getMessage()); } diff --git a/Classes/Domain/Repository/JournalRepository.php b/Classes/Domain/Repository/JournalRepository.php deleted file mode 100644 index ca020aca03f275119ba0662a0fdee0e12d7cfe37..0000000000000000000000000000000000000000 --- a/Classes/Domain/Repository/JournalRepository.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -declare(strict_types=1); - -namespace Slub\Bison\Domain\Repository; - - -/** - * This file is part of the "Bison" Extension for TYPO3 CMS. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * (c) 2022 Beatrycze Volk <beatrycze.volk@slub-dresden.de>, SLUB - */ - -/** - * The repository for Journals - */ -class JournalRepository extends \TYPO3\CMS\Extbase\Persistence\Repository -{ - -} diff --git a/Classes/Utility/LocalPriceList.php b/Classes/Utility/LocalPriceList.php index db636a21559696cf369fdca31d9c107565481f0f..a467f2ca8c85a70eaef7049a03a57bc733367bfd 100644 --- a/Classes/Utility/LocalPriceList.php +++ b/Classes/Utility/LocalPriceList.php @@ -12,7 +12,6 @@ namespace Slub\Bison\Utility; */ use Slub\Bison\Model\LocalPrice; -use TYPO3\CMS\Core\Utility\GeneralUtility; /** * The class for handling local prices stored in CSV file.