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

bitExpert / magento2-force-login / 8832783866

25 Apr 2024 12:43PM UTC coverage: 58.745% (-0.1%) from 58.857%
8832783866

push

github

web-flow
Merge pull request #231 from iranimij/remove-useless-wrong-error

Remove useless wrong error

6 of 7 new or added lines in 1 file covered. (85.71%)

309 of 526 relevant lines covered (58.75%)

11.6 hits per line

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

90.0
/Model/WhitelistDefaultInstaller.php
1
<?php
2

3
/*
4
 * This file is part of the Force Login module for Magento2.
5
 *
6
 * (c) bitExpert AG
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
namespace BitExpert\ForceCustomerLogin\Model;
13

14
use BitExpert\ForceCustomerLogin\Api\Repository\WhitelistRepositoryInterface;
15
use BitExpert\ForceCustomerLogin\Model\WhitelistDefaultPool;
16

17
/**
18
 * Class WhitelistEntryDefaultInstaller
19
 *
20
 * @package BitExpert\ForceCustomerLogin\Model
21
 * @codingStandardsIgnoreFile
22
 */
23
class WhitelistDefaultInstaller
24
{
25
    private WhitelistDefaultPool $whitelistDefaultPool;
26
    private WhitelistRepositoryInterface $whitelistRepository;
27

28
    /**
29
     * Installer constructor
30
     */
31
    public function __construct(
32
        WhitelistDefaultPool $whitelistDefaultPool,
33
        WhitelistRepositoryInterface $whitelistRepository,
34
    ) {
35
        $this->whitelistDefaultPool = $whitelistDefaultPool;
6✔
36
        $this->whitelistRepository = $whitelistRepository;
6✔
37
    }
38

39
    public function install(): void
40
    {
41
        foreach ($this->whitelistDefaultPool->getEntries() as $route => $data) {
6✔
42
            try {
43
                $this->whitelistRepository->createEntry(
6✔
44
                    null,
6✔
45
                    $data['label'],
6✔
46
                    $route,
6✔
47
                    $data['strategy'] ?: 'default',
6✔
48
                );
6✔
NEW
49
            } catch (\Exception $e) {
×
50
                // log here
51
            }
52
        }
53
    }
54
}
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