Skip to content

Commit 7ff3d32

Browse files
authored
Merge pull request #2 from irfaardy/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2 parents 829ee7e + 142845f commit 7ff3d32

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

Autoloader.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
class Autoloader {
3-
static public function loader($className) {
4-
$filename = str_replace("\\", '/', $className) . ".php";
5-
if (file_exists($filename)) {
6-
include($filename);
7-
if (class_exists($className)) {
8-
return TRUE;
9-
}
10-
}
11-
return FALSE;
12-
}
3+
static public function loader($className) {
4+
$filename = str_replace("\\", '/', $className) . ".php";
5+
if (file_exists($filename)) {
6+
include($filename);
7+
if (class_exists($className)) {
8+
return TRUE;
9+
}
10+
}
11+
return FALSE;
12+
}
1313
}
1414
spl_autoload_register('Autoloader::loader');

Irfa/Roulete.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77

88
class Roulete {
99

10-
public function spin($items){
10+
public function spin($items) {
1111

1212
$max = 0;
1313
foreach ($items as $key => $value) {
1414
$max += $value;
1515
$items[$key] = $max;
1616
}
1717

18-
$random = mt_rand(1,$max);
18+
$random = mt_rand(1, $max);
1919

2020
foreach ($items as $item => $max)
2121
{
22-
if ($random <= $max){
22+
if ($random <= $max) {
2323
break;
2424
}
2525
}

example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="row">
1212
<div class="col-md-12" align="center">
1313
<div class="alert alert-primary">
14-
<?= "<h2>Selamat Kamu mendapatkan </h2><h2>". Roll::spin(['SSR ITEM' => 0.1,
14+
<?= "<h2>Selamat Kamu mendapatkan </h2><h2>".Roll::spin(['SSR ITEM' => 0.1,
1515
'SSR ITEM 2' => 0.2,
1616
'SSR ITEM 3' => 0.3,
1717
'SSR ITEM 4' => 0.4,

view/home/body.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="row">
33
<div class="col-md-5">
44
<div class="alert alert-primary">
5-
<?= "<h2>kamu mendapatkan </h2><h2>". Roll::spin()."</h2>" ?>
5+
<?= "<h2>kamu mendapatkan </h2><h2>".Roll::spin()."</h2>" ?>
66
</div>
77
</div>
88
</div>

0 commit comments

Comments
 (0)