Skip to content

Commit

Permalink
🎉 First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdyer committed Feb 22, 2020
0 parents commit 6982852
Show file tree
Hide file tree
Showing 12 changed files with 3,528 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.idea
/vendor
.php_cs.cache
.phpunit.result.cache
26 changes: 26 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = Finder::create()->in(['src', 'tests']);

return Config::create()
->setRules([
'@Symfony' => true,
'array_syntax' => [
'syntax' => 'short',
],
'blank_line_before_statement' => true,
'linebreak_after_opening_tag' => true,
'ordered_class_elements' => [
'sortAlgorithm' => 'alpha'
],
'ordered_imports' => true,
'yoda_style' => false,
'concat_space' => [
'spacing' => 'one',
],
'no_superfluous_phpdoc_tags' => false,
])
->setFinder($finder);
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Gate
Check if a user is authorized to perform a given action.

## License
Licensed under MIT. Totally free for private or commercial projects.

## Installation
```text
composer require andrewdyer/gate
```

## Support
If you're using this package, I'd love to hear your thoughts! Feel free to contact me on [Twitter](https://twitter.com/andyer92).

Found a bug? Please report it using the [issue tracker](https://github.com/andrewdyer/gate/issues), or better yet, fork the repository and submit a pull request.
41 changes: 41 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "andrewdyer/gate",
"description": "Check if a user is authorized to perform a given action",
"keywords": [
"php",
"gate",
"authorization",
"permissions"
],
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Andrew Dyer",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {
"Anddye\\Gate\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"Anddye\\Gate\\Tests\\": "tests"
}
},
"require": {
"php": "^7.2.5"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"symfony/var-dumper": "^5.0",
"friendsofphp/php-cs-fixer": "^2.16"
},
"scripts": {
"cs": [
"vendor/bin/php-cs-fixer fix"
]
}
}
Loading

0 comments on commit 6982852

Please sign in to comment.