@@ -44,8 +44,8 @@ |
||
44 | 44 | */ |
45 | 45 | public static function getFileString($identifier) |
46 | 46 | { |
47 | - return __DIR__ . self::$path . Configuration::get('language.locale') . |
|
48 | - "/" . $identifier . '.yml'; |
|
47 | + return __DIR__.self::$path.Configuration::get('language.locale'). |
|
48 | + "/".$identifier.'.yml'; |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /** |
@@ -27,9 +27,9 @@ |
||
27 | 27 | public function __construct($value, array $allowedTypes) |
28 | 28 | { |
29 | 29 | $this->message = |
30 | - '[PhalueObjects] Argument [' . $value . '] of type [' . gettype($value) . |
|
31 | - '] is not a valid type.' . ' The allowed type(s) are [' . |
|
32 | - $this->getAllowedTypes($allowedTypes) . ']'; |
|
30 | + '[PhalueObjects] Argument ['.$value.'] of type ['.gettype($value). |
|
31 | + '] is not a valid type.'.' The allowed type(s) are ['. |
|
32 | + $this->getAllowedTypes($allowedTypes).']'; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /** |
@@ -48,8 +48,8 @@ |
||
48 | 48 | { |
49 | 49 | $string = [ ]; |
50 | 50 | foreach ($allowedTypes as $type) { |
51 | - $string[ ] = '(' . $type . ' >= ' . $this->minimum . ', ' . $type . |
|
52 | - ' <= ' . $this->maximum . ')'; |
|
51 | + $string[ ] = '('.$type.' >= '.$this->minimum.', '.$type. |
|
52 | + ' <= '.$this->maximum.')'; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | return $this->arrayToCommaString($string, new Integer(1)); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->date = $date; |
42 | 42 | $this->time = $time; |
43 | 43 | $this->timestamp = (int) $date->getTimestamp() + (int) $time->getTimestamp(); |
44 | - $this->native = self::getDateTime($date . ' ' . $time); |
|
44 | + $this->native = self::getDateTime($date.' '.$time); |
|
45 | 45 | parent::__construct([ $date, $time ]); |
46 | 46 | } |
47 | 47 | |
@@ -111,6 +111,6 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function __toString() |
113 | 113 | { |
114 | - return $this->date . ' ' . $this->time; |
|
114 | + return $this->date.' '.$this->time; |
|
115 | 115 | } |
116 | 116 | } |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | $this->year = $year; |
50 | 50 | $this->month = $month; |
51 | 51 | $this->day = $day; |
52 | - $this->native = new \DateTime($year . '-' . $month . '-' . $day); |
|
52 | + $this->native = new \DateTime($year.'-'.$month.'-'.$day); |
|
53 | 53 | $this->timestamp = $this->native->getTimeStamp(); |
54 | 54 | parent::__construct([ $year, $month, $day ]); |
55 | 55 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | public function __toString() |
82 | 82 | { |
83 | - return $this->year . '-' . $this->month . '-' . $this->day; |
|
83 | + return $this->year.'-'.$this->month.'-'.$this->day; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
@@ -50,7 +50,7 @@ |
||
50 | 50 | */ |
51 | 51 | public static function fromNative(\DateTime $native) |
52 | 52 | { |
53 | - return new static(floatval('0.' . $native->format('u'))); |
|
53 | + return new static(floatval('0.'.$native->format('u'))); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
@@ -86,6 +86,6 @@ |
||
86 | 86 | */ |
87 | 87 | public function addDay($days) |
88 | 88 | { |
89 | - return static::fromNative($this->native->modify($days . ' day')); |
|
89 | + return static::fromNative($this->native->modify($days.' day')); |
|
90 | 90 | } |
91 | 91 | } |
@@ -121,6 +121,6 @@ |
||
121 | 121 | */ |
122 | 122 | public function __toString() |
123 | 123 | { |
124 | - return $this->hour . ':' . $this->minute . ':' . $this->second; |
|
124 | + return $this->hour.':'.$this->minute.':'.$this->second; |
|
125 | 125 | } |
126 | 126 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php namespace BestServedCold\PhalueObjects\Internet; |
2 | 2 | |
3 | -use BestServedCold\PhalueObjects\ValueObject; |
|
4 | 3 | use BestServedCold\PhalueObjects\Exception\InvalidTypeException; |
4 | +use BestServedCold\PhalueObjects\ValueObject; |
|
5 | 5 | |
6 | 6 | final class Email extends ValueObject |
7 | 7 | { |