Download the PHP package bmitch/codor without Composer

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

Code Odor Sniffer

:nose: :poop: Custom PHP Code Sniffer sniffs to help find Code Smells (Odor).

Build Status codecov Scrutinizer Code Quality Code Climate Packagist Packagist

Inspired by: https://github.com/object-calisthenics/phpcs-calisthenics-rules

What is it?

This package is a set of custom Sniffs for the PHP Code Sniffer that you can use in your CI build to ensure the ingegrity of your code base.

Compatibility

How to Install?

Install via Composer:

How to Use?

Create a PHPCS ruleset XML (codor.xml or whatever filename you want) file in the root of your project.

Then run it with the command:

Where src is the location of the source code you want to check.

Omitting Sniffs

You may not want to run all the sniffs provided so you can specify which sniffs you want to exclude with the --exclude flag like:

(if you want to exclude multiple just separate them with a comma)

Running Specific Sniffs

Or you can also specify which sniffs to specifically run:

Suppressing the sniffs on specific pieces of code

Please see the PHPCS documentation:
https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders

Sniffs Included

Codor.ControlStructures.NoElse

Does not allow for any else or elseif statements.

:x:

:white_check_mark:

Codor.Files.FunctionLength

Functions/methods must be no more than 20 lines.

:x:

:white_check_mark:

Codor.Files.FunctionParameter

Functions/methods must have no more than 3 parameters.

:x:

:white_check_mark:

Codor.Files.ReturnNull

Functions/methods must not return null.

:x:

:white_check_mark:

Codor.Files.MethodFlagParameter

Functions/methods cannot have parameters that default to a boolean.

:x:

:white_check_mark:

Codor.Classes.ClassLength

Classes must be no more than 200 lines.

:x:

:white_check_mark:

Codor.Classes.ConstructorLoop

Class constructors must not contain any loops.

:x:

:white_check_mark:

Codor.Classes.Extends

Warns if a class extends another class. Goal is to promote composition over inheritance (https://en.wikipedia.org/wiki/Composition_over_inheritance).

:x:

:white_check_mark:

Codor.Classes.FinalPrivate

Final classes should not contain protected methods or variables. Should use private instead.

:x:

:white_check_mark:

Codor.Classes.NewInstance

Classes should not instantiate objects. Should use dependency injection.

:x:

:white_check_mark:

Codor.Classes.PropertyDeclaration

Produces an error if your class uses undeclared member variables. Only warns if class extends another class.

:x:

:white_check_mark:

Codor.Files.FunctionNameContainsAndOr

Functions/methods cannot contain "And" or "Or". This could be a sign of a function that does more than one thing.

:x:

:white_check_mark:

Codor.Files.IndentationLevel

Functions/methods cannot have more than 2 level of indentation.

:x:

:white_check_mark:

Codor.ControlStructures.NestedIf

Nested if statements are not allowed.

:x:

:white_check_mark:

Codor.Syntax.NullCoalescing

Produces an error if a line contains a ternary operator that could be converted to a Null Coalescing operator.

:x:

:white_check_mark:

Codor.Syntax.LinesAfterMethod

Only allows for 1 line between functions/methods. Any more than 1 will produce an error.

:x:

:white_check_mark:

Codor.TypeHints.MixedReturnType

Prevents you from having a mixed type returned in a doc block.

:x:

:white_check_mark:

Customizing Sniffs

Some of the sniff rules can be customized to your liking. For example, if you'd want the Codor.Files.FunctionLength to make sure your functions are no more than 30 lines instead of 20, you can do that. Here's an example of a codor.xml file with that customization:

Customizations Available

Similar Packages

Contributing

Please see CONTRIBUTING.md

License

The MIT License (MIT). Please see License File for more information.


All versions of codor with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.3
squizlabs/php_codesniffer Version ^3.2.3
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 bmitch/codor contains the following files

Loading the files please wait ....