@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace BestServedCold\PhalueObjects\DateTime; |
| 4 | 4 | |
| 5 | +use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface; |
|
| 5 | 6 | use BestServedCold\PhalueObjects\Mathematical\Operator\ArithmeticTrait; |
| 6 | 7 | use BestServedCold\PhalueObjects\Mathematical\Operator\ComparisonTrait; |
| 7 | 8 | use BestServedCold\PhalueObjects\Mathematical\Operator\TypeTrait; |
| 8 | -use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface; |
|
| 9 | 9 | |
| 10 | 10 | /** |
| 11 | 11 | * Class DateTimeTrait |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace BestServedCold\PhalueObjects\DateTime; |
| 4 | 4 | |
| 5 | +use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface; |
|
| 5 | 6 | use BestServedCold\PhalueObjects\DateTime\Unit\Hour; |
| 6 | 7 | use BestServedCold\PhalueObjects\DateTime\Unit\Minute; |
| 7 | 8 | use BestServedCold\PhalueObjects\DateTime\Unit\Second; |
| 8 | 9 | use BestServedCold\PhalueObjects\Variadic; |
| 9 | -use BestServedCold\PhalueObjects\Contract\DateTime as DateTimeInterface; |
|
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * Class Time |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php namespace BestServedCold\PhalueObjects; |
| 2 | 2 | |
| 3 | -use BestServedCold\PhalueObjects\Format\Json; |
|
| 4 | -use BestServedCold\PhalueObjects\Format\Xml; |
|
| 3 | +use BestServedCold\PhalueObjects\Format\Json; |
|
| 4 | +use BestServedCold\PhalueObjects\Format\Xml; |
|
| 5 | 5 | use BestServedCold\PhalueObjects\Format\Yaml; |
| 6 | 6 | |
| 7 | 7 | /** |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace BestServedCold\PhalueObjects; |
| 4 | 4 | |
| 5 | +use BestServedCold\PhalueObjects\Contract\ValueObject as ValueObjectInterface; |
|
| 5 | 6 | use InvalidArgumentException; |
| 6 | -use BestServedCold\PhalueObjects\Contract\ValueObject as ValueObjectInterface; |
|
| 7 | 7 | |
| 8 | 8 | /** |
| 9 | 9 | * Class ValueObject |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | return null; |
| 139 | 139 | case 'unknown type': |
| 140 | 140 | default: |
| 141 | - throw new InvalidArgumentException('Cannot diff type [' . $this->type . '].');
|
|
| 141 | + throw new InvalidArgumentException('Cannot diff type ['.$this->type.'].');
|
|
| 142 | 142 | } |
| 143 | 143 | } |
| 144 | 144 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | return strlen($this->getValue()); |
| 160 | 160 | case 'unknown type': |
| 161 | 161 | default: |
| 162 | - throw new InvalidArgumentException('Cannot count type [' . $this->type . '].');
|
|
| 162 | + throw new InvalidArgumentException('Cannot count type ['.$this->type.'].');
|
|
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | 165 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function getKey($key) |
| 16 | 16 | { |
| 17 | - return $this->keyExists($key) ? $this->getValue()[$key] : false; |
|
| 17 | + return $this->keyExists($key) ? $this->getValue()[ $key ] : false; |
|
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | /** |
@@ -26,8 +26,8 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | public function __construct($value) |
| 28 | 28 | {
|
| 29 | - if (! is_string($value)) {
|
|
| 30 | - throw new InvalidTypeException($value, ['string']); |
|
| 29 | + if (!is_string($value)) {
|
|
| 30 | + throw new InvalidTypeException($value, [ 'string' ]); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | parent::__construct($value); |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | public static function fromArray(array $array, $space = null) |
| 21 | 21 | { |
| 22 | - return new static(implode(',' . $space, $array)); |
|
| 22 | + return new static(implode(','.$space, $array)); |
|
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | /** |
@@ -24,8 +24,8 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | public function __construct($value) |
| 26 | 26 | {
|
| 27 | - if (! is_null($value)) {
|
|
| 28 | - throw new InvalidTypeException($value, ['object']); |
|
| 27 | + if (!is_null($value)) {
|
|
| 28 | + throw new InvalidTypeException($value, [ 'object' ]); |
|
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | parent::__construct($value); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | { |
| 12 | 12 | /** |
| 13 | 13 | * @param $options |
| 14 | - * @return mixed |
|
| 14 | + * @return \BestServedCold\PhalueObjects\Request\Curl |
|
| 15 | 15 | */ |
| 16 | 16 | public static function auto(array $options = []); |
| 17 | 17 | } |
@@ -13,5 +13,5 @@ |
||
| 13 | 13 | * @param $options |
| 14 | 14 | * @return mixed |
| 15 | 15 | */ |
| 16 | - public static function auto(array $options = []); |
|
| 16 | + public static function auto(array $options = [ ]); |
|
| 17 | 17 | } |