GithubHelp home page GithubHelp logo

thomasruta / typo3cms Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beechit/typo3cms

0.0 1.0 0.0 638 KB

This package contains a selection of sniffs which implements the Coding Guidelines for the TYPO3 CMS.

typo3cms's Introduction

TYPO3CMS CodeSniffer standard

Description

This standard consist of a subset of sniffs from the TYPO3SniffPool and implements the Coding Guidelines for TYPO3 CMS.

It contains just a ruleset.xml file in which we refer to the sniffs from PHP_CodeSniffer and from TYPO3SniffPool.

How to get

In case you didn't have installed the TYPO3SniffPool or the PHP_CodeSniffer yet - no problem. This packages are marked as dependencies of this standard and will install automatically.

There are several ways to get the standard, which I am going to describe now. There is no right or wrong. Which way you choose depends on your preferences and at least on your requirements.

Composer

We support Composer, a dependency manager for PHP.

Create a composer.json in the root folder of your project or extend the existing one and declare this package as a dependency:

For install the develop branch (unstable)

{
	"minimum-stability": "dev",
	"require": {
		"typo3-ci/typo3cms": "dev-develop"
	}
}

For install the master branch (stable)

{
	"require": {
		"typo3-ci/typo3cms": "dev-master"
	}
}

Since the package is managed with Packagist this is all what you need.

This will install the PHP_CodeSniffer and the TYPO3SniffPool into the vendor/ folder of your project. For more informations about Composer have a look at their documentation.

For a system-wide installation, you can use:

composer global require "typo3-ci/typo3cms=dev-master"

Make sure to have ~/.composer/vendor/bin/ in your path.

Git

The second way is to clone the repository from github. In this case you have to take care about the dependencies by yourself.

$ git clone https://github.com/typo3-ci/TYPO3CMS.git
$ git clone https://github.com/typo3-ci/TYPO3SniffPool.git

How to use

As various the installations methods are, as various the usage is.

Composer

Change into your project folder and call the PHP_CodeSniffer from there:

$ cd myproject
$ php vendor/squizlabs/php_codesniffer/scripts/phpcs --standard=TYPO3CMS /path/to/folder

Its also possible to call this standard with a global installed PHP_CodeSniffer (f.e. via PEAR)

$ cd myproject
$ phpcs --standard=vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/TYPO3CMS/ruleset.xml /path/to/folder

Git

After you cloned the standard and it dependencies the usage is nearly the same as above. There are two main methods.

  1. Copy the standard into the Standards/ folder of the PHP_CodeSniffer and call it with --standard=TYPO3CMS

  2. Put the standard at any place you want and call point to it absolutely --standard=/path/to/TYPO3CMS/ruleset.xml

Contribution

Please have a look at the dedicated wiki page for information about how you can contribute to this project.

Further informations

typo3cms's People

Contributors

andygrunwald avatar konafets avatar waffle-with-pears avatar wouter90 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.