Download the PHP package dragon-code/codestyler without Composer

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

The Dragon Code Styler

the dragon code code styler

Stable Version Unstable Version Total Downloads

Introduction

The Dragon Code Styler is an opinionated PHP code style fixer for minimalists. Codestyler is built on top of Laravel Pint and PHP-CS-Fixer, and makes it simple to ensure that your code style stays clean and consistent.

By default, Codestyler does not require any configuration and will fix code style issues in your code by following the opinionated coding style of The Dragon Code based on the PER rule set.

The easiest and free way to say “thank you” to the developers whose packages you use is to “star” the GitHub repository.

See more at https://github.com/symfony/thanks

Installation

Required

Locally

Usage

When you run the commands in the base path of the project, the composer.json file will be automatically read, from which the minimum PHP version for your project will be taken.

This is necessary to draw up rules for applying the Codestyler.

For example, if your project supports PHP 8.0 and above, and you use the mkdir($path, 0755) function in it, then applying the rules for PHP 8.0 will break your code because it will replace 0755 with 0o755 (mkdir($path, 0o755)).

To prevent this from happening, we check the minimum PHP version.

Please note that the composer.json file is only read if the script execution is started in the folder with it.

CLI

Options

Path

The path to fix

Test

Test for code style errors without fixing them

Config

The configuration that should be used. The target directory will read the pint.json file from Laravel Pint, minus the style set.

Risky

Allows to set whether risky rules may run:

Dirty

Only fix files that have uncommitted changes.

Bail

Test for code style errors without fixing them and stop on first error

Output Format

The output format that should be used.

List of available formats:

Help Commands

To view the list of available commands, you can call the console command:

To view extended information on a command, you can use the help option. For example,

GitHub Action

ATTENTION

Starting with code styler version 4.2.0, we will no longer support a container for GitHub Actions.

Instead, use direct dependency installation using the examples below.

Create a new .github/workflows/code-style.yml file and add the content to it:

You can also use a simplified version of the configuration by linking to our settings.

In this case, the following settings will be applied:

Other CI/CD

IDE

After executing the codestyle editorconfig console command, a .editorconfig file will be added to your application. If the file already exists, it will be replaced.

In order for your IDE to read the code style settings from it, make sure its support is enabled in the settings.

For example, in phpStorm the setting is in the File | Settings | Editor | Code Style:

image

You can also use the codestyle phpstorm console command to publish the schema xml file to phpStorm. You can import this file into the IDE.

License

This package is licensed under the MIT License.


All versions of codestyler with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-dom Version *
ext-json Version *
ext-libxml Version *
ext-mbstring Version *
ext-tokenizer Version *
ext-xml Version *
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 dragon-code/codestyler contains the following files

Loading the files please wait ....