| Total Complexity | 9 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | class Timestamps implements BehaviourInterface |
||
| 12 | { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $createColumn; |
||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $updateColumn; |
||
| 22 | |||
| 23 | public function __construct($createColumn = 'created_at', $updateColumn = 'updated_at') |
||
| 24 | { |
||
| 25 | $this->createColumn = $createColumn; |
||
| 26 | $this->updateColumn = $updateColumn; |
||
| 27 | } |
||
| 28 | |||
| 29 | public function getName() |
||
| 30 | { |
||
| 31 | return 'timestamps'; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function onSave(/** @scrutinizer ignore-unused */Mapper $mapper, ActionInterface $action) |
||
| 51 | } |
||
| 52 | } |
||
| 53 |