Code style fixes ('<?php print/echo ...' -> '<?= ...').

This commit is contained in:
Dmitry Khomutov 2018-03-09 18:15:38 +07:00
parent 8d9c4824c7
commit 3783a9dea0
No known key found for this signature in database
GPG Key ID: EC19426474B37AAC
26 changed files with 154 additions and 136 deletions

View File

@ -9,15 +9,15 @@ use PHPCensor\Model\Build;
?>
<li>
<a href="<?php print APP_URL; ?>build/view/<?php print $build->getId(); ?>">
<a href="<?= APP_URL; ?>build/view/<?= $build->getId(); ?>">
<?php if ($build->getCommitterEmail()): ?>
<div class="pull-left">
<img src="https://www.gravatar.com/avatar/<?php print md5($build->getCommitterEmail()); ?>?d=mm&s=40" class="img-circle" alt="">
<img src="https://www.gravatar.com/avatar/<?= md5($build->getCommitterEmail()); ?>?d=mm&s=40" class="img-circle" alt="">
</div>
<?php endif; ?>
<h4>
<?php print $build->getProject()->getTitle(); ?>
<?= $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>
@ -27,4 +27,4 @@ use PHPCensor\Model\Build;
</h4>
<p><?php Lang::out('branch_x', $build->getBranch()); ?></p>
</a>
</li>
</li>

View File

