Download the PHP package forrest79/phpcs without Composer

On this page you can find all versions of the php package forrest79/phpcs. 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 phpcs

Forrest79 Coding Standard for PHP

Build

Based on (no more developed) https://github.com/consistence/coding-standard and work of https://github.com/klapuch. Thanks!

Installation

The recommended way to install Forrest79 PHP Coding Standard is through Composer:

Forrest79 PHP Coding Standard requires PHP 8.0.

How to use it:

PSR-4 settings

Custom sniffs

Exceptions\ExceptionDeclarationSniff

Forrest79CodingStandard.Exceptions.ExceptionDeclarationSniff.NotEndingWithException

Or exceptions should have Exception suffix.

Forrest79CodingStandard.Exceptions.ExceptionDeclarationSniff.NotChainable

Exceptions should be chainable, last constructor argument must be \Throwable.

Forrest79CodingStandard.Exceptions.ExceptionDeclarationSniff.IncorrectExceptionDirectory

All exceptions should be in Exceptions subdirectory. You can change subdirectory name via settings:

Methods\MethodStructureSniff

Forrest79CodingStandard.Methods.MethodStructureSniff.AlphabeticalOrder

Check if class has public methods in alphabetical order. Set files via settings:

NamingConventions\MethodStructureSniff

Forrest79CodingStandard.NamingConventions.ValidVariableNameSniff.NotCamelCaps

Check camel caps variable names.

Nette\FinalInjectMethodSniff

Forrest79CodingStandard.Nette.FinalInjectMethodSniff.MissingFinal

For Nette Framework. If some presenter or other object uses inject functionality, class should be final or inject methods should be final.

Nette\ParentCallSniff

Forrest79CodingStandard.Nette.ParentCallSniff.MissingParent

For Nette Framework. In presenters, all beforeRender methods should call their parent.

Nette\PresenterMethodsSniff

Forrest79CodingStandard.Nette.PresenterMethodsSniff.NotProtected

For Nette Framework. In presenters, all startup, beforeRender and createComponent methods should be protected.

PHP\CorrectCaseTypeSniff

Forrest79CodingStandard.PHP.CorrectCaseType

Checks that all PHP types are lowercase except NULL, TRUE and FALSE that must be uppercase. Based on Generic.PHP.LowerCaseTypeSniff.

General naming conventions

General formatting conventions

PHP files

Strings

Arrays

Namespaces

Types

Interfaces

Scalar types

Variables

Properties

Constants

Functions

Argument list

Return type

Anonymous functions

Methods

Control structures

Expressions

Closures and callables

Exceptions

Commenting

PHPDoc

Structure for types and methods:

Structure for properties and constants:

Annotation blocks

Short+long description

Documentation annotations

Code analysis annotations

Application annotations

Multi-line annotations

Allowed types for @param, @return, @var

List of allowed types (long variants are used):

Multiple different types are separated with |.

Mixed

Array/collection

Type

@param

@return

@var

@throws

Constants


All versions of phpcs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
slevomat/coding-standard Version ^8.15
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 forrest79/phpcs contains the following files

Loading the files please wait ....