protected static function getDocumentIconSize($maximumWidth, $maximumHeight) { $size = max($maximumWidth, $maximumHeight); if ($size <= 16) { return 16; } elseif ($size <= 32) { return 32; } elseif ($size <= 48) { return 48; } else { return 512; } }