ContainerAlignTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 42
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setVerticalAlign() 0 3 1
A setAlign() 0 3 1
1
<?php
2
3
/**
4
 *  ____  _     _                       _ _
5
 * |  _ \| |__ | |_ ___ _ __ ___   __ _(_) |
6
 * | |_) | '_ \| __/ _ \ '_ ` _ \ / _` | | |
7
 * |  __/| | | | ||  __/ | | | | | (_| | | |
8
 * |_|   |_| |_|\__\___|_| |_| |_|\__,_|_|_|
9
 *
10
 * This file is part of Kristuff\Phtemail.
11
 *
12
 * (c) Kristuff <[email protected]>
13
 *
14
 * For the full copyright and license information, please view the LICENSE
15
 * file that was distributed with this source code.
16
 *
17
 * @version    0.2.0
18
 * @copyright  2017-2020 Kristuff
19
 */
20
21
namespace Kristuff\Phtemail\Core;
22
23
/**
24
 * Allow setting v/h align in a container
25
 */
26
trait ContainerAlignTrait
27
{
28
    /** 
29
     * The vertical alignment
30
     * 
31
     * @access private
32
     * @var string          $verticalAlign
33
     */
34
    protected $verticalAlign = \Kristuff\Phtemail\HtmlEmailBuilder::V_ALIGN_TOP;
35
    
36
    /** 
37
     * The horizontal alignment
38
     * 
39
     * @access private
40
     * @var string          $horizontalAlign
41
     */
42
    protected $horizontalAlign = \Kristuff\Phtemail\HtmlEmailBuilder::H_ALIGN_LEFT;
43
44
    /** 
45
     * Sets the container horizontal alignment   
46
     *
47
     * @access public
48
     * @param string   $value      
49
     * 
50
     * @return void
51
     */
52
    public function setAlign(string $value)
53
    {
54
        $this->horizontalAlign = $value;
55
    }
56
57
    /** 
58
     * Sets the container vertical alignment   
59
     *
60
     * @access public
61
     * @param string   $value      
62
     * 
63
     * @return void
64
     */
65
    public function setVerticalAlign(string $value)
66
    {
67
        $this->verticalAlign = $value;
68
    }
69
}