Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
3 / 3
CRAP
100.00% covered (success)
100.00%
1 / 1
HomePrivacyLogic
100.00% covered (success)
100.00%
5 / 5
100.00% covered (success)
100.00%
3 / 3
3
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 validateImpl
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 executeImpl
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace PeServer\App\Models\Domain\Page\Home;
6
7use PeServer\Core\IO\File;
8use PeServer\Core\IO\Path;
9use PeServer\Core\Mvc\LogicCallMode;
10use PeServer\Core\Mvc\LogicParameter;
11use PeServer\App\Models\AppConfiguration;
12use PeServer\App\Models\Domain\Page\PageLogicBase;
13
14class HomePrivacyLogic extends PageLogicBase
15{
16    public function __construct(LogicParameter $parameter, private AppConfiguration $config)
17    {
18        parent::__construct($parameter);
19    }
20
21    protected function validateImpl(LogicCallMode $callMode): void
22    {
23        //NOP
24    }
25
26    protected function executeImpl(LogicCallMode $callMode): void
27    {
28        $privacyPolicyPath = Path::combine($this->config->settingDirectoryPath, 'privacy_policy.md');
29        $privacyPolicy = File::readContent($privacyPolicyPath);
30        $this->setValue('privacy_policy', $privacyPolicy->raw);
31    }
32}