@@ -350,7 +350,7 @@ |
||
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | /** |
| 353 | - * @param $element |
|
| 353 | + * @param string $element |
|
| 354 | 354 | * @return ElementFactory |
| 355 | 355 | */ |
| 356 | 356 | protected function getFactory($element) |
@@ -67,7 +67,7 @@ |
||
| 67 | 67 | $factory = $this->factory(); |
| 68 | 68 | $factory->text = 'Serialize'; |
| 69 | 69 | $factory->attributes->put('class', 'serialized'); |
| 70 | - $factory->displayRule = function () use ($tmp) { |
|
| 70 | + $factory->displayRule = function() use ($tmp) { |
|
| 71 | 71 | return $tmp === 0; |
| 72 | 72 | }; |
| 73 | 73 | $element = $factory->build(); |
@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <div class="div-menu"> |
| 2 | 2 | <?php if ($menu) :?> |
| 3 | - <<?php echo $menu->getType() . $menu->buildAttributes();?>> |
|
| 3 | + <<?php echo $menu->getType() . $menu->buildAttributes(); ?>> |
|
| 4 | 4 | <?php foreach ($menu->all() as $element) :?> |
| 5 | - <?php echo $element->render($renderView);?> |
|
| 6 | - <?php endforeach;?> |
|
| 7 | - </<?php echo $menu->getType();?>> |
|
| 8 | - <?php endif;?> |
|
| 5 | + <?php echo $element->render($renderView); ?> |
|
| 6 | + <?php endforeach; ?> |
|
| 7 | + </<?php echo $menu->getType(); ?>> |
|
| 8 | + <?php endif; ?> |
|
| 9 | 9 | </div> |
| 10 | 10 | \ No newline at end of file |
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php if ($canDisplay) :?> |
| 2 | -<li<?php echo $attributes;?>><a href="<?php echo $url;?>"<?php echo $linkAttributes;?>><?php echo $title;?></a></li> |
|
| 3 | -<?php endif;?> |
|
| 2 | +<li<?php echo $attributes; ?>><a href="<?php echo $url; ?>"<?php echo $linkAttributes; ?>><?php echo $title; ?></a></li> |
|
| 3 | +<?php endif; ?> |
|
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php if ($canDisplay) :?> |
| 2 | -<li<?php echo $attributes;?>> |
|
| 3 | - <a href="<?php echo $url;?>"<?php echo $linkAttributes;?>><?php echo $title;?></a> |
|
| 4 | - <?php echo $builder->render($renderView);?> |
|
| 2 | +<li<?php echo $attributes; ?>> |
|
| 3 | + <a href="<?php echo $url; ?>"<?php echo $linkAttributes; ?>><?php echo $title; ?></a> |
|
| 4 | + <?php echo $builder->render($renderView); ?> |
|
| 5 | 5 | </li> |
| 6 | -<?php endif;?> |
|
| 6 | +<?php endif; ?> |
|
@@ -1,3 +1,3 @@ |
||
| 1 | 1 | <?php if ($canDisplay) :?> |
| 2 | -<li<?php echo $attributes;?>><?php echo $text;?></li> |
|
| 3 | -<?php endif;?> |
|
| 2 | +<li<?php echo $attributes; ?>><?php echo $text; ?></li> |
|
| 3 | +<?php endif; ?> |
|
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php if ($menu) :?> |
| 2 | - <<?php echo $menu->getType() . $menu->buildAttributes();?>> |
|
| 2 | + <<?php echo $menu->getType() . $menu->buildAttributes(); ?>> |
|
| 3 | 3 | <?php foreach ($menu->all() as $element) :?> |
| 4 | - <?php echo $element->render($renderView);?> |
|
| 5 | - <?php endforeach;?> |
|
| 6 | - </<?php echo $menu->getType();?>> |
|
| 7 | -<?php endif;?> |
|
| 8 | 4 | \ No newline at end of file |
| 5 | + <?php echo $element->render($renderView); ?> |
|
| 6 | + <?php endforeach; ?> |
|
| 7 | + </<?php echo $menu->getType(); ?>> |
|
| 8 | +<?php endif; ?> |
|
| 9 | 9 | \ No newline at end of file |
@@ -35,6 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * @inheritdoc |
| 38 | + * @param string $view |
|
| 38 | 39 | */ |
| 39 | 40 | public function setView($view) |
| 40 | 41 | { |
@@ -336,14 +336,14 @@ discard block |
||
| 336 | 336 | $factory->url = url('logout'); |
| 337 | 337 | }); |
| 338 | 338 | |
| 339 | - $builder->insertAfter('index', function (Builder $builder) { |
|
| 339 | + $builder->insertAfter('index', function(Builder $builder) { |
|
| 340 | 340 | $builder->create('users', Link::class, function(LinkFactory $factory) { |
| 341 | 341 | $factory->title = 'Users'; |
| 342 | 342 | $factory->url = url('users'); |
| 343 | 343 | }); |
| 344 | 344 | }); |
| 345 | 345 | |
| 346 | - $builder->insertBefore('users', function (Builder $builder) { |
|
| 346 | + $builder->insertBefore('users', function(Builder $builder) { |
|
| 347 | 347 | $builder->create('profile', Link::class, function(LinkFactory $factory) { |
| 348 | 348 | $factory->title = 'Profile'; |
| 349 | 349 | $factory->url = url('profile'); |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | $this->expectException(\RuntimeException::class); |
| 359 | 359 | |
| 360 | 360 | $builder = $this->builderFactory(); |
| 361 | - $builder->insertBefore('not_exist', function (Builder $builder) {}); |
|
| 361 | + $builder->insertBefore('not_exist', function(Builder $builder) {}); |
|
| 362 | 362 | } |
| 363 | 363 | |
| 364 | 364 | public function testInsertExceptionDuplicate() |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | $factory->title = 'Some'; |
| 375 | 375 | $factory->url = '/'; |
| 376 | 376 | }); |
| 377 | - $builder->insertAfter('home', function (Builder $builder) { |
|
| 377 | + $builder->insertAfter('home', function(Builder $builder) { |
|
| 378 | 378 | $builder->create('some', Text::class, function(TextFactory $factory) { |
| 379 | 379 | $factory->text = 'Duplicate some'; |
| 380 | 380 | }); |
@@ -413,7 +413,7 @@ discard block |
||
| 413 | 413 | }); |
| 414 | 414 | }); |
| 415 | 415 | $builder->create('settings', Link::class, function(LinkFactory $factory) { |
| 416 | - $factory->displayRule = function () {return false;}; |
|
| 416 | + $factory->displayRule = function() {return false; }; |
|
| 417 | 417 | $factory->title = 'Settings'; |
| 418 | 418 | $factory->url = url('/settings'); |
| 419 | 419 | }); |