Code style fixes ('<?php Lang::out(' -> '<?= Lang::get(').

This commit is contained in:
Dmitry Khomutov 2018-03-17 10:58:23 +07:00
parent 2a3adf25af
commit 8a29f5aefe
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
24 changed files with 123 additions and 125 deletions

View file

@ -57,9 +57,7 @@ class Application
$this->router = new Router($this, $this->request, $this->config);
if (method_exists($this, 'init')) {
$this->init();
}
$this->init();
}
/**

View file

@ -54,16 +54,6 @@ class Lang
return $string;
}
/**
* Output a specific string from the language file.
*
* @param array ...$params
*/
public static function out(...$params)
{
print call_user_func_array(['PHPCensor\Helper\Lang', 'get'], $params);
}
/**
* Get the currently active language.
*

View file

@ -1,9 +1,16 @@
<?php
use PHPCensor\Helper\Lang;
use PHPCensor\Model\Build;
use PHPCensor\Model\BuildError;
/**
* @var Build $build
* @var BuildError[] $errors
*/
$linkTemplate = $build->getFileLinkTemplate();
/** @var \PHPCensor\Model\BuildError[] $errors */
foreach ($errors as $error):
$link = str_replace('{BASEFILE}', basename($error->getFile()), $linkTemplate);
@ -11,7 +18,6 @@ foreach ($errors as $error):
$link = str_replace('{LINE}', $error->getLineStart(), $link);
$link = str_replace('{LINE_END}', $error->getLineEnd(), $link);
?>
<tr>
<td>
<?php if ($error->getIsNew()): ?>
@ -37,7 +43,5 @@ foreach ($errors as $error):
</a>
</td>
<td class="visible-line-breaks"><?= htmlspecialchars(trim($error->getMessage())); ?></td>
</tr>
<?php endforeach; ?>

View file

@ -19,12 +19,18 @@ use PHPCensor\Model\Build;
<h4>
<?= $build->getProject()->getTitle(); ?>
<?php if ($build->getStatus() == \PHPCensor\Model\Build::STATUS_PENDING): ?>
<small class="pull-right"><?php Lang::out('created_x', $build->getCreateDate()->format('H:i')); ?></small>
<?php elseif ($build->getStatus() == \PHPCensor\Model\Build::STATUS_RUNNING): ?>
<small class="pull-right"><?php Lang::out('started_x', $build->getStartDate()->format('H:i')); ?></small>
<?php if ($build->getStatus() == Build::STATUS_PENDING): ?>
<small class="pull-right">
<?= Lang::get('created_x', $build->getCreateDate()->format('H:i')); ?>
</small>
<?php elseif ($build->getStatus() == Build::STATUS_RUNNING): ?>
<small class="pull-right">
<?= Lang::get('started_x', $build->getStartDate()->format('H:i')); ?>
</small>
<?php endif; ?>
</h4>
<p><?php Lang::out('branch_x', $build->getBranch()); ?></p>
<p>
<?= Lang::get('branch_x', $build->getBranch()); ?>
</p>
</a>
</li>

View file

