<?xml version="1.0"?>
<documentation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="https://phpcsstandards.github.io/PHPCSDevTools/phpcsdocs.xsd"
    title="New Group Use Declarations"
    >
    <standard>
    <![CDATA[
    The ability to group use statements was introduced in PHP 7.0.
    ]]>
    </standard>
    <code_comparison>
        <code title="Cross-version compatible: use statements without groups.">
        <![CDATA[
use Airworthy\Vendor\My\Project\ClassA;
use Airworthy\Vendor\My\Project\ClassB;
use Airworthy\Vendor\My\Project\ClassC as C;



use function Airworthy\Vendor\My\Project\fn_a;
use function Airworthy\Vendor\My\Project\fn_b;
use function Airworthy\Vendor\My\Project\fn_c;



use const Airworthy\Vendor\My\Project\ConstA;
use const Airworthy\Vendor\My\Project\ConstB;
use const Airworthy\Vendor\My\Project\ConstC;
        ]]>
        </code>
        <code title="PHP &gt;= 7.0: group use statements (without trailing commas).">
        <![CDATA[
use Airworthy\Vendor\My\Project\<em>{
    ClassA,
    ClassB,
    ClassC as C
}</em>;

use function Airworthy\Vendor\My\Project\<em>{
    fn_a,
    fn_b,
    fn_c
}</em>;

use const Airworthy\Vendor\My\Project\<em>{
    ConstA,
    ConstB,
    ConstC
}</em>;
        ]]>
        </code>
    </code_comparison>
    <standard>
    <![CDATA[
    As of PHP 7.2, it is allowed to use a trailing comma after the last item in a group use statement.
    ]]>
    </standard>
    <code_comparison>
        <code title="Cross-version compatible: use statements without groups.">
        <![CDATA[
use Airworthy\Vendor\My\Project\ClassA;
use Airworthy\Vendor\My\Project\ClassC as C;



use function Airworthy\Vendor\My\Project\fn_a;
use function Airworthy\Vendor\My\Project\fn_c;



use const Airworthy\Vendor\My\Project\ConstA;
use const Airworthy\Vendor\My\Project\ConstC;
        ]]>
        </code>
        <code title="PHP &gt;= 7.2: group use statements with trailing commas.">
        <![CDATA[
use Airworthy\Vendor\My\Project\{
    ClassA,
    ClassC as C<em>,</em>
};

use function Airworthy\Vendor\My\Project\{
    fn_a,
    fn_c<em>,</em>
};

use const Airworthy\Vendor\My\Project\{
    ConstA,
    ConstC<em>,</em>
};
        ]]>
        </code>
    </code_comparison>
</documentation>
