Skip to content

Commit 85187fe

Browse files
committed
[EH] initial version
0 parents  commit 85187fe

15 files changed

+711
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.scrutinizer.yml

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
filter:
2+
paths:
3+
- 'app/*'
4+
- 'src/*'
5+
excluded_paths:
6+
- 'bootstrap/*'
7+
- 'config/*'
8+
- 'public/*'
9+
- 'resources/*'
10+
- 'vendor/*'
11+
- 'views/*'
12+
tools:
13+
php_analyzer: true
14+
php_mess_detector: true
15+
php_changetracking: true
16+
php_code_sniffer:
17+
config:
18+
standard: PSR2
19+
php_loc:
20+
excluded_dirs:
21+
- vendor
22+
php_pdepend:
23+
excluded_dirs:
24+
- vendor
25+
- tests
26+
build:
27+
tests:
28+
before:
29+
- 'composer self-update'
30+
- 'composer update --no-interaction --prefer-source'
31+
override:
32+
-
33+
command: 'vendor/bin/phpunit --coverage-clover coverage.clover'
34+
coverage:
35+
file: 'coverage.clover'
36+
format: 'clover'
37+
checks:
38+
php:
39+
code_rating: true
40+
duplication: true
41+
variable_existence: true
42+
useless_calls: true
43+
use_statement_alias_conflict: true
44+
unused_variables: true
45+
unused_properties: true
46+
unused_parameters: true
47+
unused_methods: true
48+
unreachable_code: true
49+
sql_injection_vulnerabilities: true
50+
security_vulnerabilities: true
51+
precedence_mistakes: true
52+
precedence_in_conditions: true
53+
parameter_non_unique: true
54+
no_property_on_interface: true
55+
no_non_implemented_abstract_methods: true
56+
deprecated_code_usage: true
57+
closure_use_not_conflicting: true
58+
closure_use_modifiable: true
59+
avoid_useless_overridden_methods: true
60+
avoid_conflicting_incrementers: true
61+
assignment_of_null_return: true
62+
verify_property_names: true
63+
verify_argument_usable_as_reference: true
64+
verify_access_scope_valid: true
65+
use_self_instead_of_fqcn: true
66+
too_many_arguments: true
67+
symfony_request_injection: true
68+
switch_fallthrough_commented: true
69+
spacing_of_function_arguments: true
70+
spacing_around_non_conditional_operators: true
71+
spacing_around_conditional_operators: true
72+
space_after_cast: true
73+
single_namespace_per_use: true
74+
simplify_boolean_return: true
75+
scope_indentation:
76+
spaces_per_level: '4'
77+
return_doc_comments: true
78+
require_scope_for_properties: true
79+
require_scope_for_methods: true
80+
require_php_tag_first: true
81+
require_braces_around_control_structures: true
82+
remove_trailing_whitespace: true
83+
remove_php_closing_tag: true
84+
remove_extra_empty_lines: true
85+
psr2_switch_declaration: true
86+
psr2_control_structure_declaration: true
87+
psr2_class_declaration: true
88+
property_assignments: true
89+
properties_in_camelcaps: true
90+
prefer_while_loop_over_for_loop: true
91+
phpunit_assertions: true
92+
php5_style_constructor: true
93+
parameters_in_camelcaps: true
94+
parameter_doc_comments: true
95+
return_doc_comment_if_not_inferrable: true
96+
param_doc_comment_if_not_inferrable: true
97+
overriding_private_members: true
98+
optional_parameters_at_the_end: true
99+
one_class_per_file: true
100+
non_commented_empty_catch_block: true
101+
no_unnecessary_if: true
102+
no_unnecessary_function_call_in_for_loop: true
103+
no_unnecessary_final_modifier: true
104+
no_underscore_prefix_in_properties: true
105+
no_underscore_prefix_in_methods: true
106+
no_trailing_whitespace: true
107+
no_space_inside_cast_operator: true
108+
no_space_before_semicolon: true
109+
no_space_around_object_operator: true
110+
no_goto: true
111+
no_global_keyword: true
112+
no_exit: true
113+
no_empty_statements: true
114+
no_else_if_statements: true
115+
no_duplicate_arguments: true
116+
no_debug_code: true
117+
no_commented_out_code: true
118+
newline_at_end_of_file: true
119+
naming_conventions:
120+
local_variable: '^[a-z][a-zA-Z0-9]*$'
121+
abstract_class_name: ^Abstract|Factory$
122+
utility_class_name: 'Utils?$'
123+
constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$'
124+
property_name: '^[a-z][a-zA-Z0-9]*$'
125+
method_name: '^(?:[a-z]|__)[a-zA-Z0-9]*$'
126+
parameter_name: '^[a-z][a-zA-Z0-9]*$'
127+
interface_name: '^[A-Z][a-zA-Z0-9]*Interface$'
128+
type_name: '^[A-Z][a-zA-Z0-9]*$'
129+
exception_name: '^[A-Z][a-zA-Z0-9]*Exception$'
130+
isser_method_name: '^(?:is|has|should|may|supports|was)'
131+
lowercase_php_keywords: true
132+
more_specific_types_in_doc_comments: true
133+
missing_arguments: true
134+
method_calls_on_non_object: true
135+
line_length:
136+
max_length: '120'
137+
lowercase_basic_constants: true
138+
instanceof_class_exists: true
139+
function_in_camel_caps: true
140+
function_body_start_on_new_line: true
141+
fix_use_statements:
142+
remove_unused: true
143+
preserve_multiple: false
144+
preserve_blanklines: false
145+
order_alphabetically: true
146+
foreach_traversable: true
147+
foreach_usable_as_reference: true
148+
fix_php_opening_tag: true
149+
fix_line_ending: true
150+
fix_identation_4spaces: true
151+
fix_doc_comments: true
152+
ensure_lower_case_builtin_functions: true
153+
encourage_postdec_operator: true
154+
classes_in_camel_caps: true
155+
catch_class_exists: true
156+
blank_line_after_namespace_declaration: true
157+
avoid_usage_of_logical_operators: true
158+
avoid_unnecessary_concatenation: true
159+
avoid_tab_indentation: true
160+
avoid_superglobals: true
161+
avoid_perl_style_comments: true
162+
avoid_multiple_statements_on_same_line: true
163+
avoid_fixme_comments: true
164+
avoid_length_functions_in_loops: true
165+
avoid_entity_manager_injection: true
166+
avoid_duplicate_types: true
167+
avoid_corrupting_byteorder_marks: true
168+
argument_type_checks: true
169+
avoid_aliased_php_functions: true
170+
deadlock_detection_in_loops: true

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: psr2

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: php
2+
3+
php:
4+
- 7.1
5+
- nightly
6+
7+
matrix:
8+
allow_failures:
9+
- php: nightly
10+
11+
env:
12+
matrix:
13+
- COMPOSER_FLAGS="--prefer-lowest"
14+
- COMPOSER_FLAGS=""
15+
16+
before_script:
17+
- travis_retry composer self-update
18+
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
19+
20+
script:
21+
- vendor/bin/phpunit --coverage-clover coverage.clover

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Changelog
2+
3+
All notable changes to `laravel-openinghours` will be documented in this file.
4+
5+
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
6+
7+
## NEXT - YYYY-MM-DD
8+
9+
### Added
10+
- Nothing
11+
12+
### Deprecated
13+
- Nothing
14+
15+
### Fixed
16+
- Nothing
17+
18+
### Removed
19+
- Nothing
20+
21+
### Security
22+
- Nothing
23+
24+
## 1.0.0 - 2018-03-16
25+
26+
### Added
27+
- initial Version

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at `[email protected]`. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/webfactor/laravel-openinghours).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ composer test
29+
```
30+
31+
32+
**Happy coding**!

ISSUE_TEMPLATE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!-- Provide a general summary of the issue in the Title above -->
2+
3+
## Detailed description
4+
5+
Provide a detailed description of the change or addition you are proposing.
6+
7+
Make it clear if the issue is a bug, an enhancement or just a question.
8+
9+
## Context
10+
11+
Why is this change important to you? How would you use it?
12+
13+
How can it benefit other users?
14+
15+
## Possible implementation
16+
17+
Not obligatory, but suggest an idea for implementing addition or change.
18+
19+
## Your environment
20+
21+
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
22+
23+
* Version used (e.g. PHP 5.6, HHVM 3):
24+
* Operating system and version (e.g. Ubuntu 16.04, Windows 7):
25+
* Link to your project:
26+
* ...
27+
* ...

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2018 webfactor media GmbH <[email protected]>
4+
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in
13+
> all copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
> THE SOFTWARE.

0 commit comments

Comments
 (0)