PHP code example of brainbits / phpstan-rules

1. Go to this page and download the library: Download brainbits/phpstan-rules library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

brainbits / phpstan-rules example snippets


// tests/ExampleTestCase/Unit/MyInvalidClassTest.php
namespace ExampleTestCase\Unit;

final class MyInvalidClassTest extends \PHPUnit\Framework\TestCase {}

// tests/ExampleTestCase/Unit/MyClassTest.php
namespace ExampleTestCase\Unit;

#[\PHPUnit\Framework\Attributes\CoversClass(MyClass::class)
final class MyClassTest extends \PHPUnit\Framework\TestCase {}