@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | return preg_replace_callback( |
| 22 | 22 | '/\{\{\s*(var|uri|get|post|header|cookie|method)(?:\.([a-z0-9-_]+))?\s*\}\}/i', |
| 23 | - function ($matches) use ($transactiondata) { |
|
| 23 | + function($matches) use ($transactiondata) { |
|
| 24 | 24 | return $this->getValueFromPlaceholder( |
| 25 | 25 | $matches[1], |
| 26 | 26 | isset($matches[2]) ? $matches[2] : null, |
@@ -25,15 +25,15 @@ |
||
| 25 | 25 | { |
| 26 | 26 | $value = $this->getValueOrPlaceholder($argument['value'], $transactionData); |
| 27 | 27 | |
| 28 | - return $argument['name'] . '=' . $value . $this->getSetCookieDatePart($argument) |
|
| 29 | - . (isset($argument['domain']) ? '; domain=' . $argument['domain'] : '') |
|
| 30 | - . (isset($argument['path']) ? '; path=' . $argument['path'] : '') |
|
| 28 | + return $argument['name'].'='.$value.$this->getSetCookieDatePart($argument) |
|
| 29 | + . (isset($argument['domain']) ? '; domain='.$argument['domain'] : '') |
|
| 30 | + . (isset($argument['path']) ? '; path='.$argument['path'] : '') |
|
| 31 | 31 | . (isset($argument['secure']) ? '; secure' : ''); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | private function getSetCookieDatePart($argument) |
| 35 | 35 | { |
| 36 | - return isset($argument['ttl']) ? '; expires=' . date( |
|
| 36 | + return isset($argument['ttl']) ? '; expires='.date( |
|
| 37 | 37 | DATE_COOKIE, |
| 38 | 38 | ((new DateTime())->toPhpDateTime()->getTimestamp() + $argument['ttl']) |
| 39 | 39 | ) : ''; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | $transactionData->setResponse( |
| 14 | 14 | $transactionData->getResponse()->withBody( |
| 15 | - new Stream('file://' . $this->getValueOrPlaceholder( |
|
| 15 | + new Stream('file://'.$this->getValueOrPlaceholder( |
|
| 16 | 16 | $argument, |
| 17 | 17 | $transactionData |
| 18 | 18 | )) |
@@ -97,7 +97,7 @@ |
||
| 97 | 97 | ); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - throw new \RuntimeException('Invalid condition specified for route: ' . $route); |
|
| 100 | + throw new \RuntimeException('Invalid condition specified for route: '.$route); |
|
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | private function getConditionsMatcher($matcher) |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | { |
| 11 | 11 | $argument = (int) $argument ?: 200; |
| 12 | 12 | if ($argument < 100 || $argument >= 600) { |
| 13 | - throw new \RuntimeException('Invalid status code: ' . $argument); |
|
| 13 | + throw new \RuntimeException('Invalid status code: '.$argument); |
|
| 14 | 14 | } |
| 15 | 15 | $transactionData->setResponse( |
| 16 | 16 | $transactionData->getResponse()->withStatus($argument) |