PHP code example of castor-php / php-qa

1. Go to this page and download the library: Download castor-php/php-qa 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/ */

    

castor-php / php-qa example snippets




use Castor\Attribute\AsTask;
use function Castor\PHPQa\phpstan;

#[AsTask('phpstan', namespace: 'qa')]
function qa_phpstan()
{
    phpstan();
}



use Castor\Attribute\AsTask;
use function Castor\PHPQa\phpstan;

#[AsTask('phpstan', namespace: 'qa')]
function qa_phpstan()
{
    phpstan(version: '1.11.0');
}



use Castor\Attribute\AsTask;
use function Castor\PHPQa\php_cs_fixer;

#[AsTask('php_cs_fixer', namespace: 'qa')]
function qa_pphp_cs_fixer()
{
    php_cs_fixer(extraDependencies: [
        'kubawerlos/php-cs-fixer-custom-fixers' => '^3.21',
    ]);
}
bash
castor composer