mago 1.20.1

A comprehensive suite of PHP tooling inspired by Rust’s approach, providing parsing, linting, formatting, and more through a unified CLI and library interface.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[macro_export]
macro_rules! enum_variants {
    ($e: ty) => {{
        use clap::builder::TypedValueParser;
        use strum::VariantNames;

        clap::builder::PossibleValuesParser::new(
            <$e>::VARIANTS.iter().copied().filter(|v| v.parse::<$e>().is_ok()).collect::<Vec<_>>(),
        )
        .map(|s| s.parse::<$e>().unwrap())
    }};
}

#[macro_export]
macro_rules! reporting_arguments {
    () => {};
}