Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Clean up some parentheses and whitespace

  • Loading branch information...
commit 10ded460536d2d671a0f175d41b5480ec27e2f51 1 parent b2b0ad1
Chris Bandy authored
4  classes/kohana/unittest/runner.php
@@ -174,8 +174,8 @@ public function generate_report(array $groups, $temp_path, $create_sub_dir = TRU
174 174
 			do
175 175
 			{
176 176
 				$folder_name = date('Y-m-d_H:i:s')
177  
-					.(empty($groups) ? '' : '['.implode(',', $groups).']')
178  
-					.($count > 0 ? '('.$count.')' : '');
  177
+					.(empty($groups) ? '' : ('['.implode(',', $groups).']'))
  178
+					.(($count > 0) ? ('('.$count.')') : '');
179 179
 				++$count;
180 180
 			}
181 181
 			while (is_dir($folder_path.$folder_name));
4  tests.php
... ...
@@ -1,11 +1,11 @@
1 1
 <?php
2 2
 
3  
-if( ! class_exists('Kohana'))
  3
+if ( ! class_exists('Kohana'))
4 4
 {
5 5
 	die('Please include the kohana bootstrap file (see README.markdown)');
6 6
 }
7 7
 
8  
-if($file = Kohana::find_file('classes', 'unittest/tests'))
  8
+if ($file = Kohana::find_file('classes', 'unittest/tests'))
9 9
 {
10 10
 	require_once $file;
11 11
 
6  views/unittest/results.php
@@ -21,7 +21,7 @@
21 21
 		<?php echo Form::submit('run', 'Run');?>
22 22
 		<?php echo Form::close();?>
23 23
 	</fieldset>
24  
-	<h1><?php echo  (is_null($group) ? __('All Groups') : __('Group').': ')?> <?php echo $group?></h1>
  24
+	<h1><?php echo is_null($group) ? __('All Groups') : (__('Group').': ') ?> <?php echo $group ?></h1>
25 25
 	<span class="time"><?php echo __('Time') ?>: <b><?php echo $time?></b></span>
26 26
 	<span class="summary">
27 27
 		<?php echo __('Tests') ?> <b><?php echo $totals['tests']?></b>,
@@ -32,13 +32,13 @@
32 32
 	</span>
33 33
 	<?php if ($xdebug_enabled AND isset($coverage)): ?>
34 34
 	<span class="code_coverage">
35  
-		<?php $level_class = ($coverage > 75 ? 'excellent' : ($coverage > 35 ? 'ok' : 'terrible')) ?>
  35
+		<?php $level_class = ($coverage > 75) ? 'excellent' : (($coverage > 35) ? 'ok' : 'terrible') ?>
36 36
 		<?php
37 37
 			echo __('Tests covered :percent of the :codebase',
38 38
 				array
39 39
 				(
40 40
 					':percent'  => '<b class="'.$level_class.'">'.num::format($coverage, 2).'%</b>',
41  
-					':codebase' => ( ! empty($coverage_explanation) ? '<span title="'.$coverage_explanation.'" style="display:inline;">modules</span>' : 'codebase')
  41
+					':codebase' => empty($coverage_explanation) ? 'codebase' : ('<span title="'.$coverage_explanation.'" style="display:inline;">modules</span>'),
42 42
 				)
43 43
 			);
44 44
 		?>,

0 notes on commit 10ded46

Please sign in to comment.
Something went wrong with that request. Please try again.