Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Jun 3, 2020
0 parents commit 8015980
Show file tree
Hide file tree
Showing 27 changed files with 6,958 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.php text eol=lf
*.phpt text eol=lf
/composer.lock export-ignore
/.github/ export-ignore
/docs export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs export-ignore
/depfile.yml export-ignore
/phpstan.neon export-ignore
/phpunit.xml export-ignore
/infection.json export-ignore
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
vendor
*.cache
var
29 changes: 29 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
]);

if (!\file_exists(__DIR__ . '/var')) {
\mkdir(__DIR__ . '/var');
}

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setCacheFile(__DIR__.'/var/.php_cs.cache')
->setRules([
'@PSR2' => true,
'psr4' => true,
'strict_param' => true,
'ordered_imports' => true,
'blank_line_before_statement' => true,
'trailing_comma_in_multiline_array' => true,
'return_type_declaration' => ['space_before' => 'one'],
'class_attributes_separation' => ['elements' => ['const', 'property', 'method']],
'no_unused_imports' => true,
'declare_strict_types' => true,
'blank_line_after_opening_tag' => true
])
->setFinder($finder);
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Aeon time management framework for php

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Aeon Business Hours

Time Management Framework for PHP

> The word aeon /ˈiːɒn/, also spelled eon (in American English), originally meant "life", "vital force" or "being",
> "generation" or "a period of time", though it tended to be translated as "age" in the sense of "ages", "forever",
> "timeless" or "for eternity".
[Source: Wikipedia](https://en.wikipedia.org/wiki/Aeon)

66 changes: 66 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"name": "aeon-php/business-hours",
"type": "library",
"description": "Abstraction allowing to define and check against business hours",
"keywords": ["calendar", "immutable", "holidays", "business hours"],
"require": {
"php": ">=7.4.2",
"ext-json": "*",
"webmozart/assert": "^1.8",
"aeon-php/calendar": "master-dev"
},
"require-dev": {
"phpunit/phpunit": "^9.1",
"phpstan/phpstan": "^0.12.25",
"vimeo/psalm": "^3.11",
"phpstan/phpstan-phpunit": "^0.12.8",
"phpstan/phpstan-webmozart-assert": "^0.12.4",
"psalm/plugin-phpunit": "^0.10.1",
"friendsofphp/php-cs-fixer": "^2.16",
"infection/infection": "^0.16.3",
"google/apiclient": "^2.0",
"aeon-php/calendar-holidays": "dev-master"
},
"repositories": [
{
"type": "git",
"url": "git@github.com:aeon-php/calendar.git"
},
{
"type": "git",
"url": "git@github.com:aeon-php/calendar-holidays.git"
}
],
"license": "MIT",
"autoload": {
"psr-4": {
"Aeon\\": [
"src/Aeon"
]
}
},
"autoload-dev": {
"psr-4": {
"Aeon\\Calendar\\Tests\\": "tests/Aeon/Calendar/Tests/"
}
},
"scripts": {
"build": [
"@static:analyze",
"@test",
"@test:mutation"
],
"test": [
"phpunit"
],
"test:mutation": [
"infection -vvv --test-framework-options='--testsuite=unit' --only-covered --log-verbosity=default --min-covered-msi=100 --threads=2"
],
"static:analyze": [
"psalm --output-format=compact",
"phpstan analyze -c phpstan.neon",
"php-cs-fixer fix --dry-run"
],
"cs:php:fix": "php-cs-fixer fix"
}
}
Loading

0 comments on commit 8015980

Please # to comment.