• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

daycry / cronjob / 13433654919

20 Feb 2025 10:54AM UTC coverage: 65.424% (-2.5%) from 67.886%
13433654919

push

github

Jordi de la Mano
Fix: phpunit coverage

316 of 483 relevant lines covered (65.42%)

2.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Controllers/BaseCronJob.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Daycry\CronJob\Controllers;
6

7
use App\Controllers\BaseController;
8
use CodeIgniter\HTTP\RequestInterface;
9
use CodeIgniter\HTTP\ResponseInterface;
10
use Psr\Log\LoggerInterface;
11

12
class BaseCronJob extends BaseController
13
{
14
    protected $session;
15
    protected $viewData = [];
16

17
    public function initController(RequestInterface $request, ResponseInterface $response, LoggerInterface $logger)
18
    {
19
        $this->helpers[] = 'form';
×
20
        // Do Not Edit This Line
21
        parent::initController($request, $response, $logger);
×
22

23
        // Preload any models, libraries, etc, here.
24
        $config = config('CronJob');
×
25

26
        if (! $config->enableDashboard) {
×
27
            throw new \CodeIgniter\Exceptions\PageNotFoundException();
×
28
        }
29

30
        $this->session = \Config\Services::session();
×
31
        $this->checkCronJobSession();
×
32
    }
33

34
    protected function checkCronJobSession()
35
    {
36
        $result = false;
×
37
        if ($this->session->get('cronjob')) {
×
38
            $result = true;
×
39
        }
40

41
        $this->viewData['cronjobLoggedIn'] = $result;
×
42

43
        return $result;
×
44
    }
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc