Download the PHP package suin/phpcs-psr4-sniff without Composer

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

suin/phpcs-psr4-sniff

A custom PHP Code Sniffer sniff to help to find classes that is not compliant with PSR-4 Autoloader.

Demo

Please visit ./tests/demo, if you would like to try this sniff.

Features

Classes, interfaces and traits

This sniff covers not only classes but also interfaces and traits.

Namespaces and class names

This sniff checks whether both of namespaces and class names match PSR-4 project structure.

Configuration free

As this sniff respects composer.json autoloading configuration, you don't have to declare mapping between namespace prefixes and base directories.

Similar packages

Psr4Fixer of PHP-CS-Fixer

Psr4Fixer checkes if class names should match the file name and fixes the class names if its don't correspond to the file names. It doesn't check the namespaces.

In contrast, suin/phpcs-psr4-sniff checks not only class names but also namespaces.

SlevomatCodingStandard.Files.TypeNameMatchesFileName

SlevomatCodingStandard.Files.TypeNameMatchesFileName is a custom PHP Code Sniffer sniff to check whether namespaces and class names follow PSR-0/PSR-4 project structure.

This sniff is similar to suin/phpcs-psr4-sniff, but it needs explicit configuration about the PSR-0/PSR-4 project structure. suin/phpcs-psr4-sniff takes implicit way as it follows the autoloding configuration of Composer.

Installation

Usage

At first, create a PHPCS ruleset XML (phpcs.xml.dist or phpcs.xml) file in the root of your project.

Then run it with the command:

Changelog

Please see CHANGELOG for more details.

Contributing

Send issue or pull-request to main repository.


All versions of phpcs-psr4-sniff with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
ext-json Version *
slevomat/coding-standard Version >=4.7 <8.0.0
squizlabs/php_codesniffer Version >=3.3 <4.0.0
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 suin/phpcs-psr4-sniff contains the following files

Loading the files please wait ....