app/Assets/Helpers.php
/**
	 * Return the 32bit truncated version of a number seen as string.
	 *
	 * @param string $id
	 * @param int    $prevShortId
	 *
	 * @return string updated ID
	 */
Return the 32bit truncated version of a number seen as string.
@param string $id
@param int    $prevShortId

@return string updated ID
Return the 32bit truncated version of a number seen as string . @param string $id @param int $prevShortId @return string updated ID
public static function trancateIf32(string $id, int $prevShortId = 0)
	{
		if (PHP_INT_MAX > 2147483647) {
			return $id;
		}
		$shortId = intval(substr($id, 0, -4));
		if ($shortId <= $prevShortId) {
			$shortId = $prevShortId + 1;
		}
		return $shortId;
	}
public static function trancateIf32 ( string $ id , int $ prevShortId = 0 ) { if ( PHP_INT_MAX > 2147483647 ) { return $ id ; } $ shortId = intval ( substr ( $ id , 0 , - 4 ) ) ; if ( $ shortId <= $ prevShortId ) { $ shortId = $ prevShortId + 1 ; } return $ shortId ; }
Return the 32bit truncated version of a number seen as string.
Return the 32bit truncated version of a number seen as string .
// Chop off the last four digits.