From e79214e4f7f878fac99cd02d955ca759af4c51c8 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Sat, 15 May 2021 10:47:11 +0200 Subject: [PATCH 1/2] build: update composer lock file Signed-off-by: Geert Eltink --- composer.lock | 64 +-------------------------------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/composer.lock b/composer.lock index 95fc2bd..92d9038 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": "820668e355ff01c371da75b66abefcb0", + "content-hash": "c7c5b8a82482b2c8ff8244fadeaa91c6", "packages": [ { "name": "dealerdirect/phpcodesniffer-composer-installer", @@ -76,68 +76,6 @@ }, "time": "2020-12-07T18:04:37+00:00" }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", - "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "squizlabs/php_codesniffer": "^3.5", - "vimeo/psalm": "^4.6" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2021-02-25T21:54:58+00:00" - }, { "name": "phpstan/phpdoc-parser", "version": "0.4.9", From d83b58fd9d893ad7a8de6490018d8096c0cedf84 Mon Sep 17 00:00:00 2001 From: Geert Eltink Date: Sat, 15 May 2021 10:59:32 +0200 Subject: [PATCH 2/2] docs: fix markdown formatting Signed-off-by: Geert Eltink --- docs/book/v1/intro.md | 5 +++++ docs/book/v1/ruleset.md | 15 ++++++++++----- docs/book/v2/coding-style-guide.md | 17 +++++++++-------- docs/book/v2/intro.md | 29 +++++++++++++++++------------ 4 files changed, 41 insertions(+), 25 deletions(-) diff --git a/docs/book/v1/intro.md b/docs/book/v1/intro.md index 9b03b3d..cc7646e 100644 --- a/docs/book/v1/intro.md +++ b/docs/book/v1/intro.md @@ -3,11 +3,13 @@ ## Installation 1. Install the module via Composer by running: + ```bash $ composer require --dev laminas/laminas-coding-standard ``` 2. Add Composer scripts into your `composer.json`: + ```json "scripts": { "cs-check": "phpcs", @@ -16,6 +18,7 @@ ``` 3. Create file `phpcs.xml` on base path of your repository with content: + ```xml @@ -34,11 +37,13 @@ For a reference please see: https://github.com/squizlabs/PHP_CodeSniffer/wiki/An ## Usage * To run checks only: + ```bash $ composer cs-check ``` * To automatically fix many CS issues: + ```bash $ composer cs-fix ``` diff --git a/docs/book/v1/ruleset.md b/docs/book/v1/ruleset.md index 0e39c37..012ef6e 100644 --- a/docs/book/v1/ruleset.md +++ b/docs/book/v1/ruleset.md @@ -1,16 +1,21 @@ # Ruleset ## Use PSR-2 coding standard as a base -*PSR2* + +Rule: *PSR2* ## Disallow long array syntax -*Generic.Arrays.DisallowLongArraySyntax* + +Rule: *Generic.Arrays.DisallowLongArraySyntax* ## Force whitespace after `!` -*Generic.Formatting.SpaceAfterNot* + +Rule: *Generic.Formatting.SpaceAfterNot* ## Forbid spaces before semicolon `;` -*Squiz.WhiteSpace.SemicolonSpacing* + +Rule: *Squiz.WhiteSpace.SemicolonSpacing* ## Forbid superfluous whitespaces -*Squiz.WhiteSpace.SuperfluousWhitespace, Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines* + +Rule: *Squiz.WhiteSpace.SuperfluousWhitespace, Squiz.WhiteSpace.SuperfluousWhitespace.EmptyLines* diff --git a/docs/book/v2/coding-style-guide.md b/docs/book/v2/coding-style-guide.md index 2e6f5c7..9e6480c 100644 --- a/docs/book/v2/coding-style-guide.md +++ b/docs/book/v2/coding-style-guide.md @@ -257,14 +257,14 @@ each of the blocks below MUST be separated by a single blank line, and MUST NOT a blank line. Each block MUST be in the order listed below, although blocks that are not relevant may be omitted. -* Opening ` - + - + - + config src test - + @@ -62,12 +65,14 @@ the ["Annotated Ruleset" of PHP_CodeSniffer](https://github.com/squizlabs/PHP_Co ## Usage -* To run checks only: +- To run checks only: + ```bash $ composer cs-check ``` -* To automatically fix many CS issues: +- To automatically fix many CS issues: + ```bash $ composer cs-fix ``` @@ -109,7 +114,7 @@ $xmlPackage->send(); > should always be based on the develop branch and queued for the next major > release, unless considered a bugfix for existing rules. -If you want to test changes against Laminas components or your own projects, install your forked +If you want to test changes against Laminas components or your own projects, install your forked laminas-coding-standard globally with Composer: ```bash @@ -124,7 +129,7 @@ $ phpcs -sp --standard=LaminasCodingStandard src test **Make sure you remove the global installation after testing from your global `composer.json` file!** -Documentation can be previewed locally by installing [MkDocs](https://www.mkdocs.org/#installation) and run +Documentation can be previewed locally by installing [MkDocs](https://www.mkdocs.org/#installation) and run `mkdocs serve`. This will start a server where you can read the docs. ## Reference