@ -72,7 +72,7 @@ use PHPCensor\Model\BuildError;
$branches = $build->getExtra('branches');
if (!empty($branches)) {
foreach($branches as $branch) {
?><i class="fa fa-code-fork"></i> <?php print $branch ?><?php
?><i class="fa fa-code-fork"></i> <?= $branch ?><?php
}
} else {
?>&mdash;<?php
@ -105,7 +105,7 @@ use PHPCensor\Model\BuildError;
<th><?php Lang::out('commit'); ?></th>
<td style="text-align: right">
<a href="<?= $build->getCommitLink(); ?>">
<?php print substr($build->getCommitId(), 0, 7); ?>
<?= substr($build->getCommitId(), 0, 7); ?>
</a>
</td>
</tr>
@ -113,14 +113,14 @@ use PHPCensor\Model\BuildError;
<tr>
<th><?php Lang::out('committer'); ?></th>
<td style="text-align: right">
<?php print $build->getCommitterEmail(); ?>
<?= $build->getCommitterEmail(); ?>
</td>
</tr>
<tr>
<th><?php Lang::out('commit_message'); ?></th>
<td style="text-align: right">
<?php print $build->getCommitMessage(); ?>
<?= $build->getCommitMessage(); ?>
</td>
</tr>
</table>
@ -175,26 +175,26 @@ use PHPCensor\Model\BuildError;
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li class="active">
<a href="#log" data-toggle="tab"><i class="fa fa-cogs"></i> <?php print Lang::get('build_log'); ?></a>
<a href="#log" data-toggle="tab"><i class="fa fa-cogs"></i> <?= Lang::get('build_log'); ?></a>
</li>
<li class="">
<a href="#errors" data-toggle="tab">
<i class="fa fa-exclamation-triangle"></i> <?php print Lang::get('errors'); ?>
<i class="fa fa-exclamation-triangle"></i> <?= Lang::get('errors'); ?>
<?php if ($data['errors_total'] == 0): ?>
<span class="errors-label label label-danger" style="display: none">0</span>
<?php else: ?>
<span class="errors-label label label-danger"><?php print $data['errors_total']; ?></span>
<span class="errors-label label label-danger"><?= $data['errors_total']; ?></span>
<?php endif; ?>
</a>
</li>
<li class="">
<a href="#information" data-toggle="tab"><i class="fa fa-info-circle"></i> <?php print Lang::get('information'); ?></a>
<a href="#information" data-toggle="tab"><i class="fa fa-info-circle"></i> <?= Lang::get('information'); ?></a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="log">
<pre style="overflow-y: visible; white-space: pre-wrap"><?php print $data['log']; ?></pre>
<pre style="overflow-y: visible; white-space: pre-wrap"><?= $data['log']; ?></pre>
</div>
<div class="tab-pane" id="errors">
@ -298,7 +298,7 @@ use PHPCensor\Model\BuildError;
</tr>
</thead>
<tbody>
<?php print $data['error_html']; ?>
<?= $data['error_html']; ?>
</tbody>
</table>
<div id="paginator">
@ -312,7 +312,7 @@ use PHPCensor\Model\BuildError;
</div>
</div>
<script src="<?php print APP_URL; ?>assets/js/build.js"></script>
<script src="<?= APP_URL; ?>assets/js/build.js"></script>
<script>
var PER_PAGE = <?= $perPage; ?>;
var PAGE = <?= $page; ?>;

View File

@ -1,22 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<title><?php print $project->getTitle(); ?> - PHP Censor</title>
<title><?= $project->getTitle(); ?> - PHP Censor</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/css/ansi-colors.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/css/main.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/css/ansi-colors.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/css/main.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/vendor/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<?php print APP_URL; ?>assets/js/class.js"></script>
<script src="<?php print APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
<script src="<?php print APP_URL; ?>assets/js/app.js?v2" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<?= APP_URL; ?>assets/js/class.js"></script>
<script src="<?= APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
<script src="<?= APP_URL; ?>assets/js/app.js?v2" type="text/javascript"></script>
</head>
<body class="hold-transition skin-black layout-top-nav">
<div class="wrapper">
@ -24,8 +24,8 @@
<nav class="navbar navbar-static-top">
<div class="container">
<div class="navbar-header">
<a href="<?php print APP_URL; ?>" class="logo" title="PHP Censor" style="background-color: #222D32; width: 170px; padding: 0;">
<img src="<?php print APP_URL; ?>assets/img/php-censor-white.svg" width="170" height="auto" alt="PHP Censor" />
<a href="<?= APP_URL; ?>" class="logo" title="PHP Censor" style="background-color: #222D32; width: 170px; padding: 0;">
<img src="<?= APP_URL; ?>assets/img/php-censor-white.svg" width="170" height="auto" alt="PHP Censor" />
</a>
</div>
</div>
@ -65,23 +65,23 @@
<div class="small-box small-box-full bg-<?= $statusClass; ?>">
<div class="inner">
<h3 class="box-title">
<?php print $latest->getProject()->getTitle(); ?> #<?php print $latest->getId(); ?> (<?= $statusText; ?>)
<?= $latest->getProject()->getTitle(); ?> #<?= $latest->getId(); ?> (<?= $statusText; ?>)
</h3>
<p>
<?php if ($latest->getCommitMessage()): ?>
<?php print $latest->getCommitMessage(); ?><br /><br />
<?= $latest->getCommitMessage(); ?><br /><br />
<?php endif; ?>
<strong>Branch: </strong> <?php print $latest->getBranch(); ?><br />
<strong>Committer: </strong> <?php print $latest->getCommitterEmail(); ?>
<strong>Branch: </strong> <?= $latest->getBranch(); ?><br />
<strong>Committer: </strong> <?= $latest->getCommitterEmail(); ?>
<?php if (!empty($latest->getCommitId())): ?>
<br /><strong>Commit: </strong> <?php print $latest->getCommitId(); ?><br>
<br /><strong>Commit: </strong> <?= $latest->getCommitId(); ?><br>
<?php endif; ?>
</p>
</div>
<div class="icon">
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
<i class="fa fa-<?= $project->getIcon(); ?>"></i>
</div>
<div style="clear: both;"></div>
</div>
@ -138,9 +138,9 @@
}
?>
<tr>
<td><a href="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>">#<?php print str_pad($build->getId(), 6, '0', STR_PAD_LEFT); ?></a></td>
<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-<?php echo $class ?>'><?php echo $status ?></span>
<span class='label label-<?= $class; ?>'><?= $status; ?></span>
</td>
<td><?= $build->getCreateDate()->format('Y-m-d H:i:s'); ?></td>
<td>

View File

