Merged. Thank you raising the issue, Georgios. On Friday, January 18, 2019 at 1:41:12 PM UTC+3, Alexander Makarov wrote: > > After thinking about it more, spaces before should not be mentioned > because these are covered by operators and statements already: > > From section 5, control structures: > > > - There must not be a space after the opening parenthesis > > - There MUST NOT be a space before the closing parenthesis > > From section 6, operators: > > > - All binary and ternary (but not unary) operators MUST be preceded and > followed by at least > one space > > So that leaves us with one addition that is specific for type casting — > https://github.com/php-fig/fig-standards/pull/1141 > > On Wednesday, January 16, 2019 at 3:06:42 PM UTC+3, Georgios Mponos wrote: >> >> FYI it needs some extra attention because in case of an `if` statement >> you do not want a space before.. (at least that's what I think)... or in >> case of an assignment you need the space before. >> >> if((int)$var) { >> >> } >> >> $var = (int) $var2; >> >> Τη Παρασκευή, 28 Δεκεμβρίου 2018 - 5:07:21 μ.μ. UTC+2, ο χρήστης Georgios >> Mponos έγραψε: >>> >>> Hello, >>> >>> I am writing this thread in order to notify you about casting issues >>> that got into my attention. I think that PSR-12 is not dealing with how the >>> casting should be styled >>> >>> https://github.com/squizlabs/PHP_CodeSniffer/pull/2331 >>> >>> Also one more thing that could be useful is this: >>> >>> https://github.com/doctrine/coding-standard/pull/100 >>> >>> I believe that PSR-12 should deal with spaces inside of cast and spaces >>> before the cast. >>> >>> Regards, >>> >>
-- 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 php-fig+unsubscr...@googlegroups.com. To post to this group, send email to php-fig@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/e8d72661-d89b-4b10-b2d6-73d286f8e167%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.