PHP code example of kenny1911 / class-visibility-fixer

1. Go to this page and download the library: Download kenny1911/class-visibility-fixer 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/ */

    

kenny1911 / class-visibility-fixer example snippets



$finder = \PhpCsFixer\Finder::create()
    ->in(__DIR__);

return (new \PhpCsFixer\Config())
    ->registerCustomFixers([
        new \Kenny1911\ClassVisibilityFixer\ClassVisibilityFixer(),
    ])
    ->setRules([
        'Kenny1911/class_visibility' => true,
    ])
    ->setFinder($finder);

namespace App\Service;

class ExampleClass
{
    // code
}

namespace App\Service;

/**
 * @api
 */
class ExampleClass
{
    // code
}

namespace App\Service;

/**
 * @internal
 * @psalm-internal App\Service
 */
class ExampleClass
{
    // code
}
bash
vendor/bin/php-cs-fixer fix