code cleanup (#602)

This commit is contained in:
Kevin Papst
2019-02-26 02:26:37 +01:00
committed by GitHub
parent 03aa4c9ddc
commit 86832fb703
8 changed files with 12 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
<?php
/*
* This file is part of the AdminLTE bundle.
* This file is part of the Kimai time-tracking app.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.

View File

@@ -73,6 +73,7 @@ class ThemeEvent extends Event
public function addContent(string $content)
{
$this->content .= $content;
return $this;
}
}

View File

@@ -66,7 +66,6 @@ class ThemeOptionsSubscriber implements EventSubscriberInterface
$skin = '';
foreach ($user->getPreferences() as $ref) {
$name = $ref->getName();
switch ($name) {
case UserPreference::SKIN:

View File

@@ -88,7 +88,7 @@ class Kernel extends BaseKernel
continue;
}
yield new $pluginClass;
yield new $pluginClass();
}
}

View File

@@ -4,8 +4,8 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="myModalLabel">{{ 'modal.columns.title'|trans }}</h4>
<button type="button" class="close" data-dismiss="modal" aria-label="{{ 'action.close'|trans }}"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="data_table_modal_label">{{ 'modal.columns.title'|trans }}</h4>
</div>
<div class="modal-body">
<form name="{{ name }}_visibility">

View File

@@ -46,7 +46,7 @@
</li>
{% endif %}
<li>
<a href="{{ path('help') }}">
<a href="{{ constant('App\\Constants::HOMEPAGE') }}/documentation/" target="_blank">
<div class="pull-left image">
<i class="{{ 'help'|icon }} text-gray"></i>
</div>

View File

@@ -9,6 +9,7 @@
namespace App\Tests\Controller;
use App\Constants;
use App\Entity\User;
/**
@@ -33,7 +34,7 @@ class SidebarControllerTest extends ControllerBaseTest
$this->assertContains('<a href="/en/profile/' . $user->getUsername() . '">', $content);
$this->assertContains('<a href="/en/profile/' . $user->getUsername() . '/edit">', $content);
$this->assertContains('<a href="/en/profile/' . $user->getUsername() . '/prefs">', $content);
$this->assertContains('<a href="/en/help/">', $content);
$this->assertContains('<a href="' . Constants::HOMEPAGE . '/documentation/" target="_blank">', $content);
$this->assertContains('<a href="/en/logout">', $content);
}
}