Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

fix: fix error on EBSR pages #47

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: fix invalid partial view path
JoshuaLicense committed Feb 2, 2024
commit a688497eac999425465a6fe1b53ebc34c134d2df
10 changes: 5 additions & 5 deletions module/Olcs/view/olcs/ebsr/uploads/detail.phtml
Original file line number Diff line number Diff line change
@@ -9,11 +9,11 @@
);

if ($ebsrSubmission['isBeingProcessed']) {
$childView = 'olcs/uploads/partial/detail-processing';
$childView = './partial/detail-processing';
} elseif ($ebsrSubmission['isFailure']) {
$childView = 'olcs/uploads/partial/detail-failed';
$childView = './partial/detail-failed';
} elseif ($ebsrSubmission['isSuccess']) {
$childView = 'olcs/uploads/partial/detail-success';
$childView = './partial/detail-success';
} else {
echo'There is no additional information for this file'; //very basic handling of legacy until data is cleansed
return;
@@ -26,11 +26,11 @@
]
);
?>

<div class="row">
<div class="two-thirds">
<?php echo $this->render($childView, ['documentUrl' => $documentUrl, 'ebsrSubmission' => $ebsrSubmission]); ?>
</div>
</div>

</div>
</div>

Unchanged files with check annotations Beta

),
'invokables' => array(
'generatePeopleList' => \Olcs\View\Helper\GeneratePeopleList::class,
'tmCheckAnswersChangeLink' => \Olcs\View\Helper\TmCheckAnswersChangeLink::class,

Check failure on line 1480 in module/Olcs/config/module.config.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedClass

module/Olcs/config/module.config.php:1480:43: UndefinedClass: Class, interface or enum named Olcs\View\Helper\TmCheckAnswersChangeLink does not exist (see https://psalm.dev/019)

Check failure on line 1480 in module/Olcs/config/module.config.php

GitHub Actions / static-analysis / PHPStan - 7.4

Class Olcs\View\Helper\TmCheckAnswersChangeLink not found.
)
),
'view_manager' => array(
* @var DataSourceInterface $source
* @var QueryInterface $query
*/
$source = new $dataSource();

Check failure on line 406 in module/Olcs/src/Controller/AbstractSelfserveController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedClass

module/Olcs/src/Controller/AbstractSelfserveController.php:406:23: UndefinedClass: Type array-key cannot be called as a class (see https://psalm.dev/019)
$query = $source->queryFromParams(array_merge($this->routeParams, $this->queryParams));
$response = $this->handleQuery($query);
$data = $this->mapperManager->get($mapper)->mapForDisplay($data);
}
$this->data[$source::DATA_KEY] = $data;

Check failure on line 417 in module/Olcs/src/Controller/AbstractSelfserveController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedConstant

module/Olcs/src/Controller/AbstractSelfserveController.php:417:25: UndefinedConstant: Constant Olcs\Controller\Config\DataSource\DataSourceInterface::DATA_KEY is not defined (see https://psalm.dev/020)
if (isset($config['append'])) {
foreach ($config['append'] as $appendTo => $mapper) {
$combinedData = [
$appendTo => $this->data[$appendTo],
$source::DATA_KEY => $data

Check failure on line 423 in module/Olcs/src/Controller/AbstractSelfserveController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedConstant

module/Olcs/src/Controller/AbstractSelfserveController.php:423:25: UndefinedConstant: Constant Olcs\Controller\Config\DataSource\DataSourceInterface::DATA_KEY is not defined (see https://psalm.dev/020)
];
$this->data[$appendTo] = $this->mapperManager->get($mapper)->mapForDisplay($combinedData);

Check failure on line 22 in module/Olcs/src/Controller/Cookie/SettingsController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedDocblockClass

module/Olcs/src/Controller/Cookie/SettingsController.php:22:14: UndefinedDocblockClass: Docblock-defined class, interface or enum named Olcs\Controller\Cookie\SetCookieGenerator does not exist (see https://psalm.dev/200)

Check failure on line 60 in module/Olcs/src/Controller/Cookie/SettingsController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedDocblockClass

module/Olcs/src/Controller/Cookie/SettingsController.php:60:28: UndefinedDocblockClass: Docblock-defined class, interface or enum named Olcs\Controller\Cookie\SetCookieGenerator does not exist (see https://psalm.dev/200)
/**
* don't need the navigation listener on the login page (and also need to prevent unauthenticated requests)
*/
if (!$instance instanceof LoginController) {

Check failure on line 24 in module/Olcs/src/Controller/Initializer/Navigation.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedClass

module/Olcs/src/Controller/Initializer/Navigation.php:24:35: UndefinedClass: Class, interface or enum named Dvsa\Olcs\Auth\Controller\LoginController does not exist (see https://psalm.dev/019)

Check failure on line 24 in module/Olcs/src/Controller/Initializer/Navigation.php

GitHub Actions / static-analysis / PHPStan - 7.4

Class Dvsa\Olcs\Auth\Controller\LoginController not found.
$navigationListener = $container->get(NavigationListener::class);
$instance->getEventManager()->attach(MvcEvent::EVENT_DISPATCH, [$navigationListener, 'onDispatch']);
}
/**
* getView
*
* @param Licence $licence

Check failure on line 130 in module/Olcs/src/Controller/Licence/Surrender/StartController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedDocblockClass

module/Olcs/src/Controller/Licence/Surrender/StartController.php:130:15: UndefinedDocblockClass: Docblock-defined class, interface or enum named Dvsa\Olcs\Api\Entity\Licence\Licence does not exist (see https://psalm.dev/200)
* @param Translator $translateService
*
* @return \Laminas\View\Model\ViewModel
/**
* @param Request $request
* @param RouteMatch $routeMatch
* @return Response|ResponseInterface|ViewModel

Check failure on line 153 in module/Olcs/src/Controller/Licence/Vehicle/SwitchBoardController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedDocblockClass

module/Olcs/src/Controller/Licence/Vehicle/SwitchBoardController.php:153:16: UndefinedDocblockClass: Docblock-defined class, interface or enum named Olcs\Controller\Licence\Vehicle\Response does not exist (see https://psalm.dev/200)
* @throws \Exception
*/
protected function decisionAction(Request $request, RouteMatch $routeMatch)
* @param FormHelperService $formHelper
* @param TableFactory $tableBuilder
* @param MapperManager $mapperManager
* @param FlashMessenger $flashMessenger

Check failure on line 48 in module/Olcs/src/Controller/Licence/Vehicle/ViewVehicleController.php

GitHub Actions / static-analysis / Psalm - 7.4

UndefinedClass

module/Olcs/src/Controller/Licence/Vehicle/ViewVehicleController.php:48:15: UndefinedClass: Class, interface or enum named Laminas\Mvc\Controller\Plugin\FlashMessenger does not exist (see https://psalm.dev/019)
*/
public function __construct(
TranslationHelperService $translationHelper,
FormHelperService $formHelper,
TableFactory $tableBuilder,
MapperManager $mapperManager,
FlashMessenger $flashMessenger

Check failure on line 55 in module/Olcs/src/Controller/Licence/Vehicle/ViewVehicleController.php

GitHub Actions / static-analysis / PHPStan - 7.4

Parameter $flashMessenger of method Olcs\Controller\Licence\Vehicle\ViewVehicleController::__construct() has invalid type Laminas\Mvc\Controller\Plugin\FlashMessenger.
) {
parent::__construct($translationHelper, $formHelper, $tableBuilder, $mapperManager, $flashMessenger);
}
return 'markup-licence-surrender-information-changed-content-expired';
}
if ($this->hasInformationChanged()) {

Check failure on line 102 in module/Olcs/src/Controller/Licence/Surrender/InformationChangedController.php

GitHub Actions / static-analysis / PHPStan - 7.4

Method Olcs\Controller\Licence\Surrender\InformationChangedController::getContent() should return string but return statement is missing.
return 'markup-licence-surrender-information-changed-content-changed';
}
}
for ($i = 0; $i < count($data['operatingCentres']); $i++) {
// process files for each operating centre
$this->operatingCentreId = $data['operatingCentres'][$i]['operatingCentre']['id'];

Check failure on line 130 in module/Olcs/src/Controller/Lva/AbstractUploadEvidenceController.php

GitHub Actions / static-analysis / PHPStan - 7.4

Access to an undefined property Olcs\Controller\Lva\AbstractUploadEvidenceController::$operatingCentreId.
$this->processFiles(
$form,
'operatingCentres->' . (string)$i . '->file',
{
$data = $this->getData();
foreach ($data['operatingCentres'] as $aocData) {
if ($aocData['operatingCentre']['id'] === $this->operatingCentreId) {

Check failure on line 167 in module/Olcs/src/Controller/Lva/AbstractUploadEvidenceController.php

GitHub Actions / static-analysis / PHPStan - 7.4

Access to an undefined property Olcs\Controller\Lva\AbstractUploadEvidenceController::$operatingCentreId.
$documents = $aocData['operatingCentre']['adDocuments'];
return array_filter($documents, function ($document) {
return $document['isPostSubmissionUpload'];
'isExternal' => $this->isExternal(),
'licence' => $this->getLicenceId(),
'application' => $this->getIdentifier(),
'operatingCentre' => $this->operatingCentreId,

Check failure on line 194 in module/Olcs/src/Controller/Lva/AbstractUploadEvidenceController.php

GitHub Actions / static-analysis / PHPStan - 7.4

Access to an undefined property Olcs\Controller\Lva\AbstractUploadEvidenceController::$operatingCentreId.
'isPostSubmissionUpload' => true
];