@ -15,14 +15,14 @@ use PHPCensor\Model\BuildError;
<div class="box">
<div class="box-header">
<h3 class="box-title">
<?php Lang::out('build_details'); ?>
<?= Lang::get('build_details'); ?>
</h3>
</div>
<div class="box-body no-padding">
<table class="table">
<tr>
<th><?php Lang::out('project'); ?></th>
<th><?= Lang::get('project'); ?></th>
<td style="text-align: right">
<a href="<?= APP_URL . 'project/view/' . $build->getProjectId(); ?>">
<i class="fa fa-<?= $build->getProject()->getIcon(); ?>"></i>
@ -32,7 +32,7 @@ use PHPCensor\Model\BuildError;
</tr>
<tr>
<th><?php Lang::out('branch'); ?></th>
<th><?= Lang::get('branch'); ?></th>
<td style="text-align: right">
<?php if (Build::SOURCE_WEBHOOK_PULL_REQUEST === $build->getSource()): ?>
<a href="<?= $build->getRemoteBranchLink(); ?>">
@ -53,7 +53,7 @@ use PHPCensor\Model\BuildError;
</tr>
<tr>
<th><?php Lang::out('environment'); ?></th>
<th><?= Lang::get('environment'); ?></th>
<td style="text-align: right">
<?php
$environment = $build->getEnvironment();
@ -63,7 +63,7 @@ use PHPCensor\Model\BuildError;
</tr>
<tr>
<th><?php Lang::out('merged_branches'); ?></th>
<th><?= Lang::get('merged_branches'); ?></th>
<td style="text-align: right">
<a href="<?= $build->getBranchLink(); ?>">
<i class="fa fa-code-fork"></i> <?= $build->getBranch(); ?>
@ -89,20 +89,20 @@ use PHPCensor\Model\BuildError;
<div class="box">
<div class="box-header">
<h3 class="box-title">
<?php Lang::out('commit_details'); ?>
<?= Lang::get('commit_details'); ?>
</h3>
</div>
<div class="box-body no-padding">
<table class="table">
<tr>
<th><?php Lang::out('build_source'); ?></th>
<th><?= Lang::get('build_source'); ?></th>
<td style="text-align: right">
<?php Lang::out($build->getSourceHumanize()); ?>
<?= Lang::get($build->getSourceHumanize()); ?>
</td>
</tr>
<tr>
<th><?php Lang::out('commit'); ?></th>
<th><?= Lang::get('commit'); ?></th>
<td style="text-align: right">
<a href="<?= $build->getCommitLink(); ?>">
<?= substr($build->getCommitId(), 0, 7); ?>
@ -111,14 +111,14 @@ use PHPCensor\Model\BuildError;
</tr>
<tr>
<th><?php Lang::out('committer'); ?></th>
<th><?= Lang::get('committer'); ?></th>
<td style="text-align: right">
<?= $build->getCommitterEmail(); ?>
</td>
</tr>
<tr>
<th><?php Lang::out('commit_message'); ?></th>
<th><?= Lang::get('commit_message'); ?></th>
<td style="text-align: right">
<?= htmlspecialchars($build->getCommitMessage()); ?>
</td>
@ -132,35 +132,35 @@ use PHPCensor\Model\BuildError;
<div class="box">
<div class="box-header">
<h3 class="box-title">
<?php Lang::out('timing'); ?>
<?= Lang::get('timing'); ?>
</h3>
</div>
<div class="box-body no-padding">
<table class="table">
<tr>
<th><?php Lang::out('created'); ?></th>
<th><?= Lang::get('created'); ?></th>
<td style="text-align: right" class="build-created datetime">
<?= ($build->getCreateDate() ? $build->getCreateDate()->format('Y-m-d H:i:s') : ''); ?>
</td>
</tr>
<tr>
<th><?php Lang::out('started'); ?></th>
<th><?= Lang::get('started'); ?></th>
<td style="text-align: right" class="build-started datetime">
<?= ($build->getStartDate() ? $build->getStartDate()->format('Y-m-d H:i:s') : ''); ?>
</td>
</tr>
<tr>
<th><?php Lang::out('finished'); ?></th>
<th><?= Lang::get('finished'); ?></th>
<td style="text-align: right" class="build-finished datetime">
<?= ($build->getFinishDate() ? $build->getFinishDate()->format('Y-m-d H:i:s') : ''); ?>
</td>
</tr>
<tr>
<th><?php Lang::out('duration'); ?></th>
<th><?= Lang::get('duration'); ?></th>
<td style="text-align: right" class="build-duration duration">
<?= $build->getDuration(); ?> <?= Lang::get('seconds'); ?>
</td>
@ -289,12 +289,12 @@ use PHPCensor\Model\BuildError;
<table class="errors-table table table-hover">
<thead>
<tr>
<th><?php Lang::out('is_new'); ?></th>
<th><?php Lang::out('severity'); ?></th>
<th><?php Lang::out('plugin'); ?></th>
<th><?php Lang::out('file'); ?></th>
<th data-orderable="false"><?php Lang::out('line'); ?></th>
<th data-orderable="false"><?php Lang::out('message'); ?></th>
<th><?= Lang::get('is_new'); ?></th>
<th><?= Lang::get('severity'); ?></th>
<th><?= Lang::get('plugin'); ?></th>
<th><?= Lang::get('file'); ?></th>
<th data-orderable="false"><?= Lang::get('line'); ?></th>
<th data-orderable="false"><?= Lang::get('message'); ?></th>
</tr>
</thead>
<tbody>

