protected function normalizeCastString($cast)
    {
        switch ($cast) {

            case 'bool':
            case 'boolean':
                $cast = AttributeCast::BOOLEAN;
                break;

            case 'decimal':
            case 'double':
            case 'float':
            case 'real':
                $cast = AttributeCast::FLOAT;
                break;

            case 'int':
            case 'integer':
                $cast = AttributeCast::INTEGER;
                break;

            case 'date':
            case 'datetime':
                $cast = AttributeCast::DATE;
                break;
        }

        return $cast;
    }
protected function normalizeCastString($cast)
    {
        switch ($cast) {

            case 'bool':
            case 'boolean':
                $cast = AttributeCast::BOOLEAN;
                break;

            case 'decimal':
            case 'double':
            case 'float':
            case 'real':
                $cast = AttributeCast::FLOAT;
                break;

            case 'int':
            case 'integer':
                $cast = AttributeCast::INTEGER;
                break;

            case 'date':
            case 'datetime':
                $cast = AttributeCast::DATE;
                break;
        }

        return $cast;
    }
protected function normalizeCastString ( $ cast ) { switch ( $ cast ) { case 'bool' : case 'boolean' : $ cast = AttributeCast :: BOOLEAN ; break ; case 'decimal' : case 'double' : case 'float' : case 'real' : $ cast = AttributeCast :: FLOAT ; break ; case 'int' : case 'integer' : $ cast = AttributeCast :: INTEGER ; break ; case 'date' : case 'datetime' : $ cast = AttributeCast :: DATE ; break ; } return $ cast ; }
Normalizes a cast string to enum value if possible.

@param string $cast
@return string
Normalizes a cast string to enum value if possible .