@@ -3,4 +3,4 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Keppler\Url\Exceptions; |
| 5 | 5 | |
| 6 | -class ComponentNotFoundException extends \Exception{}; |
|
| 7 | 6 | \ No newline at end of file |
| 7 | +class ComponentNotFoundException extends \Exception {}; |
|
| 8 | 8 | \ No newline at end of file |
@@ -3,4 +3,4 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Keppler\Url\Exceptions; |
| 5 | 5 | |
| 6 | -class MalformedUrlException extends \Exception{}; |
|
| 7 | 6 | \ No newline at end of file |
| 7 | +class MalformedUrlException extends \Exception {}; |
|
| 8 | 8 | \ No newline at end of file |
@@ -3,4 +3,4 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Keppler\Url\Exceptions; |
| 5 | 5 | |
| 6 | -class SchemeNotSupportedException extends \Exception{}; |
|
| 7 | 6 | \ No newline at end of file |
| 7 | +class SchemeNotSupportedException extends \Exception {}; |
|
| 8 | 8 | \ No newline at end of file |
@@ -8,4 +8,4 @@ |
||
| 8 | 8 | * |
| 9 | 9 | * @package Keppler\Url\Scheme\Exceptions |
| 10 | 10 | */ |
| 11 | -class ImmutableException extends \Exception{} |
|
| 12 | 11 | \ No newline at end of file |
| 12 | +class ImmutableException extends \Exception {} |
|
| 13 | 13 | \ No newline at end of file |
@@ -3,4 +3,4 @@ |
||
| 3 | 3 | |
| 4 | 4 | namespace Keppler\Url\Exceptions; |
| 5 | 5 | |
| 6 | -class InvalidComponentsException extends \Exception{}; |
|
| 7 | 6 | \ No newline at end of file |
| 7 | +class InvalidComponentsException extends \Exception {}; |
|
| 8 | 8 | \ No newline at end of file |
@@ -80,8 +80,8 @@ |
||
| 80 | 80 | * @throws ComponentNotFoundException |
| 81 | 81 | */ |
| 82 | 82 | protected function getValueIn(array $in, $value) { |
| 83 | - foreach($in as $element) { |
|
| 84 | - if($element === $value) { |
|
| 83 | + foreach ($in as $element) { |
|
| 84 | + if ($element === $value) { |
|
| 85 | 85 | return $value; |
| 86 | 86 | } |
| 87 | 87 | } |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | { |
| 115 | 115 | $result = []; |
| 116 | 116 | |
| 117 | - foreach($array as $item) { |
|
| 118 | - if(!in_array($item, $args[0])) { |
|
| 117 | + foreach ($array as $item) { |
|
| 118 | + if (!in_array($item, $args[0])) { |
|
| 119 | 119 | continue; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $result = []; |
| 136 | 136 | |
| 137 | - foreach($array as $key => $item) { |
|
| 138 | - if(!in_array($key, $args[0])) { |
|
| 137 | + foreach ($array as $key => $item) { |
|
| 138 | + if (!in_array($key, $args[0])) { |
|
| 139 | 139 | continue; |
| 140 | 140 | } |
| 141 | 141 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $this->queryBag = new MailtoQueryMutable(); |
| 50 | 50 | $this->pathBag = new MailtoPathMutable(); |
| 51 | 51 | |
| 52 | - if(null !== $mailto) { |
|
| 52 | + if (null !== $mailto) { |
|
| 53 | 53 | $this->populate($mailto); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -440,8 +440,8 @@ discard block |
||
| 440 | 440 | { |
| 441 | 441 | $result = []; |
| 442 | 442 | |
| 443 | - foreach($args as $key => $item) { |
|
| 444 | - if(!$this->has($item)) { |
|
| 443 | + foreach ($args as $key => $item) { |
|
| 444 | + if (!$this->has($item)) { |
|
| 445 | 445 | throw new ComponentNotFoundException(sprintf('Component %s does not exist in %s', |
| 446 | 446 | $key, __CLASS__)); |
| 447 | 447 | } |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | */ |
| 488 | 488 | public function get($key) |
| 489 | 489 | { |
| 490 | - if ( ! $this->has($key)) { |
|
| 490 | + if (!$this->has($key)) { |
|
| 491 | 491 | throw new ComponentNotFoundException(sprintf('Component %s does not exist in %s', |
| 492 | 492 | $key, __CLASS__)); |
| 493 | 493 | } |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | */ |
| 506 | 506 | public function set($key, $value): MutableBagInterface |
| 507 | 507 | { |
| 508 | - if ( ! $this->has($key)) { |
|
| 508 | + if (!$this->has($key)) { |
|
| 509 | 509 | throw new ComponentNotFoundException(sprintf('Component %s does not exist in %s', |
| 510 | 510 | $key, __CLASS__)); |
| 511 | 511 | } |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | $encodedComma = '%2C'; // only valid encoded delimiter - encoded comma |
| 558 | 558 | $trim = $encodedComma.','; |
| 559 | 559 | |
| 560 | - if ( ! empty($this->cc)) { |
|
| 560 | + if (!empty($this->cc)) { |
|
| 561 | 561 | $query .= '&to='; |
| 562 | 562 | foreach ($this->to as $value) { |
| 563 | 563 | if ($urlEncode) { |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | $query = rtrim($query, $trim); |
| 571 | 571 | } |
| 572 | 572 | |
| 573 | - if ( ! empty($this->cc)) { |
|
| 573 | + if (!empty($this->cc)) { |
|
| 574 | 574 | $query .= '&cc='; |
| 575 | 575 | foreach ($this->cc as $value) { |
| 576 | 576 | if ($urlEncode) { |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | $query = rtrim($query, $trim); |
| 584 | 584 | } |
| 585 | 585 | |
| 586 | - if ( ! empty($this->bcc)) { |
|
| 586 | + if (!empty($this->bcc)) { |
|
| 587 | 587 | $query .= '&bcc='; |
| 588 | 588 | foreach ($this->bcc as $value) { |
| 589 | 589 | if ($urlEncode) { |