| Conditions | 4 |
| Paths | 8 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare( strict_types=1 ); |
||
| 37 | public static function getValidTimestamp( array $groups ): int { |
||
| 38 | $checkuser = isset( $groups['checkuser'] ) ? |
||
| 39 | \DateTime::createFromFormat( 'd/m/Y', $groups['checkuser'] )->getTimestamp() : |
||
| 40 | 0; |
||
| 41 | $bureaucrat = isset( $groups['bureaucrat'] ) ? |
||
| 42 | \DateTime::createFromFormat( 'd/m/Y', $groups['bureaucrat'] )->getTimestamp() : |
||
| 43 | 0; |
||
| 44 | |||
| 45 | $timestamp = max( $bureaucrat, $checkuser ); |
||
| 46 | if ( $timestamp === 0 ) { |
||
| 47 | $timestamp = \DateTime::createFromFormat( 'd/m/Y', $groups['sysop'] )->getTimestamp(); |
||
| 48 | } |
||
| 49 | return $timestamp; |
||
| 50 | } |
||
| 61 |