@ -7,20 +7,20 @@
</style>
</head>
<body>
<div style="background: #<?php print $build->isSuccessful() ? '090' : '900'; ?>; padding: 25px;">
<div style="background: #<?= ($build->isSuccessful() ? '090' : '900'); ?>; padding: 25px;">
<div style="background: #fff; padding: 15px; border-radius: 5px">
<header><?php print $project->getTitle(); ?> - Build #<?php print $build->getId(); ?></header>
<header><?= $project->getTitle(); ?> - Build #<?= $build->getId(); ?></header>
<div>
<p>
Your commit <strong><?php print $build->getCommitId(); ?></strong> generated a
<?php print $build->isSuccessful() ? 'success' : 'failed'; ?> build in project
<strong><?php print $project->getTitle(); ?></strong>.
Your commit <strong><?= $build->getCommitId(); ?></strong> generated a
<?= ($build->isSuccessful() ? 'success' : 'failed'); ?> build in project
<strong><?= $project->getTitle(); ?></strong>.
</p>
<?php print $content; ?>
<?= $content; ?>
</div>
<footer>
You can review <a href="<?php print $build->getCommitLink(); ?>">your commit</a>
and the <a href="<?php print APP_URL . 'build/view/' . $build->getId(); ?>">build log</a>.
You can review <a href="<?= $build->getCommitLink(); ?>">your commit</a>
and the <a href="<?= APP_URL . 'build/view/' . $build->getId(); ?>">build log</a>.
</footer>
</div>
</div>

View File

@ -1,2 +1,11 @@
<p style="margin: 10px; background: #fafafa"><?php print $build->getCommitMessage(); ?></p>
<pre class="ansi_color_bg_black ansi_color_fg_white" style="padding: 4px"><?php print \PHPCensor\Helper\AnsiConverter::convert($build->getLog()); ?></pre>
<?php
use PHPCensor\Helper\AnsiConverter;
?>
<p style="margin: 10px; background: #fafafa">
<?= $build->getCommitMessage(); ?>
</p>
<pre class="ansi_color_bg_black ansi_color_fg_white" style="padding: 4px">
<?= AnsiConverter::convert($build->getLog()); ?>
</pre>

View File

@ -1 +1,3 @@
<p style="margin: 10px; background: #fafafa"><?php print $build->getCommitMessage(); ?></p>
<p style="margin: 10px; background: #fafafa">
<?= $build->getCommitMessage(); ?>
</p>

View File

@ -1,10 +1,14 @@
<?php use PHPCensor\Helper\Lang; ?>
<?php
use PHPCensor\Helper\Lang;
?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php Lang::out('group_add_edit'); ?></h3>
</div>
<div class="box-body">
<?php print $form; ?>
<?= $form; ?>
</div>
</div>
</div>

View File

@ -4,7 +4,7 @@ use PHPCensor\Helper\Lang;
?>
<div class="clearfix" style="margin-bottom: 20px;">
<a class="btn btn-success pull-right" href="<?php print APP_URL . 'group/edit'; ?>">
<a class="btn btn-success pull-right" href="<?= (APP_URL . 'group/edit'); ?>">
<?php Lang::out('group_add'); ?>
</a>
</div>
@ -21,17 +21,17 @@ use PHPCensor\Helper\Lang;
<tbody>
<?php foreach($groups as $group): ?>
<tr>
<td><?php print $group['title']; ?></td>
<td><?php print count($group['projects']); ?></td>
<td><?= $group['title']; ?></td>
<td><?= count($group['projects']); ?></td>
<td>
<div class="btn-group btn-group-right">
<a class="btn btn-default btn-sm" href="<?php echo APP_URL ?>group/edit/<?php print $group['id']; ?>"><?php Lang::out('group_edit'); ?></a>
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>group/edit/<?= $group['id']; ?>"><?php Lang::out('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="<?php echo APP_URL ?>group/delete/<?php print $group['id']; ?>" class="delete-group"><?php Lang::out('group_delete'); ?></a></li>
<li><a href="<?= APP_URL; ?>group/delete/<?= $group['id']; ?>" class="delete-group"><?php Lang::out('group_delete'); ?></a></li>
</ul>
<?php endif; ?>
</div>

