Skip to content

Commit

Permalink
Use + instead of isset checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 29, 2015
1 parent 495702f commit d610c92
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Controller/Component/RequestHandlerComponent.php
Expand Up @@ -96,19 +96,17 @@ class RequestHandlerComponent extends Component
*/
public function __construct(ComponentRegistry $registry, array $config = [])
{
if (!isset($config['viewClassMap'])) {
$config['viewClassMap'] = [
$config += [
'viewClassMap' => [
'json' => 'Json',
'xml' => 'Xml',
'ajax' => 'Ajax'
];
}
if (!isset($config['inputTypeMap'])) {
$config['inputTypeMap'] = [
],
'inputTypeMap' => [
'json' => ['json_decode', true],
'xml' => [[$this, 'convertXml']],
];
}
]
];
parent::__construct($registry, $config);
}

Expand Down

0 comments on commit d610c92

Please sign in to comment.