Skip to content

Commit 23db5f7

Browse files
committed
Initialize repo with structure and UriTemplate class
0 parents  commit 23db5f7

12 files changed

+736
-0
lines changed

.editorconfig

+15
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 https://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

.gitattributes

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/tests export-ignore
6+
7+
/.editorconfig export-ignore
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/.php_cs.dist export-ignore
11+
/Makefile export-ignore
12+
/phpunit.xml.dist export-ignore

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
build
2+
composer.lock
3+
vendor
4+
phpunit.xml
5+
.phpunit.result.cache
6+
7+
.php_cs
8+
.php_cs.cache

.php_cs.dist

+87
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<?php
2+
3+
$config = PhpCsFixer\Config::create()
4+
->setRiskyAllowed(true)
5+
->setRules([
6+
'@PSR2' => true,
7+
'array_syntax' => ['syntax' => 'short'],
8+
'binary_operator_spaces' => ['operators' => ['=>' => null]],
9+
'blank_line_after_opening_tag' => true,
10+
'class_attributes_separation' => ['elements' => ['method']],
11+
'compact_nullable_typehint' => true,
12+
'concat_space' => ['spacing' => 'one'],
13+
'declare_equal_normalize' => ['space' => 'none'],
14+
'declare_strict_types' => false,
15+
'dir_constant' => true,
16+
'final_static_access' => true,
17+
'fully_qualified_strict_types' => true,
18+
'function_to_constant' => true,
19+
'function_typehint_space' => true,
20+
'header_comment' => false,
21+
'is_null' => ['use_yoda_style' => false],
22+
'list_syntax' => ['syntax' => 'short'],
23+
'lowercase_cast' => true,
24+
'magic_method_casing' => true,
25+
'modernize_types_casting' => true,
26+
'multiline_comment_opening_closing' => true,
27+
'native_constant_invocation' => true,
28+
'no_alias_functions' => true,
29+
'no_alternative_syntax' => true,
30+
'no_blank_lines_after_phpdoc' => true,
31+
'no_empty_comment' => true,
32+
'no_empty_phpdoc' => true,
33+
'no_extra_blank_lines' => true,
34+
'no_leading_import_slash' => true,
35+
'no_leading_namespace_whitespace' => true,
36+
'no_spaces_around_offset' => true,
37+
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
38+
'no_trailing_comma_in_singleline_array' => true,
39+
'no_unneeded_control_parentheses' => true,
40+
'no_unset_cast' => true,
41+
'no_unused_imports' => true,
42+
'no_useless_else' => true,
43+
'no_useless_return' => true,
44+
'no_whitespace_in_blank_line' => true,
45+
'normalize_index_brace' => true,
46+
'ordered_imports' => true,
47+
'php_unit_construct' => true,
48+
'php_unit_dedicate_assert' => ['target' => 'newest'],
49+
'php_unit_dedicate_assert_internal_type' => ['target' => 'newest'],
50+
'php_unit_expectation' => ['target' => 'newest'],
51+
'php_unit_mock' => ['target' => 'newest'],
52+
'php_unit_mock_short_will_return' => true,
53+
'php_unit_no_expectation_annotation' => ['target' => 'newest'],
54+
'php_unit_test_annotation' => ['style' => 'prefix'],
55+
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
56+
'phpdoc_align' => ['align' => 'vertical'],
57+
'phpdoc_line_span' => ['method' => 'multi', 'property' => 'multi'],
58+
'phpdoc_no_package' => true,
59+
'phpdoc_no_useless_inheritdoc' => true,
60+
'phpdoc_scalar' => true,
61+
'phpdoc_separation' => true,
62+
'phpdoc_single_line_var_spacing' => true,
63+
'phpdoc_trim' => true,
64+
'phpdoc_trim_consecutive_blank_line_separation' => true,
65+
'phpdoc_types' => true,
66+
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
67+
'phpdoc_var_without_name' => true,
68+
'return_assignment' => true,
69+
'short_scalar_cast' => true,
70+
'single_trait_insert_per_statement' => true,
71+
'standardize_not_equals' => true,
72+
'static_lambda' => true,
73+
'ternary_to_null_coalescing' => true,
74+
'trim_array_spaces' => true,
75+
'visibility_required' => true,
76+
'yoda_style' => false,
77+
// 'native_function_invocation' => true,
78+
])
79+
->setFinder(
80+
PhpCsFixer\Finder::create()
81+
->in(__DIR__.'/src')
82+
->in(__DIR__.'/tests')
83+
->name('*.php')
84+
)
85+
;
86+
87+
return $config;

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
All notable changes to `uri-template` 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

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2020 George Mponos <[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.

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test:
2+
php vendor/bin/phpunit tests/ --colors=always

README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# uri-template
2+
3+
## Install
4+
5+
Via Composer
6+
7+
``` bash
8+
$ composer require guzzlehttp/uri-template
9+
```
10+
11+
## Change log
12+
13+
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
14+
15+
## Testing
16+
17+
``` bash
18+
$ composer test
19+
```
20+
21+
## Security
22+
23+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
24+
25+
## License
26+
27+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"name": "guzzlehttp/uri-template",
3+
"type": "library",
4+
"description": "A polyfill class for uri_template of PHP",
5+
"keywords": [
6+
"guzzlehttp",
7+
"uri-template"
8+
],
9+
"homepage": "https://github.com/guzzlehttp/uri-template",
10+
"license": "MIT",
11+
"authors": [
12+
{
13+
"name": "George Mponos",
14+
"email": "[email protected]",
15+
"homepage": "https://github.com/gmponos",
16+
"role": "Developer"
17+
}
18+
],
19+
"require": {
20+
"php" : "^7.2"
21+
},
22+
"require-dev": {
23+
"phpunit/phpunit" : "^8.5 || ^9.3"
24+
},
25+
"autoload": {
26+
"psr-4": {
27+
"GuzzleHttp\\": "src"
28+
}
29+
},
30+
"autoload-dev": {
31+
"psr-4": {
32+
"GuzzleHttp\\Tests\\": "tests"
33+
}
34+
},
35+
"extra": {
36+
"branch-alias": {
37+
"dev-master": "1.0-dev"
38+
}
39+
},
40+
"config": {
41+
"sort-packages": true
42+
}
43+
}

phpunit.xml.dist

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
verbose="true"
7+
failOnWarning="true"
8+
failOnRisky="true"
9+
>
10+
<testsuites>
11+
<testsuite name="AllTests">
12+
<directory>tests</directory>
13+
</testsuite>
14+
</testsuites>
15+
<filter>
16+
<whitelist>
17+
<directory suffix=".php">src/</directory>
18+
</whitelist>
19+
</filter>
20+
<logging>
21+
<log type="coverage-html" target="build/coverage" />
22+
<log type="coverage-text" target="build/coverage.txt" showOnlySummary="true" />
23+
</logging>
24+
</phpunit>

0 commit comments

Comments
 (0)