Download the PHP package asispts/ptscs without Composer

On this page you can find all versions of the php package asispts/ptscs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ptscs

ptscs

» PSR-12 coding standard with additional strict rules «

[![Build](https://github.com/asispts/ptscs/actions/workflows/ci.yml/badge.svg)](https://github.com/asispts/ptscs/actions/workflows/ci.yml) [![](https://img.shields.io/github/license/asispts/ptscs)](./LICENSE) [![](https://img.shields.io/packagist/php-v/asispts/ptscs/dev-main)](https://github.com/asispts/ptscs) [![](https://img.shields.io/packagist/dt/asispts/ptscs)](https://packagist.org/packages/asispts/ptscs) [Installation](#installation) ✦ [Usage](#usage) ✦ [Notable coding standard](#notable-coding-standard) ✦ [Contributing](#contributing) ✦ [License](#license)  

ptscs is a coding standard for PHP_CodeSniffer that follows the PSR-12 with additional strict rules. It is intended to help developers maintain consistency and readability in their codebase, and to encourage best practices.

Installation

You can install with composer

Usage

Once installed, you can create a phpcs.xml.dist file to define your PHPCS configuration and then configure your text editor or workflow to lint or fix the codebase based on this configuration. Here is an example phpcs.xml.dist file:

You can use phpcs to validate your source code against this standard or phpcbf to automatically fix any violations.

To run phpcs, execute the following command:

To automatically fix any coding standard violations, execute the following command:

Excluding Some Rules

You can exclude some rules by modifying the phpcs.xml.dist file. For example, if you want to exclude the rule that requires classes to be declared as either final or abstract in the src/Entity directory of a Symfony project, you can add the following to your phpcs.xml.dist file:

This will exclude the RequireAbstractOrFinal rule for the src/Entity directory. You can customize the rule and the directory as per your needs. By excluding some rules, you can customize the coding standard to better suit your project's requirements.

Notable coding standard

As mentioned, this coding standard use PSR-12 with some exceptions and additional strict rules. Here are some notable additional strict rules.

  1. We exclude some PSR-12 rules to allow declare(strict_types=1) on the same line as PHP open tag.

  2. declare(strict_types=1) is required in all PHP files.
  3. snake_case is allowed in test method names

  4. All classes should be declared as either final or abstract

  5. Filenames must match the class names.

The complete set of rules can be seen in RULES.md file. These rules are intended to promote cleaner, more readable, and more maintainable code.

Contributing

We welcome contributions from the community in all forms. You can report issues, suggest improvements or submit pull requests.

For major changes, it is highly recommended to open an issue first to discuss the proposed changes with the project maintainers.

License

Released under MIT License.


All versions of ptscs with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
dealerdirect/phpcodesniffer-composer-installer Version ^1.0
slevomat/coding-standard Version ^8.14
squizlabs/php_codesniffer Version ^3.7
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asispts/ptscs contains the following files

Loading the files please wait ....