PHP code example of jumptwentyfour / cakephp-coding-standards
1. Go to this page and download the library: Download jumptwentyfour/cakephp-coding-standards 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/ */
jumptwentyfour / cakephp-coding-standards example snippets
declare(strict_types=1);
use JumpTwentyFour\CakePHPCodingStandards\Support\ConfigHelper;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Option;
return static function (ECSConfig $ecsConfig): void {
$ecsConfig->import(__DIR__ . '/vendor/jumptwentyfour/cakephp-coding-standards/ecs.php');
$parameters = $ecsConfig->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/app',
__DIR__ . '/tests',
]);
$ecsConfig->skip(array_merge(ConfigHelper::make()->getParameter(Option::SKIP), [
UnusedParameterSniff::class => [
__DIR__ . '/app/Console/Kernel.php',
__DIR__ . '/app/Exceptions/Handler.php',
],
'Unused parameter $attributes.' => [
__DIR__ . '/database/*.php',
],
CamelCapsFunctionNameSniff::class => [
'/tests/**',
],
]));
};