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

daycry / cronjob / 4657452798

pending completion
4657452798

push

github

GitHub
Merge pull request #10 from thepolm3/master

266 of 369 relevant lines covered (72.09%)

2.82 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 Daycry\CronJob\Config\Services;
9
use CodeIgniter\HTTP\RequestInterface;
10
use CodeIgniter\HTTP\ResponseInterface;
11
use Psr\Log\LoggerInterface;
12

13
class BaseCronJob extends BaseController
14
{
15
    protected $session;
16

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) {
×
29
            throw new \CodeIgniter\Exceptions\PageNotFoundException();
×
30
        }
31

32
        $this->session = \Config\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