diff --git a/app/views/activityfeed/configuration.php b/app/views/activityfeed/configuration.php
index 945f109fe4cbf0ae632cdb6984cda03446d20848..ceb87eb2180dd4251d043433bfa70ff1794c8a9d 100644
--- a/app/views/activityfeed/configuration.php
+++ b/app/views/activityfeed/configuration.php
@@ -1,3 +1,10 @@
+<?php
+/**
+ * @var ActivityfeedController $controller
+ * @var array $modules
+ * @var array $context_translations
+ */
+?>
 <div id="activityEdit">
     <form id="configure_activity" action="<?= $controller->link_for('activityfeed/save') ?>" method="post" class="default" data-dialog>
         <h1><?= _("Anzuzeigende Bereiche:") ?></h1>
diff --git a/app/views/start/_widget.php b/app/views/start/_widget.php
index 13a365cc65dd1b1957a3e2cf4e8cbf0c82e0155c..f343a892e78714cc0bd6e0edcf63684d527c7d80 100644
--- a/app/views/start/_widget.php
+++ b/app/views/start/_widget.php
@@ -1,3 +1,13 @@
+<?php
+/**
+ * @var StartController $controller
+ * @var StudIPPlugin $widget
+ * @var string $admin_title
+ * @var string $content_for_layout
+ * @var Navigation[]|null $icons
+ * @var string|null $admin_url
+ */
+?>
 <div class="ui-widget_head widget-header" id="widget-<?= $widget->widget_id ?>">
     <span class="header-options">
         <? if (isset($icons)): ?>
@@ -18,16 +28,16 @@
 
         <? if (isset($admin_url)): ?>
             <a href="<?= URLHelper::getLink($admin_url) ?>">
-                <?= Icon::create('admin', 'clickable', ['title' => $admin_title])->asImg() ?>
+                <?= Icon::create('admin', Icon::ROLE_CLICKABLE, ['title' => htmlReady($admin_title)]) ?>
             </a>
         <? endif ?>
 
         <a href="<?= $controller->url_for('start/delete/' . $widget->widget_id) ?>">
-            <?= Icon::create('decline', 'clickable', ['title' => _('Entfernen')])->asImg() ?>
+            <?= Icon::create('decline', Icon::ROLE_CLICKABLE, ['title' => _('Entfernen')]) ?>
         </a>
     </span>
     <span id="widgetName<?= $widget->widget_id ?>" class="widget-title">
-        <?= htmlReady(isset($title) ? $title : $widget->getPluginName()) ?>
+        <?= htmlReady($title ?? $widget->getPluginName()) ?>
     </span>
 </div>
 <div id="wid<?=$widget->widget_id?>">
diff --git a/app/views/start/add.php b/app/views/start/add.php
index f53607a437b9b9abaa34cf3755286a1d4f139d06..8b68e059e9278f084429bf45263a199044b53b70 100644
--- a/app/views/start/add.php
+++ b/app/views/start/add.php
@@ -1,3 +1,9 @@
+<?php
+/**
+ * @var StartController $controller
+ * @var StudIPPlugin[] $widgets
+ */
+?>
 <form action="<?= $controller->url_for('start/add') ?>" method="post" class="default">
     <input type="hidden" name="studip_ticket" value="<?= get_ticket() ?>">
     <input type="hidden" name="position" value="0">
diff --git a/app/views/start/edit_defaults.php b/app/views/start/edit_defaults.php
index 1ea3e4b68078b762fa0a516078dff2be998535a8..c9773c9fe1dc25017d18de7ccd6198b757de9ab1 100644
--- a/app/views/start/edit_defaults.php
+++ b/app/views/start/edit_defaults.php
@@ -1,3 +1,11 @@
+<?php
+/**
+ * @var array $initial_widgets
+ * @var StudIPPlugin[] $widgets
+ * @var bool $restricted
+ * @var string $permission
+ */
+?>
 <div class="edit-widgetcontainer">
     <div class="start-widgetcontainer">
         <ul class="portal-widget-list">
@@ -55,4 +63,4 @@
         STUDIP.startpage.init_edit('<?= $permission ?>');
     })
 }(jQuery));
