Skip to content

Commit

Permalink
Merge pull request #34 from kokspflanze/patch-isset-check
Browse files Browse the repository at this point in the history
change isset check to php7 notation
  • Loading branch information
kokspflanze authored Oct 3, 2019
2 parents a3d9e40 + 9bf0dba commit 54fec06
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ModuleOptionsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
{
$config = $container->get('config');

return new ModuleOptions(isset($config['zfctwig']) ? $config['zfctwig'] : []);
return new ModuleOptions($config['zfctwig'] ?? []);
}

}
2 changes: 1 addition & 1 deletion src/View/HelperPluginManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
/** @var ModuleOptions $options */
$options = $container->get(ModuleOptions::class);
$managerOptions = $options->getHelperManager();
$managerConfigs = isset($managerOptions['configs']) ? $managerOptions['configs'] : [];
$managerConfigs = $managerOptions['configs'] ?? [];

/** @var HelperPluginManager $viewHelper */
//$viewHelper = $container->get('ViewHelperManager');
Expand Down
4 changes: 1 addition & 3 deletions src/View/TwigRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,7 @@ public function render($nameOrModel, $values = null)
}

if ($model && $this->canRenderTrees() && $model->hasChildren()) {
if (!isset($values['content'])) {
$values['content'] = '';
}
$values['content'] = $values['content'] ?? '';
foreach ($model as $child) {
/** @var ModelInterface $child */
if ($this->canRender($child->getTemplate())) {
Expand Down

0 comments on commit 54fec06

Please sign in to comment.