Skip to content
This repository was archived by the owner on Nov 18, 2025. It is now read-only.

Commit f258c25

Browse files
committed
👌 reformat Benchmark.php
1 parent a71acbd commit f258c25

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

framework/core/Benchmark.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
/**
34
* CodeIgniter
45
*
@@ -35,7 +36,7 @@
3536
* @since Version 1.0.0
3637
* @filesource
3738
*/
38-
defined('BASEPATH') OR exit('No direct script access allowed');
39+
defined('BASEPATH') or exit('No direct script access allowed');
3940

4041
/**
4142
* Benchmark Class
@@ -49,7 +50,8 @@
4950
* @author EllisLab Dev Team
5051
* @link https://codeigniter.com/userguide3/libraries/benchmark.html
5152
*/
52-
class CI_Benchmark {
53+
class CI_Benchmark
54+
{
5355

5456
/**
5557
* List of all benchmark markers
@@ -69,7 +71,7 @@ class CI_Benchmark {
6971
*/
7072
public function mark($name)
7173
{
72-
$this->marker[$name] = microtime(TRUE);
74+
$this->marker[$name] = microtime(true);
7375
}
7476

7577
// --------------------------------------------------------------------
@@ -94,19 +96,16 @@ public function mark($name)
9496
*/
9597
public function elapsed_time($point1 = '', $point2 = '', $decimals = 4)
9698
{
97-
if ($point1 === '')
98-
{
99+
if ($point1 === '') {
99100
return '{elapsed_time}';
100101
}
101102

102-
if ( ! isset($this->marker[$point1]))
103-
{
103+
if ( ! isset($this->marker[$point1])) {
104104
return '';
105105
}
106106

107-
if ( ! isset($this->marker[$point2]))
108-
{
109-
$this->marker[$point2] = microtime(TRUE);
107+
if ( ! isset($this->marker[$point2])) {
108+
$this->marker[$point2] = microtime(true);
110109
}
111110

112111
return number_format($this->marker[$point2] - $this->marker[$point1], $decimals);
@@ -129,5 +128,4 @@ public function memory_usage()
129128
{
130129
return '{memory_usage}';
131130
}
132-
133131
}

0 commit comments

Comments
 (0)