View file

@ -5,7 +5,7 @@ use PHPCensor\Helper\Lang;
?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('group_add_edit'); ?></h3>
<h3 class="box-title"><?= Lang::get('group_add_edit'); ?></h3>
</div>
<div class="box-body">

View file

@ -5,7 +5,7 @@ use PHPCensor\Helper\Lang;
?>
<div class="clearfix" style="margin-bottom: 20px;">
<a class="btn btn-success pull-right" href="<?= (APP_URL . 'group/edit'); ?>">
<?php Lang::out('group_add'); ?>
<?= Lang::get('group_add'); ?>
</a>
</div>
@ -13,8 +13,8 @@ use PHPCensor\Helper\Lang;
<table class="table table-hover">
<thead>
<tr>
<th><?php Lang::out('group_title'); ?></th>
<th><?php Lang::out('group_count'); ?></th>
<th><?= Lang::get('group_title'); ?></th>
<th><?= Lang::get('group_count'); ?></th>
<th></th>
</tr>
</thead>
@ -25,13 +25,13 @@ use PHPCensor\Helper\Lang;
<td><?= count($group['projects']); ?></td>
<td>
<div class="btn-group btn-group-right">
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>group/edit/<?= $group['id']; ?>"><?php Lang::out('group_edit'); ?></a>
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>group/edit/<?= $group['id']; ?>"><?= Lang::get('group_edit'); ?></a>
<?php if($this->getUser()->getIsAdmin() && (!count($group['projects']))): ?>
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="<?= APP_URL; ?>group/delete/<?= $group['id']; ?>" class="delete-group"><?php Lang::out('group_delete'); ?></a></li>
<li><a href="<?= APP_URL; ?>group/delete/<?= $group['id']; ?>" class="delete-group"><?= Lang::get('group_delete'); ?></a></li>
</ul>
<?php endif; ?>
</div>

View file

