StyleCI Blog

Ordered Imports by Length and More

December 05, 2016

We’re excited to announce some major improvements to our fixers and presets, and finally, the length_ordered_imports fixer! We’re also pleased to announce that our docs have had a styling overhall.

Our 16 new fixers are:

  • const_visibility_required
  • length_ordered_imports
  • no_blank_lines_after_return
  • no_blank_lines_after_throw
  • no_blank_lines_between_imports
  • no_blank_lines_between_traits
  • no_extra_block_blank_lines
  • no_spaces_outside_offset
  • php_unit_fqcn_annotation
  • phpdoc_add_missing_param_annotation
  • phpdoc_link_to_see
  • pow_to_exponentiation
  • property_visibility_required
  • protected_to_private
  • return_type_declaration
  • single_line_class_definition

Full descriptions of each fixer are available in our docs.

The following new fixers have been added to the symfony preset:

  • noblanklinesafterthrow
  • noblanklinesbetweenimports
  • noextrablockblanklines
  • nospacesoutside_offset
  • phpunitfqcn_annotation
  • phpdoclinkto_see
  • propertyvisibilityrequired
  • returntypedeclaration
  • singlelineclass_definition

The following new fixers have been added to the laravel preset:

  • length_ordered_imports
  • no_blank_lines_after_throw
  • no_blank_lines_between_imports
  • no_blank_lines_between_traits
  • property_visibility_required

The following new fixers have been added to the recommended preset:

  • no_blank_lines_after_throw
  • no_blank_lines_between_imports
  • no_blank_lines_between_traits
  • no_spaces_outside_offset
  • property_visibility_required

Our other changes include:

  • The part of the no_extra_consecutive_blank_lines fixer that removed newlines between imports has been moved to the new no_blank_lines_between_imports fixer.
  • We’ve renamed the ordered_imports fixer to alpha_ordered_imports. The original name will continue to work.
  • We’ve rename and the visibility_required fixer to method_visibility_required. The original name will continue to work.
  • We’ve merged into the psr0 fixer into the psr4 fixer.
  • The new pow_to_exponentiation fixer is “risky”.
  • The simplified_null_return fixer has been marked as “risky” in light of the changes made in PHP 7.1.
  • Support for PHP 7.0 grouped imports.
  • Various bug fixes, of course.