Skip to content

Commit b317f66

Browse files
committed
Initial commit
0 parents  commit b317f66

File tree

16 files changed

+5375
-0
lines changed

16 files changed

+5375
-0
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/vendor
2+
/.idea
3+
/coverage
4+
.phpunit.result.cache
5+
.php_cs.cache

.php_cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
return PhpCsFixer\Config::create()
4+
->setRiskyAllowed(false)
5+
->setRules([
6+
'@Symfony' => true,
7+
'array_syntax' => ['syntax' => 'short'],
8+
'ordered_imports' => true,
9+
'protected_to_private' => false,
10+
// Part of future @Symfony ruleset in PHP-CS-Fixer To be removed from the config file once upgrading
11+
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
12+
// custom
13+
'phpdoc_separation' => false,
14+
'phpdoc_align' => false,
15+
'phpdoc_no_alias_tag' => false,
16+
'array_indentation' => true,
17+
])
18+
->setUsingCache(true)
19+
->setFinder(
20+
PhpCsFixer\Finder::create()
21+
->in(__DIR__.'/src')
22+
->in(__DIR__.'/tests')
23+
)
24+
;

composer.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "korridor/laravel-model-validation-rules",
3+
"description": "A laravel validation rule that uses eloquent to validate if a model exists",
4+
"keywords": ["validation", "laravel", "rule", "model", "exist", "eloquent"],
5+
"homepage": "https://github.com/korridor/laravel-model-validation-rules",
6+
"authors": [
7+
{
8+
"name": "korridor",
9+
"email": "[email protected]"
10+
}
11+
],
12+
"license": "MIT",
13+
"require": {
14+
"php": "7.*",
15+
"illuminate/support": "^5.8|^6.0"
16+
},
17+
"require-dev": {
18+
"orchestra/testbench": "^3.5|^4.0",
19+
"phpunit/phpunit": "^7.0|^8.0",
20+
"friendsofphp/php-cs-fixer": "^2.15",
21+
"squizlabs/php_codesniffer": "^3.4"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Korridor\\LaravelModelValidationRules\\": "src"
26+
}
27+
},
28+
"autoload-dev": {
29+
"psr-4": {
30+
"Korridor\\LaravelModelValidationRules\\Tests\\": "tests/"
31+
}
32+
},
33+
"scripts": {
34+
"test": "vendor/bin/phpunit",
35+
"test-coverage": "vendor/bin/phpunit --coverage-html coverage",
36+
"fix": "./vendor/bin/php-cs-fixer fix",
37+
"lint": "./vendor/bin/phpcs --error-severity=1 --warning-severity=8 --extensions=php"
38+
},
39+
"extra": {
40+
"laravel": {
41+
"providers": [
42+
"Korridor\\LaravelModelValidationRules\\ModelValidationServiceProvider"
43+
]
44+
}
45+
},
46+
"config": {
47+
"sort-packages": true
48+
}
49+
}

0 commit comments

Comments
 (0)