-
Run
composer require alphpaca/coding-standard --dev vendor/bin/ecs init vendor/bin/rector init vendor/bin/psalm --init touch phpstan.neon
-
Replace the content of the
ecs.php
file<?php declare(strict_types=1); use Symplify\EasyCodingStandard\Config\ECSConfig; return static function (ECSConfig $ecsConfig): void { $ecsConfig->import('vendor/alphpaca/coding-standard/ecs.php'); $ecsConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']); };
-
Replace the content of the
rector.php
file<?php declare(strict_types=1); use Rector\Config\RectorConfig; return static function (RectorConfig $rectorConfig): void { $rectorConfig->import('vendor/alphpaca/coding-standard/rector.php'); $rectorConfig->paths([ __DIR__ . '/src', __DIR__ . '/tests', ]); }
-
Create the
phpstan.neon
file with the following configurationparameters: level: 9 excludes_analyse: - 'tests/Application/**/*.php'
-
Replace the content of the
psalm.xml
file<?xml version="1.0"?> <psalm errorLevel="1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" xmlns:xi="http://www.w3.org/2001/XInclude" > <xi:include href="vendor/alphpaca/coding-standard/psalm_files.xml"/> <xi:include href="vendor/alphpaca/coding-standard/psalm_file_extensions.xml"/> <xi:include href="vendor/alphpaca/coding-standard/psalm_plugins.xml"/> </psalm>
-
(Optional) To run a static analysis process before each commit run
cp vendor/alphpaca/coding-standard/bin/pre-commit.dist .git/hooks/pre-commit
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
alphpaca/coding-standard
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Packages 0
No packages published