@ -11,7 +11,7 @@ use PHPCensor\Model\Build;
<?php if(empty($builds) || !count($builds)): ?>
<tr class="">
<td colspan="6"><?php Lang::out('no_builds_yet'); ?></td>
<td colspan="6"><?= Lang::get('no_builds_yet'); ?></td>
</tr>
<?php endif; ?>
@ -52,7 +52,7 @@ $branches = $build->getExtra('branches');
<td><a href="<?= APP_URL ?>build/view/<?= $build->getId(); ?>">#<?= str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
<td><span class='label label-<?= $subcls ?>'><?= $status ?></span></td>
<td><?= $build->getCreateDate()->format('Y-m-d H:i:s'); ?></td>
<td><?php Lang::out($build->getSourceHumanize()); ?></td>
<td><?= Lang::get($build->getSourceHumanize()); ?></td>
<td class="hidden-md hidden-sm hidden-xs">
<?php
if (!empty($build->getCommitId())) {
@ -100,13 +100,13 @@ $branches = $build->getExtra('branches');
</td>
<td>
<div class="btn-group btn-group-right">
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>build/view/<?= $build->getId(); ?>"><?php Lang::out('view'); ?></a>
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>build/view/<?= $build->getId(); ?>"><?= Lang::get('view'); ?></a>
<?php if($this->getUser()->getIsAdmin()): ?>
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="<?= APP_URL; ?>build/delete/<?= $build->getId(); ?>" class="delete-build"><?php Lang::out('delete_build'); ?></a></li>
<li><a href="<?= APP_URL; ?>build/delete/<?= $build->getId(); ?>" class="delete-build"><?= Lang::get('delete_build'); ?></a></li>
</ul>
<?php endif; ?>
</div>

View file

@ -24,7 +24,7 @@
<div class="col-sm-8">
<div class="box ">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('project_details'); ?></h3>
<h3 class="box-title"><?= Lang::get('project_details'); ?></h3>
</div>
<div class="box-body">
@ -37,7 +37,7 @@
<div class="col-sm-4">
<div class="box">
<div class="box-body">
<p><?php Lang::out('public_key_help'); ?></p>
<p><?= Lang::get('public_key_help'); ?></p>
<textarea style="width: 90%; height: 150px;"><?= $key; ?></textarea>
</div>
</div>

View file

@ -17,11 +17,11 @@ use PHPCensor\Helper\Lang;
<div class="clearfix" style="margin-bottom: 20px;">
<a class="btn btn-default" href="<?= APP_URL . 'project/edit/' . $project->getId(); ?>">
<?php Lang::out('edit_project'); ?>
<?= Lang::get('edit_project'); ?>
</a>
<a class="btn btn-danger" id="delete-project">
<?php Lang::out('delete_project'); ?>
<?= Lang::get('delete_project'); ?>
</a>
<?php
@ -32,30 +32,30 @@ use PHPCensor\Helper\Lang;
<?php if ($this->getUser()->getIsAdmin()): ?>
<?php if (!empty($environment)): ?>
<a class="btn btn-danger" href="<?= $build_url . '?' . http_build_query(['type' => 'environment', 'id' => $environment, 'debug' => 1]); ?>">
<?php Lang::out('build_now_debug'); ?>
<?= Lang::get('build_now_debug'); ?>
</a>
<?php elseif (!empty($branch)): ?>
<a class="btn btn-danger" href="<?= $build_url . '?' . http_build_query(['type' => 'branch', 'id' => $branch, 'debug' => 1]); ?>">
<?php Lang::out('build_now_debug'); ?>
<?= Lang::get('build_now_debug'); ?>
</a>
<?php else: ?>
<a class="btn btn-danger" href="<?= $build_url . '?' . http_build_query(['debug' => 1]); ?>">
<?php Lang::out('build_now_debug'); ?>
<?= Lang::get('build_now_debug'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
<?php if (!empty($environment)): ?>
<a class="btn btn-success" href="<?= $build_url . '?' . http_build_query(['type' => 'environment', 'id' => $environment]); ?>">
<?php Lang::out('build_now'); ?>
<?= Lang::get('build_now'); ?>
</a>
<?php elseif (!empty($branch)): ?>
<a class="btn btn-success" href="<?= $build_url . '?' . http_build_query(['type' => 'branch', 'id' => $branch]); ?>">
<?php Lang::out('build_now'); ?>
<?= Lang::get('build_now'); ?>
</a>
<?php else: ?>
<a class="btn btn-success" href="<?= $build_url; ?>">
<?php Lang::out('build_now'); ?>
<?= Lang::get('build_now'); ?>
</a>
<?php endif; ?>
<?php endif; ?>
@ -63,16 +63,16 @@ use PHPCensor\Helper\Lang;
<div class="btn-group branch-btn pull-right">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<?php if (!empty($environment)) {
Lang::out('environment_x', $environment);
echo Lang::get('environment_x', $environment);
} elseif (!empty($branch)) {
Lang::out('branch_x', $branch);
echo Lang::get('branch_x', $branch);
} else {
Lang::out('all');
echo Lang::get('all');
} ?>&nbsp;&nbsp;<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>"><?php Lang::out('all'); ?></a></li>
<li><a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>"><?= Lang::get('all'); ?></a></li>
<li class="divider"></li>
<?php if(!empty($environments)): ?>
@ -103,20 +103,20 @@ use PHPCensor\Helper\Lang;
<div class="col-lg-9 col-md-8 col-sm-8">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('builds'); ?> (<?= $total; ?>)</h3>
<h3 class="box-title"><?= Lang::get('builds'); ?> (<?= $total; ?>)</h3>
</div>
<table class="table table-hover">
<thead>
<tr>
<th><?php Lang::out('id'); ?></th>
<th><?php Lang::out('status'); ?></th>
<th><?php Lang::out('date'); ?></th>
<th><?php Lang::out('build_source'); ?></th>
<th class="hidden-md hidden-sm hidden-xs"><?php Lang::out('commit'); ?></th>
<th><?php Lang::out('branch'); ?></th>
<th><?php Lang::out('environment'); ?></th>
<th><?php Lang::out('duration'); ?></th>
<th><?php Lang::out('new_errors'); ?></th>
<th><?= Lang::get('id'); ?></th>
<th><?= Lang::get('status'); ?></th>
<th><?= Lang::get('date'); ?></th>
<th><?= Lang::get('build_source'); ?></th>
<th class="hidden-md hidden-sm hidden-xs"><?= Lang::get('commit'); ?></th>
<th><?= Lang::get('branch'); ?></th>
<th><?= Lang::get('environment'); ?></th>
<th><?= Lang::get('duration'); ?></th>
<th><?= Lang::get('new_errors'); ?></th>
<th></th>
</tr>
</thead>
@ -162,7 +162,7 @@ use PHPCensor\Helper\Lang;
<?php if (in_array($project->getType(), ['github', 'gitlab', 'bitbucket'])): ?>
<div class="box">
<div class="box-header">
<h4 class="box-title"><?php Lang::out('webhooks'); ?></h4>
<h4 class="box-title"><?= Lang::get('webhooks'); ?></h4>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i>
@ -174,18 +174,18 @@ use PHPCensor\Helper\Lang;
<?php switch($project->getType()) {
case 'github':
$url = APP_URL . 'webhook/github/' . $project->getId();
Lang::out('webhooks_help_github', $project->getReference());
echo Lang::get('webhooks_help_github', $project->getReference());
break;
case 'gitlab':
$url = APP_URL. 'webhook/gitlab/' . $project->getId();
Lang::out('webhooks_help_gitlab');
echo Lang::get('webhooks_help_gitlab');
break;
case 'bitbucket':
case 'bitbucket-hg':
$url = APP_URL . 'webhook/bitbucket/' . $project->getId();
Lang::out('webhooks_help_bitbucket', $project->getReference());
echo Lang::get('webhooks_help_bitbucket', $project->getReference());
break;
} ?>
<br><br><strong style="word-wrap: break-word;"><?= $url; ?></strong>
@ -196,7 +196,7 @@ use PHPCensor\Helper\Lang;
<?php if ($project->getSshPublicKey()): ?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('public_key'); ?></h3>
<h3 class="box-title"><?= Lang::get('public_key'); ?></h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
<i class="fa fa-minus"></i>

View file

@ -1,12 +1,12 @@
<?php use PHPCensor\Helper\Lang; ?>
<?php if (isset($emailed)): ?>
<p class="alert alert-success" style="margin-bottom: 0">
<?php Lang::out('reset_emailed'); ?>
<?= Lang::get('reset_emailed'); ?>
</p>
<?php else: ?>
<?php if (empty($error)): ?>
<div class="" style="margin-bottom: 15px;">
<?php Lang::out('reset_header'); ?>
<?= Lang::get('reset_header'); ?>
</div>
<?php else: ?>
<div class="alert alert-danger">
@ -16,12 +16,12 @@
<div class="">
<form class="form" action="<?= APP_URL; ?>session/forgot-password" method="POST">
<div class="form-group">
<label for="email"><?php Lang::out('reset_email_address'); ?></label>
<label for="email"><?= Lang::get('reset_email_address'); ?></label>
<input id="email" name="email" class="form-control" required>
</div>
<div class="form-group">
<input class="btn btn-success" type="submit" value="<?php Lang::out('reset_send_email'); ?>">
<input class="btn btn-success" type="submit" value="<?= Lang::get('reset_send_email'); ?>">
</div>
</form>
</div>

View file

@ -1,9 +1,9 @@
<?php use PHPCensor\Helper\Lang; ?>
<?php if($failed): ?>
<p class="alert alert-danger"><?php Lang::out('login_error'); ?></p>
<p class="alert alert-danger"><?= Lang::get('login_error'); ?></p>
<?php endif; ?>
<?= $form; ?>
<a style="margin-top: -22px;" class="pull-right" href="<?= APP_URL; ?>session/forgot-password">
<?php Lang::out('forgotten_password_link'); ?>
<?= Lang::get('forgotten_password_link'); ?>
</a>

View file

@ -1,18 +1,18 @@
<?php use PHPCensor\Helper\Lang; ?>
<?php if (empty($error)): ?>
<div class="box-header">
<?php Lang::out('reset_enter_password'); ?>
<?= Lang::get('reset_enter_password'); ?>
</div>
<div class="box-body">
<form class="form" action="<?= APP_URL; ?>session/reset-password/<?= $id; ?>/<?= $key; ?>" method="POST">
<div class="form-group">
<label for="password"><?php Lang::out('reset_new_password'); ?></label>
<label for="password"><?= Lang::get('reset_new_password'); ?></label>
<input type="password" id="password" name="password" class="form-control" required>
</div>
<div class="form-group">
<input class="btn btn-success" type="submit" value="<?php Lang::out('reset_change_password'); ?>">
<input class="btn btn-success" type="submit" value="<?= Lang::get('reset_change_password'); ?>">
</div>
</form>
</div>

View file

@ -7,7 +7,7 @@ $user = $this->getUser();
?>
<div class="clearfix" style="margin-bottom: 20px;">
<div class="pull-right btn-group">
<a class="btn btn-success" href="<?= APP_URL; ?>user/add"><?php Lang::out('add_user'); ?></a>
<a class="btn btn-success" href="<?= APP_URL; ?>user/add"><?= Lang::get('add_user'); ?></a>
</div>
</div>
@ -18,9 +18,9 @@ $user = $this->getUser();
<table class="table table-hover">
<thead>
<tr>
<th><?php Lang::out('email_address'); ?></th>
<th><?php Lang::out('name'); ?></th>
<th><?php Lang::out('is_admin'); ?></th>
<th><?= Lang::get('email_address'); ?></th>
<th><?= Lang::get('name'); ?></th>
<th><?= Lang::get('is_admin'); ?></th>
<th></th>
</tr>
</thead>
@ -47,12 +47,12 @@ $user = $this->getUser();
<td>
<?php if($user->getIsAdmin()): ?>
<div class="btn-group btn-group-right">
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>user/edit/<?= $user->getId(); ?>"><?php Lang::out('edit'); ?></a>
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>user/edit/<?= $user->getId(); ?>"><?= Lang::get('edit'); ?></a>
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="<?= APP_URL; ?>user/delete/<?= $user->getId(); ?>" class="delete-user"><?php Lang::out('delete_user'); ?></a></li>
<li><a href="<?= APP_URL; ?>user/delete/<?= $user->getId(); ?>" class="delete-user"><?= Lang::get('delete_user'); ?></a></li>
</ul>
</div>
<?php endif; ?>

View file

@ -4,12 +4,12 @@ use PHPCensor\Helper\Lang;
?>
<?php if (isset($updated)): ?>
<p class="alert alert-success"><?php Lang::out('your_details_updated'); ?></p>
<p class="alert alert-success"><?= Lang::get('your_details_updated'); ?></p>
<?php endif; ?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('update_your_details'); ?></h3>
<h3 class="box-title"><?= Lang::get('update_your_details'); ?></h3>
</div>
<div class="box-body">
<?= $form; ?>

View file

@ -112,7 +112,7 @@ foreach($projects as $project):
<i class="fa fa-lock"></i>
<?php endif; ?>
</div>
<?php Lang::out('view_project'); ?> (<?= $counts[$project->getId()]; ?>) <i class="fa fa-arrow-circle-right"></i>
<?= Lang::get('view_project'); ?> (<?= $counts[$project->getId()]; ?>) <i class="fa fa-arrow-circle-right"></i>
</a>
<?php for ($idx=0; $idx < 5; $idx++) {

View file

@ -111,7 +111,7 @@ if ($buildCount > 0) {
<i class="fa fa-lock"></i>
<?php endif; ?>
</div>
<?php Lang::out('view_project'); ?> (<?= $counts; ?>) <i class="fa fa-arrow-circle-right"></i>
<?= Lang::get('view_project'); ?> (<?= $counts; ?>) <i class="fa fa-arrow-circle-right"></i>
</a>
<?php for ($idx=0; $idx < 5; $idx++) {

View file

@ -2,4 +2,4 @@
use PHPCensor\Helper\Lang;
?><div class=""><?= Lang::out('no_build_errors') ?></div>
?><div class=""><?= Lang::get('no_build_errors') ?></div>

View file

@ -5,7 +5,7 @@ use PHPCensor\Helper\Lang;
?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?= Lang::out('projects_with_build_errors') ?></h3>
<h3 class="box-title"><?= Lang::get('projects_with_build_errors') ?></h3>
</div>
<div class="box-body" id="dashboard-build-errors">
<?= $projects ?>

View file

@ -99,7 +99,7 @@ foreach($builds as $project_id => $project_envs):
<?= $project->getTitle(); ?>
</a>
<?php if (!empty($environment)) { ?>
<sup title="<?php Lang::out('environment'); ?>"><?= $environment ?></sup>
<sup title="<?= Lang::get('environment'); ?>"><?= $environment ?></sup>
<?php } ?>
</h3>
@ -119,7 +119,7 @@ foreach($builds as $project_id => $project_envs):
<i class="fa fa-lock"></i>
<?php endif; ?>
</div>
<?php Lang::out('view_project'); ?> <i class="fa fa-arrow-circle-right"></i>
<?= Lang::get('view_project'); ?> <i class="fa fa-arrow-circle-right"></i>
</a>
<?php for ($idx=0; $idx < 5; $idx++) {

View file

@ -5,7 +5,7 @@ use PHPCensor\Helper\Lang;
?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('latest_builds'); ?></h3>
<h3 class="box-title"><?= Lang::get('latest_builds'); ?></h3>
</div>
<div class="box-body" id="timeline-box">
<?= $timeline ?>

View file

@ -75,13 +75,13 @@ use PHPCensor\Model\Build;
<span><?= $environment; ?></span>
&mdash;
<a href="<?= APP_URL; ?>build/view/<?= $build->getId(); ?>">
<?php Lang::out('build'); ?> #<?= $build->getId(); ?>
<?= Lang::get('build'); ?> #<?= $build->getId(); ?>
</a>
&mdash;
<?php Lang::out($build->getSourceHumanize()); ?>
<?= Lang::get($build->getSourceHumanize()); ?>
<?php if ($newErrorsCount = $build->getNewErrorsCount()): ?>
&mdash;
<?php Lang::out('new_errors'); ?>:
<?= Lang::get('new_errors'); ?>:
<?= $newErrorsCount; ?>
<?php endif; ?>
</h3>

View file

@ -39,9 +39,9 @@ $user = $this->getUser();
var LANGUAGE = '<?= Lang::getLanguage(); ?>';
<?php if (defined('JSON_UNESCAPED_UNICODE')): ?>
var STRINGS = <?= json_encode(Lang::getStrings(), JSON_UNESCAPED_UNICODE); ?>;
var STRINGS = <?= json_encode(Lang::getStrings(), JSON_UNESCAPED_UNICODE); ?>;
<?php else: ?>
var STRINGS = <?= json_encode(Lang::getStrings()); ?>;
var STRINGS = <?= json_encode(Lang::getStrings()); ?>;
<?php endif; ?>
</script>
@ -58,7 +58,7 @@ $user = $this->getUser();
<nav class="navbar navbar-static-top" role="navigation">
<!-- Sidebar toggle button-->
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only"><?php Lang::out('toggle_navigation'); ?></span>
<span class="sr-only"><?= Lang::get('toggle_navigation'); ?></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
@ -72,7 +72,7 @@ $user = $this->getUser();
<span class="label label-info app-pending-count"></span>
</a>
<ul class="dropdown-menu">
<li class="header"><?php Lang::out('n_builds_pending', 0); ?></li>
<li class="header"><?= Lang::get('n_builds_pending', 0); ?></li>
<li>
<ul class="menu app-pending-list">
</ul>
@ -86,7 +86,7 @@ $user = $this->getUser();
<span class="label label-warning app-running-count"></span>
</a>
<ul class="dropdown-menu">
<li class="header"><?php Lang::out('n_builds_running', 0); ?></li>
<li class="header"><?= Lang::get('n_builds_running', 0); ?></li>
<li>
<ul class="menu app-running-list">
</ul>
@ -113,10 +113,10 @@ $user = $this->getUser();
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="<?= APP_URL; ?>user/profile" class="btn btn-default btn-flat"><?php Lang::out('edit_profile'); ?></a>
<a href="<?= APP_URL; ?>user/profile" class="btn btn-default btn-flat"><?= Lang::get('edit_profile'); ?></a>
</div>
<div class="pull-right">
<a href="<?= APP_URL; ?>session/logout" class="btn btn-default btn-flat"><?php Lang::out('sign_out'); ?></a>
<a href="<?= APP_URL; ?>session/logout" class="btn btn-default btn-flat"><?= Lang::get('sign_out'); ?></a>
</div>
</li>
</ul>
@ -138,7 +138,7 @@ $user = $this->getUser();
<img src="https://www.gravatar.com/avatar/<?= md5($user->getEmail()); ?>?d=mm" class="img-circle" alt="<?= $user->getName(); ?>" />
</div>
<div class="pull-left info">
<p><?php Lang::out('hello_name', $user->getName()); ?></p>
<p><?= Lang::get('hello_name', $user->getName()); ?></p>
</div>
</div>
<?php endif; ?>
@ -147,7 +147,7 @@ $user = $this->getUser();
<ul class="sidebar-menu">
<li<?= (array_key_exists('archived', $_GET) ? '' : ' class="active"'); ?>>
<a href="<?= APP_URL; ?>">
<i class="fa fa-dashboard"></i> <span><?php Lang::out('dashboard'); ?></span>
<i class="fa fa-dashboard"></i> <span><?= Lang::get('dashboard'); ?></span>
</a>
</li>
@ -155,23 +155,23 @@ $user = $this->getUser();
<li class="treeview">
<a href="#">
<i class="fa fa-edit"></i>
<span><?php Lang::out('admin_options'); ?></span>
<span><?= Lang::get('admin_options'); ?></span>
<i class="fa fa-angle-left pull-right"></i>
</a>
<ul class="treeview-menu">
<li>
<a href="<?= APP_URL; ?>project/add">
<i class="fa fa-angle-double-right"></i> <?php Lang::out('add_project'); ?>
<i class="fa fa-angle-double-right"></i> <?= Lang::get('add_project'); ?>
</a>
</li>
<li>
<a href="<?= APP_URL; ?>group">
<i class="fa fa-angle-double-right"></i> <?php Lang::out('project_groups'); ?>
<i class="fa fa-angle-double-right"></i> <?= Lang::get('project_groups'); ?>
</a>
</li>
<li>
<a href="<?= APP_URL; ?>user">
<i class="fa fa-angle-double-right"></i> <?php Lang::out('manage_users'); ?>
<i class="fa fa-angle-double-right"></i> <?= Lang::get('manage_users'); ?>
</a>
</li>
</ul>
@ -204,7 +204,7 @@ $user = $this->getUser();
<li class="treeview">
<a href="#">
<i class="fa fa-archive"></i> <span><?php Lang::out('archived_menu'); ?></span>
<i class="fa fa-archive"></i> <span><?= Lang::get('archived_menu'); ?></span>
<i class="fa fa-angle-left pull-right"></i>
</a>

View file

@ -2,7 +2,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title><?php Lang::out('log_in_to_app'); ?></title>
<title><?= Lang::get('log_in_to_app'); ?></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">