For the PSR-12 coding standard I've made a change that forces using short 
form of type keywords i.e. bool instead of boolean, int instead of integer 
etc.:

https://github.com/php-fig/fig-standards/commit/a77993bdf52eb6d5cb9ca37dba3af4df9e3b909c

As Michael Cullum pointed out, I was too fast and it should be discussed. I 
need your answers for the following questions:

1. If this additional rule makes sense?
2. What possible drawbacks are there?

*Why was the change made*

PHP 7.0 introduced scalar types declaration 
<http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration>
 
which does not support long type aliases. Therefore it makes sense to 
enforce primary short type forms to be used to have uniform syntax and 
prevent possible confusion.

*Counter-agruments from Michael*

This could conflict with other PSRs like PSR-5 and seems out of scope of 
> this PSR to be honest.



-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/78e98bf5-7735-4fbf-976a-e49e60e3de2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • [PSR-12] Enfo... 'Alexander Makarov' via PHP Framework Interoperability Group
    • Re: [PSR... Woody Gilk
    • Re: [PSR... Marc Alexander
    • Re: [PSR... Larry Garfield
      • Re: ... 'Alexander Makarov' via PHP Framework Interoperability Group
        • ... Michael Cullum
          • ... 'Alexander Makarov' via PHP Framework Interoperability Group
            • ... Korvin Szanto
            • ... Michael Cullum
              • ... 'Alexander Makarov' via PHP Framework Interoperability Group

Reply via email to