Skip to content

Commit b3046c1

Browse files
committed
Added installation-guide
1 parent 905ce1f commit b3046c1

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,35 @@
11
# laravel-php-code-analysis-hook
22
A GIT pre-commit hook for running php code sniffer, php mess detector and phpunit before a commit can be accepted.
3+
4+
## Installation
5+
Add the repository to your composer.json
6+
7+
```
8+
"repositories": [
9+
{
10+
"url": "https://github.com/coding-pioneers/laravel-php-code-analysis-hook.git",
11+
"type": "git"
12+
} ]
13+
```
14+
Add the following line to your composer.json to the require-dev-section
15+
```
16+
"coding-pioneers/laravel-php-code-analysis-hook": "@dev"
17+
```
18+
Then run `composer update`
19+
20+
To add the new git-hook to your repository run the following command
21+
```
22+
vendor/bin/symlink-git-hooks-to-hub
23+
```
24+
Now your source code is being checked before the commit.
25+
26+
##Uninstall
27+
Remove the link to the pre-commit-hook with the following command
28+
```
29+
vendor/bin/remove-git-hook
30+
```
31+
Then remove the following line from your composer.json
32+
```
33+
"coding-pioneers/laravel-php-code-analysis-hook": "@dev"
34+
```
35+
Then run `composer update`

0 commit comments

Comments
 (0)