Lines 100.00% 2 / 2
Functions and Methods 100.00% 2 / 2
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
HistoryDetail 100.00% 2 / 2 100.00% 2 / 2 2 100.00% 1 / 1
 includesAttributes 100.00% 1 / 1 100.00% 1 / 1 1
 includesAttributeOnlyChanges 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Contracts\History;
6
7enum HistoryDetail: string
8{
9    case StateChanges = 'state_changes';
10    case StateChangesWithAttributes = 'state_changes_with_attributes';
11    case AllChanges = 'all_changes';
12
13    public function includesAttributes(): bool
14    {
15        return $this !== self::StateChanges;
16    }
17
18    public function includesAttributeOnlyChanges(): bool
19    {
20        return $this === self::AllChanges;
21    }
22}