diff --git a/Autoloader.php b/Autoloader.php index 0ccc01d..2534108 100644 --- a/Autoloader.php +++ b/Autoloader.php @@ -1,14 +1,14 @@ $value) { @@ -15,11 +15,11 @@ public function spin($items){ $items[$key] = $max; } - $random = mt_rand(1,$max); + $random = mt_rand(1, $max); foreach ($items as $item => $max) { - if ($random <= $max){ + if ($random <= $max) { break; } } diff --git a/example.php b/example.php index b9d4a2c..c688a7b 100644 --- a/example.php +++ b/example.php @@ -11,7 +11,7 @@
- Selamat Kamu mendapatkan

". Roll::spin(['SSR ITEM' => 0.1, + Selamat Kamu mendapatkan

".Roll::spin(['SSR ITEM' => 0.1, 'SSR ITEM 2' => 0.2, 'SSR ITEM 3' => 0.3, 'SSR ITEM 4' => 0.4, diff --git a/view/home/body.php b/view/home/body.php index bb0845c..98612fe 100644 --- a/view/home/body.php +++ b/view/home/body.php @@ -2,7 +2,7 @@
- kamu mendapatkan

". Roll::spin()."

" ?> + kamu mendapatkan

".Roll::spin()."

" ?>