• 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/Login.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Daycry\CronJob\Controllers;
6

7
use Config\Services;
8

9
class Login extends BaseCronJob
10
{
11
    /**
12
     * Displays the form the login to the site.
13
     */
14
    public function index()
15
    {
16
        if ($this->session->get('cronjob')) {
×
17
            return redirect()->to('cronjob/dashboard');
×
18
        }
19

20
        return view(config('CronJob')->views['login'], $this->viewData);
×
21
    }
22

23
    public function validation()
24
    {
NEW
25
        $validation = Services::validation();
×
26
        $validation->setRule('username', 'Username', 'required');
×
27
        $validation->setRule('password', 'Password', 'required');
×
28

29
        if (! $validation->withRequest($this->request)->run()) {
×
30
            return redirect()->to('cronjob');
×
31
        }
32

33
        $username = $this->request->getPost('username');
×
34
        $password = $this->request->getPost('password');
×
35

36
        $config = config('CronJob');
×
37
        if ($username !== $config->username || $password !== $config->password) {
×
38
            return redirect()->to('cronjob');
×
39
        }
40

41
        $this->session->set('cronjob', true);
×
42

43
        return redirect()->to('cronjob/dashboard');
×
44
    }
45

46
    public function logout()
47
    {
48
        $this->session->remove('cronjob');
×
49

50
        return redirect()->to('cronjob');
×
51
    }
52
}
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