Skip to content

Commit

Permalink
AsteriskManager code style fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Kasatkin committed Mar 23, 2016
1 parent c6c8eda commit 78ee4c2
Show file tree
Hide file tree
Showing 3 changed files with 376 additions and 286 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ context incoming {
}
}
```

## Test

```
composer install
phpunit
```
2 changes: 1 addition & 1 deletion src/AGI/RequestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function createRequest($rawRequest)
$lines = explode("\n", trim($rawRequest));
foreach ($lines as $line) {
if (preg_match('/agi_(?P<key>.+):(?P<value>.*)/', $line, $matches)) {
if (isset(self::$namesMap[$matches['key']])) {
if (array_key_exists($matches['key'], self::$namesMap)) {
$matches['key'] = self::$namesMap[$matches['key']];
}
if (preg_match('/arg_\d+/', $matches['key'])) {
Expand Down
Loading

0 comments on commit 78ee4c2

Please sign in to comment.