Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18466

namespace importing: code style

From alex <1j9448a02@lnx159sneakemail.com.invalid>
Newsgroups comp.lang.php
Subject namespace importing: code style
Date 2020-12-23 11:53 +0100
Organization Aioe.org NNTP Server
Message-ID <rrv7jp$5hi$1@gioia.aioe.org> (permalink)

Show all headers | View raw


Usually I just use these two styles:

// Grouping by vendor
use Vendor\{
     Package\Class1,
     Package\Class2,
     OtherPackage\OtherClass,
};

// Grouping by package
use Vendor\Package\{
     Class1,
     Class2,
};
use Vendor\OtherPackage\{
     OtherClass,
};

What style, or rather, what kind of grouping do you prefer?

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

namespace importing: code style alex <1j9448a02@lnx159sneakemail.com.invalid> - 2020-12-23 11:53 +0100
  Re: namespace importing: code style "J.O. Aho" <user@example.net> - 2020-12-23 12:28 +0100

csiph-web