SmsHandlerInterface::sendSMS()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
1
<?php
2
/**
3
 * This file is part of the Apiary SMS Login Provider package.
4
 *
5
 * (c) Darren Mothersele <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Apiary\SmsLoginProvider\SmsHandler;
12
13
/**
14
 * Interface SmsHandlerInterface
15
 * @package Apiary
16
 */
17
interface SmsHandlerInterface
18
{
19
20
21
    /**
22
     * Set the default From address or number
23
     * @param string $from
24
     */
25
    public function setDefaultFrom($from);
26
27
    /**
28
     * Lookup, validate a number and convert to E.164
29
     * @param string $number Phone number in any format
30
     * @param string $countryCode ISO Country code
31
     * @return string Validated number in E.164 format
32
     * @throws Apiary\SmsLoginProvider\Exception\InvalidPhoneNumberException
33
     */
34
    public function lookupNumber($number, $countryCode);
35
36
37
    /**
38
     * Send a single SMS message
39
     * @param $from
40
     * @param $to
41
     * @param $body
42
     * @return string identifier of sent message
43
     * @throws Apiary\SmsLoginProvider\Exception\SMSSendFailException
44
     */
45
    public function sendSMS($to, $body, $from = null);
46
47
}
0 ignored issues
show
Coding Style introduced by
According to PSR2, the closing brace of interfaces should be placed on the next line directly after the body.

Below you find some examples:

// Incorrect placement according to PSR2
class MyClass
{
    public function foo()
    {

    }
    // This blank line is not allowed.

}

// Correct
class MyClass
{
    public function foo()
    {

    } // No blank lines after this line.
}
Loading history...