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

Ekman / luhn-algorithm / 09a8d01b-4672-46f4-b2dd-07b31af5ad59

pending completion
09a8d01b-4672-46f4-b2dd-07b31af5ad59

push

circleci

GitHub
Test PHP 8.2

41 of 44 relevant lines covered (93.18%)

7.59 hits per line

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

0.0
/src/Contract/NumberInterface.php
1
<?php
2

3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2021 Niklas Ekman
7
 *
8
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
9
 * this software and associated documentation files (the "Software"), to deal in
10
 * the Software without restriction, including without limitation the rights to
11
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
12
 * the Software, and to permit persons to whom the Software is furnished to do so,
13
 * subject to the following conditions:
14
 *
15
 * The above copyright notice and this permission notice shall be included in all
16
 * copies or substantial portions of the Software.
17
 *
18
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
20
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
21
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
22
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
23
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
 */
25

26
declare(strict_types=1);
27

28
namespace Nekman\LuhnAlgorithm\Contract;
29

30
/**
31
 * Describes the structure of a number in the Luhn Algorithm.
32
 */
33
interface NumberInterface
34
{
35
    /**
36
     * Get the number, without check digit.
37
     * @return string
38
     */
39
    public function getNumber(): string;
40

41
    /**
42
     * Get the check digit for the number.
43
     * @return int|null The check digit or null if it has not been calculated yet.
44
     */
45
    public function getCheckDigit(): ?int;
×
46
}
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

© 2025 Coveralls, Inc