Passed
Push — master ( 460d9b...f6c339 )
by IRFA
01:52
created

Roll::put()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php 
2
/* 
3
	Author:Irfa Ardiansyah <[email protected]>
4
	Simple Items Gatcha with PHP
5
*/
6
namespace Irfa\Gatcha;
7
8
use Irfa\Gatcha\Roulete\Roulete;
9
10
class Roll extends Roulete {
11
12
	private static $items;
13
	private static $return;
0 ignored issues
show
introduced by
The private property $return is not used, and could be removed.
Loading history...
14
15
	public static function put($items)
16
	{
17
		self::$items = $items;
18
19
		return new static();
20
	}
21
	public static function spin() 
22
	{
23
		return self::getItem();
24
	}
25
	private static function getItem(){
26
		$ret =  Roulete::get(self::$items);
27
		self::$items=null;
28
		return $ret;
29
	}
30
}