Вход Регистрация
Файл: vendor/intervention/image/src/Orientation.php
Строк: 23
<?php

declare(strict_types=1);

namespace 
InterventionImage;

use 
InterventionImageInterfacesSizeInterface;

enum Orientationstring
{
    case 
PORTRAIT 'portrait';
    case 
LANDSCAPE 'landscape';
    case 
SQUARE 'square';

    
/**
     * Create orientation of given size.
     */
    
public static function fromSize(SizeInterface $size): self
    
{
        return 
match (true) {
            
$size->isPortrait() => self::PORTRAIT,
            
$size->isLandscape() => self::LANDSCAPE,
            default => 
self::SQUARE,
        };
    }
}
Онлайн: 2
Реклама