• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FriendsOfPHP / PHP-CS-Fixer / 18471 / 7
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 02 Aug 2019 01:14PM UTC
Files 385
Run time 28s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Aug 2019 12:47PM UTC coverage: 92.091% (+0.04%) from 92.053%
COLLECT_COVERAGE=1

push

travis-ci

SpacePossum
feature #4358 SelfStaticAccessorFixer - Introduction (SpacePossum)

This PR was merged into the 2.16-dev branch.

Discussion
----------

SelfStaticAccessorFixer - Introduction

```
$ php php-cs-fixer describe self_static_accessor
Description of self_static_accessor rule.
Inside a final class or anonymous class `self::X` should be preferred to `static::X`.

Fixing examples:
 * Example #1.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,15 +1,15 @@
    <?php
    final class Sample
    {
        private static $A = 1;

        public function getBar()
        {
   -        return static::class.static::test().static::$A;
   +        return self::class.self::test().self::$A;
        }

        private static function test()
        {
            return 'test';
        }
    }

   ----------- end diff -----------

 * Example #2.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,7 +1,7 @@
    <?php
    $a = new class() {
        public function getBar()
        {
   -        return static::class;
   +        return self::class;
        }
    };

   ----------- end diff -----------
```
following:
- https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/3900#issuecomment-404857159
- https://github.com/symfony/symfony/pull/27860

Commits
-------

1a2a83a5 Add SelfStaticAccessorFixer

14614 of 15869 relevant lines covered (92.09%)

63.19 hits per line

Source Files on job 18471.7 (COLLECT_COVERAGE=1)
  • Tree
  • List 0
  • Changed 27
  • Source Changed 10
  • Coverage Changed 25
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14788
  • Travis Job 18471.7
  • 24491e70 on github
  • Prev Job for COLLECT_COVERAGE=1 on master (#18456.7)
  • Next Job for COLLECT_COVERAGE=1 on master (#18476.7)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc