From 7b4eece741525c7179925d4caa32998699dc8623 Mon Sep 17 00:00:00 2001 From: gkdev Date: Sat, 26 Aug 2023 16:51:31 +0300 Subject: [PATCH] build: install php_codesniffer --- Makefile | 5 ++++- composer.json | 5 ++++- composer.lock | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 68 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 403981f..8f65b9e 100644 --- a/Makefile +++ b/Makefile @@ -7,5 +7,8 @@ install: validate: composer validate +lint: + composer exec --verbose phpcs -- --standard=PSR12 src bin + brain-games: - ./bin/brain-games + ./bin/brain-games \ No newline at end of file diff --git a/composer.json b/composer.json index 032d27c..d833e22 100644 --- a/composer.json +++ b/composer.json @@ -19,5 +19,8 @@ "bin": [ "bin/brain-games" ], - "license": "MIT" + "license": "MIT", + "require-dev": { + "squizlabs/php_codesniffer": "^3.7" + } } diff --git a/composer.lock b/composer.lock index 6d8e2e0..e47e075 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "897faf790b6853fa32be5018b0afbfa1", + "content-hash": "c03a9c5b0c29a7e9ae4ea8a4c5666f86", "packages": [ { "name": "wp-cli/php-cli-tools", @@ -70,7 +70,65 @@ "time": "2023-07-21T11:37:15+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "squizlabs/php_codesniffer", + "version": "3.7.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ed8e00df0a83aa96acf703f8c2979ff33341f879", + "reference": "ed8e00df0a83aa96acf703f8c2979ff33341f879", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2023-02-22T23:07:41+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [],