Conditions | 3 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4.3353 |
Changes | 0 |
1 | <?php |
||
19 | 2 | public function toArray(): array |
|
20 | { |
||
21 | 2 | $profiles = []; |
|
22 | 2 | $profilerProfiles = $this->getProfiles(); |
|
23 | 2 | if (!empty($profilerProfiles)) { |
|
24 | foreach ($profilerProfiles as $profile) { |
||
25 | $profiles [] = [ |
||
26 | 'sqlStatement' => $profile->getSqlStatement(), |
||
27 | 'sqlVariables' => $profile->getSqlVariables(), |
||
28 | 'sqlBindTypes' => $profile->getSqlBindTypes(), |
||
29 | 'initialTime' => $profile->getInitialTime(), |
||
30 | 'finalTime' => $profile->getFinalTime(), |
||
31 | 'elapsedSeconds' => $profile->getTotalElapsedSeconds() / 1000000000, |
||
32 | ]; |
||
33 | } |
||
34 | } |
||
35 | |||
36 | 2 | return [ |
|
37 | 2 | 'profiles' => $profiles, |
|
38 | 2 | 'numberTotalStatements' => $this->getNumberTotalStatements(), |
|
39 | 2 | 'totalElapsedSeconds' => $this->getTotalElapsedSeconds() / 1000000000, |
|
40 | 2 | ]; |
|
43 |