| Total Complexity | 7 |
| Total Lines | 57 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | trait HistoryTrait |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | private static $history = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var bool |
||
| 19 | */ |
||
| 20 | private static $isRememberHistory = false; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return array |
||
| 24 | */ |
||
| 25 | public static function getHistory() |
||
| 28 | } |
||
| 29 | |||
| 30 | public static function forgetHistory() |
||
| 31 | { |
||
| 32 | self::$history = []; |
||
| 33 | } |
||
| 34 | |||
| 35 | public static function notRememberHistory() |
||
| 36 | { |
||
| 37 | self::$isRememberHistory = false; |
||
| 38 | } |
||
| 39 | |||
| 40 | public static function rememberHistory() |
||
| 41 | { |
||
| 42 | self::$isRememberHistory = true; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return bool |
||
| 47 | */ |
||
| 48 | public static function isRememberHistory() |
||
| 49 | { |
||
| 50 | return self::$isRememberHistory; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public static function &referenceHistory() |
||
| 57 | { |
||
| 58 | return self::$history; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return int |
||
| 63 | */ |
||
| 64 | public static function countHistory() |
||
| 67 | } |
||
| 68 | } |
||
| 69 |