mogic/mogic-phpcs
最新稳定版本:v2.1.0
Composer 安装命令:
composer require mogic/mogic-phpcs
包简介
PHP coding standard used at Mogic GmbH
README 文档
README
A set of rules for PHP-CS-Fixer.
Usage
Project with composer
The repository is mirrored automatically to Github: https://github.com/mogic-le/mogic-phpcs The package is also available on packagist: https://packagist.org/packages/mogic/mogic-phpcs
Now run:
$ composer require --dev mogic/mogic-phpcs:dev-master
and create .php-cs-fixer.php with the following content:
<?php
$config = require __DIR__ . '/vendor/mogic/mogic-phpcs/.php-cs-fixer.php';
$finder = (new PhpCsFixer\Finder())
->in(__DIR__ . '/local_packages/');
return $config
->setFinder($finder);
Then commit composer.json, composer.lock and .php-cs-fixer.php.
During the build, composer install needs to be called, which will fetch
the coding standard from git.
To make this work, the build container needs to contain a SSH key that has
read-only access to the coding standards repository.
Example: reos-docker -> web-build
Project without composer dependencies
In a project, create a composer.json file:
{
"name": "customer/projectname",
"description": "FIXME",
"license": "proprietary",
"require-dev": {
"mogic/mogic-phpcs": "dev-master"
}
}
Adjust Makefile:
update-phpcs:
rm -rf vendor
composer install
rm -rf vendor/autoload.php vendor/composer/ vendor/mogic/mogic-phpcs/.git/
Now run make update-phpcs and git commit the vendor/ dir,
composer.json and composer.lock.
Links
统计信息
- 总下载量: 3.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2022-09-07