PHP code example of php-forge / coding-standard
1. Go to this page and download the library: Download php-forge/coding-standard 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/ */
php-forge / coding-standard example snippets
declare(strict_types=1);
/** @var \Symplify\EasyCodingStandard\Configuration\ECSConfigBuilder $ecsConfigBuilder */
$ecsConfigBuilder = Skip(
[
// project-specific skips here.
],
);
declare(strict_types=1);
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->import(__DIR__ . '/vendor/php-forge/coding-standard/src/rector-83.php');
$rectorConfig->paths(
[
__DIR__ . '/src',
__DIR__ . '/tests',
],
);
// project-specific overrides can be added after the import.
// $rectorConfig->skip([...]);
};
declare(strict_types=1);
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->import(__DIR__ . '/vendor/php-forge/coding-standard/src/rector.php');
$rectorConfig->import(__DIR__ . '/rector-yii2.php');
$rectorConfig->paths(
[
__DIR__ . '/src',
__DIR__ . '/tests',
],
);
};