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

daycry / cronjob / 15775568161

20 Jun 2025 09:13AM UTC coverage: 69.514% (+4.1%) from 65.424%
15775568161

push

github

daycry
- New Features

130 of 163 new or added lines in 9 files covered. (79.75%)

6 existing lines in 3 files now uncovered.

415 of 597 relevant lines covered (69.51%)

3.21 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\Exceptions\PageNotFoundException;
9
use CodeIgniter\HTTP\RequestInterface;
10
use CodeIgniter\HTTP\ResponseInterface;
11
use Config\Services;
12
use Psr\Log\LoggerInterface;
13

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

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

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

28
        if (! $config->enableDashboard) {
×
NEW
29
            throw new PageNotFoundException();
×
30
        }
31

NEW
32
        $this->session = Services::session();
×
33
        $this->checkCronJobSession();
×
34
    }
35

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

43
        $this->viewData['cronjobLoggedIn'] = $result;
×
44

45
        return $result;
×
46
    }
47
}
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