-</script>
\ No newline at end of file
+</script>
diff --git a/app/views/start/edit_mail_address.php b/app/views/start/edit_mail_address.php
index 00ff0b7320f1a3cacc07a08229f5a316a35316ce..47f9a7ff02c983fd0d48b13b1c55629cbfbb7145 100644
--- a/app/views/start/edit_mail_address.php
+++ b/app/views/start/edit_mail_address.php
@@ -1,3 +1,10 @@
+<?php
+/**
+ * @var StartController $controller
+ * @var string $email
+ * @var bool $restricted
+ */
+?>
 <form method="post" class="default" action="<?=$controller->url_for('start/change_mail_address')?>" data-dialog="size=auto">
     <?= CSRFProtection::tokenTag()?>
     <fieldset>
diff --git a/app/views/start/index.php b/app/views/start/index.php
index 8ec9ea07da67eaecef39010e22fbf32df59f7ef8..e742031034b1bd9976e7de4e4af86c91cfc16239 100644
--- a/app/views/start/index.php
+++ b/app/views/start/index.php
@@ -1,3 +1,9 @@
+<?php
+/**
+ * @var array $left
+ * @var array $right
+ */
+?>
 <h1 class="sr-only">
     <? if ($GLOBALS['perm']->have_perm('root')) :?>
         <?= _("Startseite für Root bei Stud.IP")?>
diff --git a/app/views/study_area/tree.php b/app/views/study_area/tree.php
index e1f2557194e14b094971409041110706df69ecb0..79778bbea40884172e7b359126fa7340ea8e53e6 100644
--- a/app/views/study_area/tree.php
+++ b/app/views/study_area/tree.php
@@ -1,3 +1,12 @@
+<?php
+/**
+ * @var StudipStudyArea $node
+ * @var string $open
+ * @var int $layer
+ * @var array $dont_open
+ * @var string $compulsory
+ */
+?>
 <li>
 <? if ($node->id !== 'root' && $node->required_children): ?>
     <input id='<?= htmlReady($node->id) ?>' type='checkbox' <?= $open && !in_array($layer, $dont_open) ? 'checked' : ''?>>
@@ -15,8 +24,8 @@
 <? if ($node->required_children): ?>
     <ul>
     <? foreach ($node->required_children as $child): ?>
-        <?= $this->render_partial('study_area/tree.php', ['node' => $child, 'open' => $open, 'layer' => $layer + 1]) ?>
+        <?= $this->render_partial('study_area/tree.php', ['node' => $child, 'open' => $open, 'layer' => ((int)$layer + 1)]) ?>
     <? endforeach; ?>
     </ul>
 <? endif; ?>
-</li>
\ No newline at end of file
+</li>
diff --git a/app/views/studygroup/browse.php b/app/views/studygroup/browse.php
index 93ec0475351505481ef60c5752561750f4b63d28..6d0ebc4a3de94d0c891489e2938041f1ad046951 100644
--- a/app/views/studygroup/browse.php
+++ b/app/views/studygroup/browse.php
@@ -1,3 +1,19 @@
+<?php
+/**
+ * @var StudygroupController $controller
+ * @var int $anzahl
+ * @var string $sort_type
+ * @var string $sort_order
+ * @var string $q
+ * @var string $closed
+ * @var array $groups
+ * @var User $user
+ * @var int $entries_per_page
+ * @var int $page
+ * @var string $sort
+ */
+?>
+
 <?= $this->render_partial("course/studygroup/_feedback") ?>
 
 <?php
