Skip to content
Permalink
Browse files

Merge pull request #155 from kubawerlos/operator-linebreak-handle-obj…

…ect-operators

OperatorLinebreakFixer - handle object operators
  • Loading branch information...
kubawerlos committed Oct 12, 2019
2 parents e2e2643 + c719cee commit da51702e20b5a6fde9fb4cb7d88fdbf1e0d557ae
Showing with 6 additions and 1 deletion.
  1. +1 −0 CHANGELOG.md
  2. +1 −1 README.md
  3. +2 −0 src/Fixer/OperatorLinebreakFixer.php
  4. +2 −0 tests/Fixer/OperatorLinebreakFixerTest.php
@@ -2,6 +2,7 @@

## [Unreleased]
- Add PhpdocOnlyAllowedAnnotationsFixer
- Feature: OperatorLinebreakFixer - handle object operators

## v1.15.0 - *2019-08-19*
- Add CommentSurroundedBySpacesFixer
@@ -8,7 +8,7 @@

[![Build status](https://img.shields.io/travis/kubawerlos/php-cs-fixer-custom-fixers/master.svg)](https://travis-ci.org/kubawerlos/php-cs-fixer-custom-fixers)
[![Code coverage](https://img.shields.io/coveralls/github/kubawerlos/php-cs-fixer-custom-fixers/master.svg)](https://coveralls.io/github/kubawerlos/php-cs-fixer-custom-fixers?branch=master)
![Tests](https://img.shields.io/badge/tests-1197-brightgreen.svg)
![Tests](https://img.shields.io/badge/tests-1199-brightgreen.svg)
[![Mutation testing badge](https://badge.stryker-mutator.io/github.com/kubawerlos/php-cs-fixer-custom-fixers/master)](https://stryker-mutator.github.io)
[![Psalm type coverage](https://shepherd.dev/github/kubawerlos/php-cs-fixer-custom-fixers/coverage.svg)](https://shepherd.dev/github/kubawerlos/php-cs-fixer-custom-fixers)

@@ -106,6 +106,8 @@ public function configure(?array $configuration = null): void
new Token([T_CONCAT_EQUAL, '.=']),
new Token([T_COALESCE, '??']),
new Token([T_DOUBLE_ARROW, '=>']),
new Token([T_OBJECT_OPERATOR, '->']),
new Token([T_PAAMAYIM_NEKUDOTAYIM, '::']),
new Token('?'),
new Token(':'),
]
@@ -430,6 +430,8 @@ function foo()
'and', 'or', 'xor', '&&', '||', // Logical
'.', '.=', // String
'??', // Null Coalescing
'->', // Object
'::', // Scope Resolution
] as $operator) {
yield \sprintf('handle %s operator', $operator) => [
\sprintf('<?php

0 comments on commit da51702

Please sign in to comment.
You can’t perform that action at this time.