View File

@ -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="<?php echo APP_URL ?>build/view/<?php print $build->getId(); ?>"><?php Lang::out('view'); ?></a>
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>build/view/<?= $build->getId(); ?>"><?php Lang::out('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="<?php echo APP_URL ?>build/delete/<?php print $build->getId(); ?>" class="delete-build"><?php Lang::out('delete_build'); ?></a></li>
<li><a href="<?= APP_URL; ?>build/delete/<?= $build->getId(); ?>" class="delete-build"><?php Lang::out('delete_build'); ?></a></li>
</ul>
<?php endif; ?>
</div>

View File

@ -28,7 +28,7 @@
</div>
<div class="box-body">
<?php print $form; ?>
<?= $form; ?>
</div>
</div>
</div>
@ -38,7 +38,7 @@
<div class="box">
<div class="box-body">
<p><?php Lang::out('public_key_help'); ?></p>
<textarea style="width: 90%; height: 150px;"><?php print $key ?></textarea>
<textarea style="width: 90%; height: 150px;"><?= $key; ?></textarea>
</div>
</div>
</div>

View File

@ -7,23 +7,23 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/css/login.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/css/login.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="container">
<div class="row">
<a id="logo" href="/">
<img src="<?php print APP_URL; ?>assets/img/php-censor-white.svg" alt="PHP Censor" width="290" height="auto" /><br />
<img src="<?= APP_URL; ?>assets/img/php-censor-white.svg" alt="PHP Censor" width="290" height="auto" /><br />
</a>
<div class="" id="login-box">
<?php print $content; ?>
<?= $content; ?>
</div>
</div>
</div>
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
</body>
</html>

View File

@ -10,11 +10,11 @@
</div>
<?php else: ?>
<div class="alert alert-danger">
<?php print $error; ?>
<?= $error; ?>
</div>
<?php endif; ?>
<div class="">
<form class="form" action="<?php print APP_URL; ?>session/forgot-password" method="POST">
<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>
<input id="email" name="email" class="form-control" required>

View File

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

View File

@ -5,7 +5,7 @@
</div>
<div class="box-body">
<form class="form" action="<?php print APP_URL; ?>session/reset-password/<?php print $id; ?>/<?php print $key; ?>" method="POST">
<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>
<input type="password" id="password" name="password" class="form-control" required>
@ -18,6 +18,6 @@
</div>
<?php else: ?>
<div class="alert alert-danger" style="margin-bottom: 0">
<?php print $error; ?>
<?= $error; ?>
</div>
<?php endif; ?>

View File