@@ -51,7 +67,7 @@ $headers = [
                             <?= htmlready($group['Name']) ?>
                             <?= $group['visible'] ? '' : "[" . _('versteckt') . "]" ?>
                             <? if ($group['admission_prelim'] == 1) { ?>
-                                <?= Icon::create('lock-locked', 'inactive', ['title' => _('Mitgliedschaft muss beantragt werden')]) ?>
+                                <?= Icon::create('lock-locked', Icon::ROLE_INACTIVE, ['title' => _('Mitgliedschaft muss beantragt werden')]) ?>
                             <? } ?>
                         </a>
                 </td>
@@ -74,7 +90,7 @@ $headers = [
                 </td>
                 <td align="center">
                     <? if ($is_member) : ?>
-                        <?= Icon::create('person', 'inactive', ['title' => _('Sie sind Mitglied in dieser Gruppe')])->asImg() ?>
+                        <?= Icon::create('person', Icon::ROLE_INACTIVE, ['title' => _('Sie sind Mitglied in dieser Gruppe')])->asImg() ?>
                     <? endif; ?>
                 </td>
             </tr>
diff --git a/app/views/terms/index.php b/app/views/terms/index.php
index 03ebf09568361da6ea6f9f556a5e3778b6b0c139..69d116169d710e322d0fa3fc2da4fffc8c8b0bf1 100644
--- a/app/views/terms/index.php
+++ b/app/views/terms/index.php
@@ -1,3 +1,12 @@
+<?php
+/**
+ * @var TermsController $controller
+ * @var string $return_to
+ * @var string $redirect_token
+ * @var string $denial_message
+ * @var string $compulsory
+ */
+?>
 <form action="<?= $controller->link_for('terms', compact('return_to', 'redirect_token')) ?>" method="post">
     <?= CSRFProtection::tokenTag()?>
     <? if ($denial_message): ?>
diff --git a/app/views/tfa/index.php b/app/views/tfa/index.php
index 7905347681895533fac133f6ce010fe2cb27bbec..25ab9533a15886a74e67d12afc94cec2c03abff6 100644
--- a/app/views/tfa/index.php
+++ b/app/views/tfa/index.php
@@ -1,3 +1,9 @@
+<?php
+/**
+ * @var TFASecret $secret
+ * @var TfaController $controller
+ */
+?>
 <p>
     <?= _('Zwei-Faktor-Authentifizierung ist aktiviert') ?>:
     <?= $secret->type == 'app' ? _('Authenticator-App') : _('E-Mail') ?>
diff --git a/app/views/tfa/setup.php b/app/views/tfa/setup.php
index 5c605597ec2eb6351bf2687f2c9aab8834a8b6c4..62278dd2b5f4030eb52f37615dd6c2821bd8112e 100644
--- a/app/views/tfa/setup.php
+++ b/app/views/tfa/setup.php
@@ -1,3 +1,8 @@
+<?php
+/**
+ * @var TfaController $controller
+ */
+?>
 <form class="default" action="<?= $controller->create() ?>" method="post">
     <?= CSRFProtection::tokenTag() ?>
 
diff --git a/app/views/tour/admin_conflicts.php b/app/views/tour/admin_conflicts.php
index 129ef66ba07beec09863bdd3469b619a8bad419b..6634dc601d9d4b2651a5a2d49bd76eb9c516e75d 100644
--- a/app/views/tour/admin_conflicts.php
+++ b/app/views/tour/admin_conflicts.php
@@ -1,5 +1,13 @@
-<? use Studip\LinkButton; ?>
+<?php
+/**
+ * @var TourController $controller
+ * @var array $conflicts
+ * @var array $diff_fields
+ * @var array $diff_step_fields
+ */
 
+use Studip\LinkButton;
+?>
 <h1><?= _('Versions-Konflikte der Touren') ?></h1>
 <form action="<?= $controller->url_for('tour/admin_conflicts') ?>" id="admin_tour_form" method="post">
     <?= CSRFProtection::tokenTag(); ?>
diff --git a/app/views/tour/admin_details.php b/app/views/tour/admin_details.php
index 7c7bcdb55adb60518f3be210f48137012736b462..3fbde8b17070c185187da0eb0d2af6f5efe426a1 100644
--- a/app/views/tour/admin_details.php
+++ b/app/views/tour/admin_details.php
@@ -1,4 +1,16 @@
-<? use Studip\Button, Studip\LinkButton; ?>
+<?php
+/**
+ * @var string $delete_question
+ * @var TourController $controller
+ * @var HelpTour $tour
+ * @var HelpTourAudience $audience
+ * @var string $tour_startpage
+ * @var string $tour_id
+ */
+
+use Studip\Button, Studip\LinkButton;
+?>
+
 <?= $delete_question ?>
 
 <form class="default" action="<?= $controller->url_for('tour/save/' . $tour->tour_id) ?>" method="post">
@@ -182,7 +194,7 @@ if (count($tour->steps)) {
     $widget->addLink(
         _('Schritt hinzufügen'),
         $controller->url_for('tour/edit_step/' . $tour->tour_id . '/' . (count($tour->steps) + 1) . '/new'),
-        Icon::create('add', 'clickable'),
+        Icon::create('add'),
         ['data-dialog' => 'size=auto;reload-on-close']
     );
     $sidebar->addWidget($widget);
diff --git a/app/views/tour/admin_overview.php b/app/views/tour/admin_overview.php
index 7e5880d9e6cd52b901c45a32b580d2ec28908ee2..ed689683475012e93c7f8891416135007c4778fa 100644
--- a/app/views/tour/admin_overview.php
+++ b/app/views/tour/admin_overview.php
@@ -1,4 +1,14 @@
-<? use Studip\Button, Studip\LinkButton; ?>
+<?php
+/**
+ * @var string $delete_question
+ * @var TourController $controller
+ * @var string $tour_searchterm
+ * @var string $filter_text
+ * @var HelpTour[] $tours
+ */
+
+use Studip\Button;
+?>
 <?= $delete_question ?>
 
 <form action="<?= $controller->url_for('tour/admin_overview') ?>" id="admin_tour_form" method="post" class="default">
diff --git a/app/views/tour/edit_step.php b/app/views/tour/edit_step.php
index 4c0cfb8df6931147edd1af88fa9cda68819821b1..199500534a55c125d0b062c4407ec5fa0f214566 100644
--- a/app/views/tour/edit_step.php
+++ b/app/views/tour/edit_step.php
@@ -1,18 +1,24 @@
-<? use Studip\Button, Studip\LinkButton; ?>
+<?php
+/**
+ * @var TourController $controller
+ * @var string $tour_id
+ * @var HelpTourStep $step
+ * @var string $mode
+ * @var string $force_route
+ * @var bool $via_ajax
+ */
+
+use Studip\Button, Studip\LinkButton;
+?>
 
 <div id="edit_tour_step" class="edit_tour_step">
-    <? if (Request::isXhr()) : ?>
-        <? foreach (PageLayout::getMessages() as $msg) : ?>
-            <?= $msg ?>
-        <? endforeach ?>
-    <? endif ?>
     <form id="edit_tour_form" class="default"
           action="<?= $controller->url_for('tour/edit_step/' . $tour_id . '/' . $step->step . '/save') ?>"
           method="post">
         <?= CSRFProtection::tokenTag(); ?>
         <fieldset>
             <input type="hidden" name="tour_step_nr" value="<?= $step->step ?>">
-            <input type="hidden" name="tour_step_editmode" value="<?= $mode ?>">
+            <input type="hidden" name="tour_step_editmode" value="<?= htmlReady($mode) ?>">
             <legend><?= sprintf(_('Schritt %s'), $step->step) ?></legend>
             <label>
                 <?= _('Titel') ?>
diff --git a/app/views/tour/import.php b/app/views/tour/import.php
index 57681a102e233d8fdbff774153b5e4f848c0a1fb..1481cbc41e7e859c013d8cbd42d99426ccdeddc2 100644
--- a/app/views/tour/import.php
+++ b/app/views/tour/import.php
@@ -1,4 +1,10 @@
-<? use Studip\Button, Studip\LinkButton; ?>
+<?php
+/**
+ * @var TourController $controller
+ * @var array $tourdata
+ * @var array $metadata
+ */
+?>
 <form class="default" enctype="multipart/form-data" action="<?= $controller->link_for('tour/import') ?>" method="post">
     <?= CSRFProtection::tokenTag(); ?>
 
diff --git a/app/views/web_migrate/index.php b/app/views/web_migrate/index.php
index 5de26791c10d97532f90ccc4233d07312d4a96ad..b26b90c5981876bf6362cc2f7070cfa55ea9db61 100644
--- a/app/views/web_migrate/index.php
+++ b/app/views/web_migrate/index.php
@@ -1,3 +1,15 @@
+<?php
+/**
+ * @var Migration[] $migrations
+ * @var WebMigrateController $controller
+ * @var string $target
+ * @var string $branch
+ * @var Migrator $migrator
+ * @var int $offset
+ * @var array $backlinks
+ * @var array $descendants
+ */
+?>
 <? if (count($migrations) === 0): ?>
     <?= MessageBox::info(_('Ihr System befindet sich auf dem aktuellen Stand.'))->hideClose() ?>
 <? else: ?>
diff --git a/app/views/wiki/change_courseperms.php b/app/views/wiki/change_courseperms.php
index 4f59fe61a1cf12c1905236f1e2ee30b63fc65935..b0d274287cdac78f7bafa5de92a28913b2f5ef5b 100644
--- a/app/views/wiki/change_courseperms.php
+++ b/app/views/wiki/change_courseperms.php
@@ -1,3 +1,10 @@
+<?php
+/**
+ * @var WikiController $controller
+ * @var bool $restricted
+ * @var string $keyword
+ */
+?>
 <form action="<?= $controller->link_for('wiki/store_courseperms', compact('keyword')) ?>" method="post" class="default">
     <?= CSRFProtection::tokenTag() ?>
 
diff --git a/app/views/wiki/change_page_config.php b/app/views/wiki/change_page_config.php
index 84b99f126ac92c2270f4a56d45048452ddd5be1f..e121c207549424d9626b35cd4fc2d6b4626fe57b 100644
--- a/app/views/wiki/change_page_config.php
+++ b/app/views/wiki/change_page_config.php
@@ -1,3 +1,11 @@
+<?php
+/**
+ * @var WikiController $controller
+ * @var WikiPageConfig $config
+ * @var array $validKeywords
+ * @var string $keyword
+ */
+?>
 <form action="<?= $controller->link_for('wiki/store_page_config', compact('keyword')) ?>" method="post" class="default" id="wiki-config">
     <?= CSRFProtection::tokenTag() ?>
 
diff --git a/app/views/wiki/create.php b/app/views/wiki/create.php
index 927d1f986709bd7d0e57c5f5f89b6659086b5de8..09df6ee9db1361b08814df56bd0a330c705142aa 100644
--- a/app/views/wiki/create.php
+++ b/app/views/wiki/create.php
@@ -1,3 +1,9 @@
+<?php
+/**
+ * @var string $keyword
+ * @var string[] $wiki_page_names
+ */
+?>
 <p>
     <?= _('Hier können Sie eine neue Wiki-Seite erstellen.') ?>
     <br />
diff --git a/app/views/wiki/import.php b/app/views/wiki/import.php
index b95f8761672b8dbf7ea20962efe0506fa6489e6a..1fd39c9076dd588b0d0f20310d586bab35f27cf3 100644
--- a/app/views/wiki/import.php
+++ b/app/views/wiki/import.php
@@ -1,3 +1,15 @@
+<?php
+/**
+ * @var bool $show_wiki_page_form
+ * @var WikiController $controller
+ * @var Course $course
+ * @var bool $success
+ * @var bool $bad_course_search
+ * @var QuickSearch $course_search
+ * @var Course $selected_course
+ * @var array $wiki_pages
+ */
+?>
 <form class="default" method="post"
       name="wiki_import_form"
       data-dialog="size=auto;<?= $show_wiki_page_form ? 'reload-on-close' : '' ?>"
diff --git a/app/views/wiki/info.php b/app/views/wiki/info.php
index 54f9e8628316d9cd03ea69fbd0e2786d66ccdc13..356ccdc19f531318f141e4d96fa2ebe701908cc5 100644
--- a/app/views/wiki/info.php
+++ b/app/views/wiki/info.php
@@ -1,3 +1,14 @@
+<?php
+/**
+ * @var string $keyword
+ * @var WikiPage $last_page
+ * @var WikiPage $first_page
+ * @var User $first_user
+ * @var User $last_user
+ * @var array $backlinks
+ * @var WikiPage[] $descendants
+ */
+?>
 <h1>
     <?= $keyword === 'WikiWikiWeb' ? _("Wiki-Startseite") : htmlReady($keyword) ?>
 </h1>