Typo3   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 24
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A get() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2024
6
 * @package Base
7
 * @subpackage Mail
8
 */
9
10
11
namespace Aimeos\Base\Mail\Manager;
12
13
14
/**
15
 * TYPO3 mail manager
16
 *
17
 * @package Base
18
 * @subpackage Mail
19
 */
20
class Typo3 implements Iface
21
{
22
	private \Closure $closure;
23
24
	/**
25
	 * Initializes the instance of the class.
26
	 *
27
	 * @param \Closure $closure Closure generating TYPO3 mail message objects
28
	 */
29
	public function __construct( \Closure $closure )
30
	{
31
		$this->closure = $closure;
32
	}
33
34
35
	/**
36
	 * Returns the mailer for the given name
37
	 *
38
	 * @param string|null $name Key for the mailer
39
	 * @return \Aimeos\Base\Mail\Iface Mail object
40
	 */
41
	public function get( ?string $name = null ) : \Aimeos\Base\Mail\Iface
42
	{
43
		return new \Aimeos\Base\Mail\Typo3( $this->closure );
44
	}
45
}
46