I will begin with an example after the namespace, you can put {} and write it like this:
namespace Test { class Test { //...какие то методы } } or so
namespace Test; class Test { // какие то методы } so, how to always write {} or ; ?
The second option is more correct. standard: http://www.php-fig.org/psr/psr-2/
for practical reasons, by the way, in the first version of the IDE / editors will add an extra tab on the entire file.
I will add that it is more convenient to use the first option if you want to describe several namespeys in one file. This may be necessary, for example, for automatic generation of files, the purpose of which is to provide code completion in the entire application if the application uses the mapping class name, as, for example, in the Laravel 5 framework. *
Source: https://ru.stackoverflow.com/questions/552489/
All Articles