Passed
Push — master ( 18cedb...696cbf )
by Melech
04:01
created

LogSms::send()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Valkyrja Framework package.
7
 *
8
 * (c) Melech Mizrachi <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Valkyrja\Sms;
15
16
use Valkyrja\Log\Contract\Logger;
17
use Valkyrja\Sms\Contract\Sms as Contract;
18
use Valkyrja\Sms\Data\Contract\Message;
19
20
/**
21
 * Class LogSms.
22
 *
23
 * @author Melech Mizrachi
24
 */
25
class LogSms implements Contract
26
{
27
    /**
28
     * LogSms constructor.
29
     */
30
    public function __construct(
31
        protected Logger $logger,
32
    ) {
33
    }
34
35
    /**
36
     * @inheritDoc
37
     */
38
    public function send(Message $message): void
39
    {
40
        $this->logger->info(static::class . ' Send');
41
        $this->logger->info('From:');
42
        $this->logger->info($message->getFrom());
43
        $this->logger->info('To:');
44
        $this->logger->info($message->getTo());
45
        $this->logger->info('Text:');
46
        $this->logger->info($message->getText());
47
    }
48
}
49