@ -2,7 +2,7 @@
<div class="col-sm-12">
<div class="box">
<div class="box-body">
<?php print $form; ?>
<?= $form; ?>
</div>
</div>
</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="<?php print APP_URL; ?>user/add"><?php Lang::out('add_user'); ?></a>
<a class="btn btn-success" href="<?= APP_URL; ?>user/add"><?php Lang::out('add_user'); ?></a>
</div>
</div>
@ -40,19 +40,19 @@ $user = $this->getUser();
break;
}
?>
<tr class="<?php print $cls; ?>">
<td><a href="<?php echo APP_URL ?>user/edit/<?php print $user->getId(); ?>"><?php print $user->getEmail(); ?></a></td>
<td><?php print htmlspecialchars($user->getName()); ?></td>
<td><?php print $status; ?></td>
<tr class="<?= $cls; ?>">
<td><a href="<?= APP_URL; ?>user/edit/<?= $user->getId(); ?>"><?= $user->getEmail(); ?></a></td>
<td><?= htmlspecialchars($user->getName()); ?></td>
<td><?= $status; ?></td>
<td>
<?php if($user->getIsAdmin()): ?>
<div class="btn-group btn-group-right">
<a class="btn btn-default btn-sm" href="<?php echo APP_URL ?>user/edit/<?php print $user->getId(); ?>"><?php Lang::out('edit'); ?></a>
<a class="btn btn-default btn-sm" href="<?= APP_URL; ?>user/edit/<?= $user->getId(); ?>"><?php Lang::out('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="<?php echo APP_URL ?>user/delete/<?php print $user->getId(); ?>" class="delete-user"><?php Lang::out('delete_user'); ?></a></li>
<li><a href="<?= APP_URL; ?>user/delete/<?= $user->getId(); ?>" class="delete-user"><?php Lang::out('delete_user'); ?></a></li>
</ul>
</div>
<?php endif; ?>

View File

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

View File

@ -102,7 +102,7 @@ foreach($projects as $project):
</div>
<div class="icon">
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
<i class="fa fa-<?= $project->getIcon(); ?>"></i>
</div>
<a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>" class="small-box-footer small-box-footer-project">
<div class="pull-left" style="margin-left: 10px">
@ -112,7 +112,7 @@ foreach($projects as $project):
<i class="fa fa-lock"></i>
<?php endif; ?>
</div>
<?php Lang::out('view_project'); ?> (<?php print $counts[$project->getId()]; ?>) <i class="fa fa-arrow-circle-right"></i>
<?php Lang::out('view_project'); ?> (<?= $counts[$project->getId()]; ?>) <i class="fa fa-arrow-circle-right"></i>
</a>
<?php for ($idx=0; $idx < 5; $idx++) {

View File

@ -1,7 +1,7 @@
<?php foreach ($groups as $group): ?>
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php print $group['title']; ?></h3>
<h3 class="box-title"><?= $group['title']; ?></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>
@ -9,7 +9,7 @@
</div>
</div>
<div class="box-body">
<?php print $group['summary']; ?>
<?= $group['summary']; ?>
</div>
</div>
<?php endforeach; ?>

View File

@ -96,12 +96,12 @@ if ($buildCount > 0) {
</h3>
<p>
<?php print $message; ?>
<?= $message; ?>
</p>
</div>
<div class="icon">
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
<i class="fa fa-<?= $project->getIcon(); ?>"></i>
</div>
<a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>" class="small-box-footer small-box-footer-project">
<div class="pull-left" style="margin-left: 10px">

View File

@ -109,7 +109,7 @@ foreach($builds as $project_id => $project_envs):
</div>
<div class="icon">
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
<i class="fa fa-<?= $project->getIcon(); ?>"></i>
</div>
<a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>" class="small-box-footer small-box-footer-project">
<div class="pull-left" style="margin-left: 10px">

View File

@ -58,7 +58,7 @@ use PHPCensor\Model\Build;
<!-- /.timeline-label -->
<!-- timeline item -->
<li>
<i class="fa fa-<?php print $build->getProject()->getIcon(); ?> bg-<?php print $color; ?>"></i>
<i class="fa fa-<?= $build->getProject()->getIcon(); ?> bg-<?= $color; ?>"></i>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i>
<?php

View File

@ -9,29 +9,29 @@ $user = $this->getUser();
<html>
<head>
<meta charset="UTF-8">
<title><?php print $title; ?><?php print !empty($subtitle) ? ' - ' . $subtitle : ''; ?></title>
<title><?= $title; ?><?= (!empty($subtitle) ? ' - ' . $subtitle : ''); ?></title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/vendor/admin-lte/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/css/ansi-colors.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/css/main.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/admin-lte/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/css/ansi-colors.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/css/main.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?php print APP_URL; ?>assets/vendor/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link href="<?= APP_URL; ?>assets/vendor/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
<script src="<?php print APP_URL; ?>assets/js/class.js"></script>
<script src="<?= APP_URL; ?>assets/js/class.js"></script>
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/jQueryUI/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/jQueryUI/jquery-ui.min.js" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<link href="<?php print APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/plugins/chartjs/Chart.min.js" type="text/javascript"></script>
<script src="<?php print APP_URL; ?>assets/vendor/admin-lte/dist/js/app.min.js" type="text/javascript"></script>
<script src="<?php print APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
<link href="<?= APP_URL; ?>assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/plugins/chartjs/Chart.min.js" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/vendor/admin-lte/dist/js/app.min.js" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/vendor/sprintf-js/dist/sprintf.min.js"></script>
<script src="<?php print APP_URL; ?>assets/js/app.js?v2" type="text/javascript"></script>
<script src="<?= APP_URL; ?>assets/js/app.js?v2" type="text/javascript"></script>
<script>
var APP_URL = '<?= APP_URL; ?>';
@ -45,13 +45,13 @@ $user = $this->getUser();
</script>
</head>
<body class="app-layout <?php print !empty($skin) ? 'skin-' . $skin : 'skin-black'; ?>">
<body class="app-layout <?= (!empty($skin) ? 'skin-' . $skin : 'skin-black'); ?>">
<div class="wrapper row-offcanvas row-offcanvas-left">
<!-- header logo: style can be found in header.less -->
<header class="main-header">
<a href="<?php print APP_URL; ?>" class="logo" title="PHP Censor">
<img src="<?php print APP_URL; ?>assets/img/php-censor-white.svg" width="170" height="auto" alt="PHP Censor" />
<a href="<?= APP_URL; ?>" class="logo" title="PHP Censor">
<img src="<?= APP_URL; ?>assets/img/php-censor-white.svg" width="170" height="auto" alt="PHP Censor" />
</a>
<!-- Header Navbar: style can be found in header.less -->
<nav class="navbar navbar-static-top" role="navigation">
@ -103,19 +103,19 @@ $user = $this->getUser();
<ul class="dropdown-menu">
<!-- User image -->
<li class="user-header">
<img src="https://www.gravatar.com/avatar/<?php print md5($user->getEmail()); ?>?d=mm" class="img-circle" alt="<?php print $user->getName(); ?>" />
<img src="https://www.gravatar.com/avatar/<?= md5($user->getEmail()); ?>?d=mm" class="img-circle" alt="<?= $user->getName(); ?>" />
<p>
<?php print $user->getName(); ?>
<?= $user->getName(); ?>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href="<?php print 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"><?php Lang::out('edit_profile'); ?></a>
</div>
<div class="pull-right">
<a href="<?php print 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"><?php Lang::out('sign_out'); ?></a>
</div>
</li>
</ul>
@ -134,7 +134,7 @@ $user = $this->getUser();
<!-- Sidebar user panel -->
<div class="user-panel">
<div class="pull-left image">
<img src="https://www.gravatar.com/avatar/<?php print md5($user->getEmail()); ?>?d=mm" class="img-circle" alt="<?php print $user->getName(); ?>" />
<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>
@ -144,8 +144,8 @@ $user = $this->getUser();
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul class="sidebar-menu">
<li<?php print (array_key_exists('archived', $_GET) ? '' : ' class="active"'); ?>>
<a href="<?php print APP_URL; ?>">
<li<?= (array_key_exists('archived', $_GET) ? '' : ' class="active"'); ?>>
<a href="<?= APP_URL; ?>">
<i class="fa fa-dashboard"></i> <span><?php Lang::out('dashboard'); ?></span>
</a>
</li>
@ -159,17 +159,17 @@ $user = $this->getUser();
</a>
<ul class="treeview-menu">
<li>
<a href="<?php print APP_URL; ?>project/add">
<a href="<?= APP_URL; ?>project/add">
<i class="fa fa-angle-double-right"></i> <?php Lang::out('add_project'); ?>
</a>
</li>
<li>
<a href="<?php print APP_URL; ?>group">
<a href="<?= APP_URL; ?>group">
<i class="fa fa-angle-double-right"></i> <?php Lang::out('project_groups'); ?>
</a>
</li>
<li>
<a href="<?php print APP_URL; ?>user">
<a href="<?= APP_URL; ?>user">
<i class="fa fa-angle-double-right"></i> <?php Lang::out('manage_users'); ?>
</a>
</li>
@ -181,7 +181,7 @@ $user = $this->getUser();
<li class="treeview">
<a href="#">
<i class="fa fa-folder"></i>
<span><?php print $group['title']; ?></span>
<span><?= $group['title']; ?></span>
<i class="fa fa-angle-left pull-right"></i>
</a>
@ -189,9 +189,9 @@ $user = $this->getUser();
<ul class="treeview-menu">
<?php foreach($group['projects'] as $project): ?>
<li>
<a href="<?php print APP_URL; ?>project/view/<?= $project->getId(); ?>">
<i class="fa fa-<?php print $project->getIcon(); ?>"></i>
<span><?php print $project->getTitle(); ?></span>
<a href="<?= APP_URL; ?>project/view/<?= $project->getId(); ?>">
<i class="fa fa-<?= $project->getIcon(); ?>"></i>
<span><?= $project->getTitle(); ?></span>
</a>
</li>
<?php endforeach; ?>
@ -211,7 +211,7 @@ $user = $this->getUser();
<ul class="treeview-menu">
<?php foreach($archived_projects as $archived_project): ?>
<li>
<a href="<?php print APP_URL; ?>project/view/<?= $archived_project->getId(); ?>">
<a href="<?= APP_URL; ?>project/view/<?= $archived_project->getId(); ?>">
<i class="fa fa-<?= $archived_project->getIcon(); ?>"></i>
<span><?= $archived_project->getTitle(); ?></span>
</a>
@ -231,18 +231,17 @@ $user = $this->getUser();
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="pull-right">
<?php print (!empty($actions) ? $actions : ''); ?>
<?= (!empty($actions) ? $actions : ''); ?>
</div>
<h1>
<?php print !empty($title) ? $title : 'PHP Censor'; ?>
<?= (!empty($title) ? $title : 'PHP Censor'); ?>
<?php if (!empty($subtitle)): ?>
<small><?php print $subtitle; ?></small>
<small><?= $subtitle; ?></small>
<?php endif; ?>
</h1>
</section>
<!-- Main content -->

View File

@ -9,20 +9,20 @@ use PHPCensor\Helper\Lang;
?>
<ul class="pagination">
<?php if ($paginator->getPrevUrl()): ?>
<li><a href="<?php echo $paginator->getPrevUrl(); ?>"><?= Lang::get('prev_link'); ?></a></li>
<li><a href="<?= $paginator->getPrevUrl(); ?>"><?= Lang::get('prev_link'); ?></a></li>
<?php endif; ?>
<?php foreach ($paginator->getPages() as $pageArray): ?>
<?php if ($pageArray['url']): ?>
<li <?php echo $pageArray['isCurrent'] ? 'class="active"' : ''; ?>>
<a href="<?php echo $pageArray['url']; ?>"><?php echo $pageArray['num']; ?></a>
<li <?= $pageArray['isCurrent'] ? 'class="active"' : ''; ?>>
<a href="<?= $pageArray['url']; ?>"><?= $pageArray['num']; ?></a>
</li>
<?php else: ?>
<li class="disabled"><span><?php echo $pageArray['num']; ?></span></li>
<li class="disabled"><span><?= $pageArray['num']; ?></span></li>
<?php endif; ?>
<?php endforeach; ?>
<?php if ($paginator->getNextUrl()): ?>
<li><a href="<?php echo $paginator->getNextUrl(); ?>"><?= Lang::get('next_link'); ?></a></li>
<li><a href="<?= $paginator->getNextUrl(); ?>"><?= Lang::get('next_link'); ?></a></li>
<?php endif; ?>
</ul>

View File

@ -1 +1 @@
Hello <?php print $who; ?>
Hello <?= $who; ?>

View File

@ -40,12 +40,12 @@ class PharTest extends \PHPUnit\Framework\TestCase
{
$directory = $this->buildTemp();
mkdir($directory);
file_put_contents($directory . '/one.php', '<?php echo "one";');
file_put_contents($directory . '/two.php', '<?php echo "two";');
file_put_contents($directory . '/one.php', '<?= "one";');
file_put_contents($directory . '/two.php', '<?= "two";');
mkdir($directory . '/config');
file_put_contents($directory . '/config/config.ini', '[config]');
mkdir($directory . '/views');
file_put_contents($directory . '/views/index.phtml', '<?php echo "hello";');
file_put_contents($directory . '/views/index.phtml', '<?= "hello";');
$this->directory = $directory;
return $directory;
}