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

daycry / auth / 22540888768

01 Mar 2026 09:52AM UTC coverage: 63.267%. Remained the same
22540888768

push

github

daycry
Use string config() calls and update docblocks

Replace config(Class::class) calls with named config('AuthSecurity') / config('AuthOAuth') and add @var annotations to provide concrete types for static analysis. Update test docblocks to reference AuthSecurity where appropriate. Adjust phpstan baseline to remove obsolete missing-class entries and account for internal static method warnings and updated counts. These changes address phpstan type and service-call warnings and improve analyzer compatibility.

1 of 2 new or added lines in 1 file covered. (50.0%)

1 existing line in 1 file now uncovered.

3064 of 4843 relevant lines covered (63.27%)

41.53 hits per line

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

25.0
/src/Controllers/OauthController.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of Daycry Auth.
7
 *
8
 * (c) Daycry <daycry9@proton.me>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace Daycry\Auth\Controllers;
15

16
use Daycry\Auth\Config\AuthOAuth;
17
use Daycry\Auth\Libraries\Oauth\OauthManager;
18
use Exception;
19

20
class OauthController extends BaseAuthController
21
{
22
    protected $helpers = ['setting', 'url'];
23

24
    /**
25
     * Get rules for validation
26
     */
27
    protected function getValidationRules(): array
×
28
    {
29
        return [];
×
30
    }
31

32
    public function redirect(string $provider)
1✔
33
    {
34
        /** @var AuthOAuth $config */
35
        $config  = config('AuthOAuth');
1✔
36
        $manager = new OauthManager($config);
1✔
37

38
        return $manager->setProvider($provider)->redirect();
1✔
39
    }
40

41
    public function callback(string $provider)
×
42
    {
43
        /** @var AuthOAuth $config */
NEW
44
        $config  = config('AuthOAuth');
×
UNCOV
45
        $manager = new OauthManager($config);
×
46

47
        try {
48
            $user = $manager->setProvider($provider)->handleCallback(
×
49
                $this->request->getGet('code') ?? '',
×
50
                $this->request->getGet('state') ?? '',
×
51
            );
×
52

53
            return redirect()->to(config('Auth')->loginRedirect());
×
54
        } catch (Exception $e) {
×
55
            return redirect()->to(config('Auth')->loginPage())->with('error', $e->getMessage());
×
56
        }
57
    }
58
}
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