Skip to content

Commit e5c64f7

Browse files
authored
Initial API problem implementation (#1)
* Initial API problem implementation * documentation
1 parent e8a976b commit e5c64f7

25 files changed

Lines changed: 1157 additions & 1 deletion

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/vendor/
2+
composer.lock
3+
.php_cs.cache
4+
.php_cs
5+
grumphp.yml
6+
phpspec.yml

.php_cs.dist

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?php
2+
3+
return PhpCsFixer\Config::create()
4+
->setFinder(
5+
\Symfony\Component\Finder\Finder::create()
6+
->in([
7+
__DIR__ . '/src',
8+
__DIR__ . '/spec',
9+
])
10+
)
11+
->setRiskyAllowed(true)
12+
->setRules([
13+
'@Symfony' => true,
14+
'align_multiline_comment' => true,
15+
'array_indentation' => true,
16+
'array_syntax' => ['syntax' => 'short'],
17+
'backtick_to_shell_exec' => true,
18+
'blank_line_before_return' => true,
19+
'class_keyword_remove' => false,
20+
'combine_consecutive_issets' => true,
21+
'combine_consecutive_unsets' => true,
22+
'comment_to_phpdoc' => true,
23+
'compact_nullable_typehint' => true,
24+
'date_time_immutable' => true,
25+
'declare_strict_types' => true,
26+
'doctrine_annotation_array_assignment' => true,
27+
'doctrine_annotation_braces' => true,
28+
'doctrine_annotation_indentation' => true,
29+
'doctrine_annotation_spaces' => true,
30+
'escape_implicit_backslashes' => true,
31+
'explicit_indirect_variable' => true,
32+
'explicit_string_variable' => true,
33+
'final_internal_class' => false,
34+
'fully_qualified_strict_types' => true,
35+
'general_phpdoc_annotation_remove' => false,
36+
'header_comment' => false,
37+
'heredoc_to_nowdoc' => false,
38+
'linebreak_after_opening_tag' => true,
39+
'list_syntax' => true,
40+
'mb_str_functions' => true,
41+
'method_chaining_indentation' => true,
42+
'multiline_comment_opening_closing' => true,
43+
'multiline_whitespace_before_semicolons' => true,
44+
'native_function_invocation' => false,
45+
'no_alternative_syntax' => true,
46+
'no_blank_lines_before_namespace' => false,
47+
'no_null_property_initialization' => true,
48+
'no_php4_constructor' => true,
49+
'no_short_echo_tag' => false,
50+
'no_superfluous_elseif' => true,
51+
'no_unreachable_default_argument_value' => true,
52+
'no_useless_else' => true,
53+
'no_useless_return' => true,
54+
'not_operator_with_space' => false,
55+
'not_operator_with_successor_space' => false,
56+
'ordered_class_elements' => false,
57+
'ordered_imports' => true,
58+
'php_unit_dedicate_assert' => false,
59+
'php_unit_expectation' => false,
60+
'php_unit_mock' => false,
61+
'php_unit_namespaced' => false,
62+
'php_unit_no_expectation_annotation' => false,
63+
'php_unit_ordered_covers' => true,
64+
'php_unit_set_up_tear_down_visibility' => true,
65+
'php_unit_strict' => false,
66+
'php_unit_test_annotation' => false,
67+
'php_unit_test_class_requires_covers' => false,
68+
'phpdoc_add_missing_param_annotation' => true,
69+
'phpdoc_order' => true,
70+
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
71+
'pow_to_exponentiation' => true,
72+
'psr0' => true,
73+
'random_api_migration' => false,
74+
'simplified_null_return' => true,
75+
'static_lambda' => false,
76+
'strict_comparison' => true,
77+
'strict_param' => true,
78+
'string_line_ending' => true,
79+
'ternary_to_null_coalescing' => true,
80+
'void_return' => true,
81+
'yoda_style' => true,
82+
])
83+
;

.travis.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
language: php
2+
3+
php:
4+
- 7.2
5+
- nightly
6+
7+
env:
8+
matrix:
9+
-
10+
- DEPENDENCIES=--prefer-lowest
11+
12+
cache:
13+
directories:
14+
- .composer/cache
15+
16+
matrix:
17+
fast_finish: true
18+
allow_failures:
19+
- php: nightly
20+
21+
before_install:
22+
- alias composer=composer\ --no-interaction && composer selfupdate
23+
24+
install:
25+
- travis_retry composer update --no-progress --profile --no-scripts --no-suggest $DEPENDENCIES
26+
27+
script:
28+
- bin/grumphp run

CONTRIBUTING

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Contributing
2+
3+
Api Problem is an open source, community-driven project. If you'd like to contribute,
4+
feel free to do this, but remember to follow this few simple rules:
5+
6+
## Branching strategy
7+
8+
- __Always__ base your changes on the `master` branch (all new development happens here),
9+
- When you create Pull Request, always select `master` branch as target, otherwise it
10+
will be closed (this is selected by default).
11+
12+
## Coverage
13+
14+
- All classes that interact solely with the core logic should be covered by Specs
15+
16+
## Code style / Formatting
17+
18+
- All code in the `src` and `spec` folder must follow the PSR-2 standard and should comply with the php-cs-fixer config.

LICENSE

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 Phpro
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)