Skip to content

Releases: MessageCloud/messagecloud-coding-standard

3.0.2

03 Nov 12:11
7daf0ab
Compare
Choose a tag to compare
  • Remove phpcodesniffer composer pluggin in favour of a direct path. This is in response to composer being upgraded to v2

3.0.1

08 Oct 13:09
7ebddf5
Compare
Choose a tag to compare
  • Remove SlevomatCodingStandard.PHP.RequireExplicitAssertion sniff
  • Update slevomat/coding-standard

3.0.0

07 Oct 15:45
Compare
Choose a tag to compare
  • Forbid PHP 4 constructors
  • Forbid deprecated functions
  • Forbid comments starting with #
  • Disallow else if in favour of elseif
  • Forbid dead code
  • Forbid assignments in conditions
  • Require new instances with parentheses
  • Forbid usage of conditions when a simple return can be used
  • Forbid usage of boolean-only ternary operator usage (e.g. $foo ? true : false)
  • Require using Throwable instead of Exception
  • Require use statements to be alphabetically sorted
  • Forbid weak comparisons
  • Require no spacing after spread operator
  • Forbid useless parentheses
  • Require ? when default value is null
  • Forbid uses of multiple traits separated by comma
  • Require no spaces before trait use, between trait uses and one space after trait uses
  • Forbid AND and OR, require && and ||
  • Forbid global
  • Forbid functions inside functions
  • Require PHP function calls in lowercase
  • Forbid dead code
  • Forbid class being in a file with different name
  • Force whitespace before and after concatenation
  • Forbid strings in " unless necessary
  • Forbid braces around string in echo
  • Forbid spaces in type casts
  • Forbid blank line after function opening brace
  • Require 1 line before and after function, except at the top and bottom
  • Require space after language constructs
  • Require space around logical operators
  • Forbid spaces before semicolon ;
  • Forbid spaces around -> operator
  • Forbid useless alias for classes, constants and functions
  • Require /* @var type $foo */ and similar simple inline annotations to be replaced by assert()

2.0.0

24 May 16:07
Compare
Choose a tag to compare

Additions

  • Force whitespace after a type cast
  • Forbid short open tag
  • Require comma after last element in multi-line array
  • Require presence of constant visibility
  • Require usage of null coalesce operator when possible
  • Forbid useless unreachable catch blocks
  • Forbid unused use statements
  • Forbid superfluous leading backslash in use statements
  • Require empty newlines before and after uses
  • Forbid using absolute class name references (except global ones)
  • Require presence of declare(strict_types=1)
  • Require one space between typehint and variable, require no space between nullability sign and typehint

1.0.0

16 Aug 13:18
Compare
Choose a tag to compare

🎉 Initial release of the MessageCloud coding standard, to be used in conjunction with PHP Code Sniffer.