Permalink
Browse files

Clean up some parentheses and whitespace

  • Loading branch information...
1 parent b2b0ad1 commit 10ded460536d2d671a0f175d41b5480ec27e2f51 @cbandy cbandy committed Dec 10, 2010
Showing with 7 additions and 7 deletions.
  1. +2 −2 classes/kohana/unittest/runner.php
  2. +2 −2 tests.php
  3. +3 −3 views/unittest/results.php
View
4 classes/kohana/unittest/runner.php
@@ -174,8 +174,8 @@ public function generate_report(array $groups, $temp_path, $create_sub_dir = TRU
do
{
$folder_name = date('Y-m-d_H:i:s')
- .(empty($groups) ? '' : '['.implode(',', $groups).']')
- .($count > 0 ? '('.$count.')' : '');
+ .(empty($groups) ? '' : ('['.implode(',', $groups).']'))
+ .(($count > 0) ? ('('.$count.')') : '');
++$count;
}
while (is_dir($folder_path.$folder_name));
View
4 tests.php
@@ -1,11 +1,11 @@
<?php
-if( ! class_exists('Kohana'))
+if ( ! class_exists('Kohana'))
{
die('Please include the kohana bootstrap file (see README.markdown)');
}
-if($file = Kohana::find_file('classes', 'unittest/tests'))
+if ($file = Kohana::find_file('classes', 'unittest/tests'))
{
require_once $file;
View
6 views/unittest/results.php
@@ -21,7 +21,7 @@
<?php echo Form::submit('run', 'Run');?>
<?php echo Form::close();?>
</fieldset>
- <h1><?php echo (is_null($group) ? __('All Groups') : __('Group').': ')?> <?php echo $group?></h1>
+ <h1><?php echo is_null($group) ? __('All Groups') : (__('Group').': ') ?> <?php echo $group ?></h1>
<span class="time"><?php echo __('Time') ?>: <b><?php echo $time?></b></span>
<span class="summary">
<?php echo __('Tests') ?> <b><?php echo $totals['tests']?></b>,
@@ -32,13 +32,13 @@
</span>
<?php if ($xdebug_enabled AND isset($coverage)): ?>
<span class="code_coverage">
- <?php $level_class = ($coverage > 75 ? 'excellent' : ($coverage > 35 ? 'ok' : 'terrible')) ?>
+ <?php $level_class = ($coverage > 75) ? 'excellent' : (($coverage > 35) ? 'ok' : 'terrible') ?>
<?php
echo __('Tests covered :percent of the :codebase',
array
(
':percent' => '<b class="'.$level_class.'">'.num::format($coverage, 2).'%</b>',
- ':codebase' => ( ! empty($coverage_explanation) ? '<span title="'.$coverage_explanation.'" style="display:inline;">modules</span>' : 'codebase')
+ ':codebase' => empty($coverage_explanation) ? 'codebase' : ('<span title="'.$coverage_explanation.'" style="display:inline;">modules</span>'),
)
);
?>,

0 comments on commit 10ded46

Please sign in to comment.