From 69f2948a5415101174793b212ea2c19452702168 Mon Sep 17 00:00:00 2001 From: egorskov Date: Sun, 29 Sep 2024 21:28:33 +0500 Subject: [PATCH] add badge CodeClimet --- .DS_Store | Bin 8196 -> 8196 bytes .idea/.gitignore | 8 ++++ .idea/modules.xml | 8 ++++ .idea/php-project-45.iml | 12 ++++++ .idea/php.xml | 39 ++++++++++++++++++ .idea/phpspec.xml | 10 +++++ .idea/vcs.xml | 6 +++ Makefile | 3 ++ README.md | 3 +- bin/.DS_Store | Bin 0 -> 6148 bytes bin/brain-games | 1 + composer.json | 9 ++++- composer.lock | 85 ++++++++++++++++++++++++++++++++++++++- src/Cli.php | 10 +++-- 14 files changed, 186 insertions(+), 8 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/modules.xml create mode 100644 .idea/php-project-45.iml create mode 100644 .idea/php.xml create mode 100644 .idea/phpspec.xml create mode 100644 .idea/vcs.xml create mode 100644 bin/.DS_Store diff --git a/.DS_Store b/.DS_Store index 471a97201a067b03cdcf7acf2f18eb31614e453c..83ebe36d72aa8e7536c3077ae0a4364e0a78146c 100644 GIT binary patch delta 36 scmZp1XmOa}&nUPtU^hRb;A9?w-p!W=`KO@# T=9vOYEE`LNm^ZUa{AC9K6^anw diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..fd6d235 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/php-project-45.iml b/.idea/php-project-45.iml new file mode 100644 index 0000000..5f33e48 --- /dev/null +++ b/.idea/php-project-45.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml new file mode 100644 index 0000000..4ca10e7 --- /dev/null +++ b/.idea/php.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/phpspec.xml b/.idea/phpspec.xml new file mode 100644 index 0000000..33107fd --- /dev/null +++ b/.idea/phpspec.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Makefile b/Makefile index eae33a8..1f9d80f 100644 --- a/Makefile +++ b/Makefile @@ -6,3 +6,6 @@ brain-games: validate: composer validate + +lint: + composer exec --verbose phpcs -- --standard=PSR12 src bin \ No newline at end of file diff --git a/README.md b/README.md index 7ef8bb7..566fab7 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ ### Hexlet tests and linter status: -[![Actions Status](https://github.com/Egorskov/php-project-45/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/Egorskov/php-project-45/actions) \ No newline at end of file +[![Actions Status](https://github.com/Egorskov/php-project-45/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/Egorskov/php-project-45/actions) +[![Maintainability](https://api.codeclimate.com/v1/badges/dd2c59d4a9aaac5fc43a/maintainability)](https://codeclimate.com/github/Egorskov/php-project-45/maintainability) diff --git a/bin/.DS_Store b/bin/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2e686d7d2d044a5b31d7886b974bc7defa9c8c74 GIT binary patch literal 6148 zcmeHKO;5r=5Php0h#chTMbke3!LP`%5FkP#8a2kF@)0%iB}hy-^&j~Y_08_aNP!rW z#;BPgGq0W9H`~5$yDR`xo_2PDEPym!Ftx$3#H3w(!Pb06c*fRvzyLYi;THXc-kMMa zRDs{7fV{g|BkondR&ls}y5xE@yGf z5$+epjI(!EvL|fG(TgZxpT8q?amdUgW1IN~j_0q;Y{#zb`?Z@mLkHI!shN1~Q|eJf z2`88(Ui%4k%=oPyppkg(G4?p0&iMptiPwHc8CST(0SbxNo}z*ps+=eNFKXM#|AzzD zY_W94p+;3e6;K5}6p-&jKo<->Mh@+#gTZbAh$*J6@mTf}!U;Tv9wUcrp&3UdI;!zo z4CCm`2fknEF>>hWFn;r4{K&@dP>da&^#j`-CUmG#6;K7{6h%i*Ai=fgBJ+kC8)WX!=LM M%Ai3N_)!Jk0T=$jyZ`_I literal 0 HcmV?d00001 diff --git a/bin/brain-games b/bin/brain-games index 88b668b..f720020 100755 --- a/bin/brain-games +++ b/bin/brain-games @@ -7,3 +7,4 @@ require_once __DIR__ . '/../vendor/autoload.php'; use function BrainGames\Cli\greeting; greeting(); + diff --git a/composer.json b/composer.json index 6a0bd58..3e94123 100644 --- a/composer.json +++ b/composer.json @@ -20,5 +20,12 @@ "description": "project 45", - "license": "MIT" + "license": "MIT", + "require-dev": { + "squizlabs/php_codesniffer": "^3.10" + }, + "scripts": { + "phpcs": "phpcs", + "phpcbf": "phpcbf" + } } diff --git a/composer.lock b/composer.lock index b32509e..1ecb644 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": "77d4a327c44ffbc1f590a5b76451c87f", + "content-hash": "663c1015b9056a649d7cf170b4050d9f", "packages": [ { "name": "wp-cli/php-cli-tools", @@ -70,7 +70,88 @@ "time": "2024-05-22T20:20:04+00:00" } ], - "packages-dev": [], + "packages-dev": [ + { + "name": "squizlabs/php_codesniffer", + "version": "3.10.3", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c", + "reference": "62d32998e820bddc40f99f8251958aed187a5c9c", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "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": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-09-18T10:38:58+00:00" + } + ], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/src/Cli.php b/src/Cli.php index 63e907f..029a116 100644 --- a/src/Cli.php +++ b/src/Cli.php @@ -7,9 +7,11 @@ function greeting() { -line('Welcome to the Brain Game!'); -$name = prompt('May I have your name?'); -line("Hello, %s!", $name); -return $name; + line('Welcome to the Brain Game!'); + $name = prompt('May I have your name?'); + line("Hello, %s!", $name); + return $name; } +function askQuestion(string $question){ +} \ No newline at end of file