Skip to content

Commit 39db375

Browse files
committed
Setup package
0 parents  commit 39db375

File tree

10 files changed

+154
-0
lines changed

10 files changed

+154
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
[*.yml]
15+
indent_size = 2
16+
17+
[*.md]
18+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
/.editorconfig export-ignore
6+
/.gitattributes export-ignore
7+
/.github export-ignore
8+
/.gitignore export-ignore
9+
/phpunit.xml.dist export-ignore
10+
/tests export-ignore

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/vendor
2+
/phpunit.xml
3+
composer.lock
4+
/.phpunit.result.cache

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) Ivan Vermeyen (<[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.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# PHP URL Builder
2+

composer.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "codezero/php-url-builder",
3+
"description": "Parse, manipulate and rebuild a URL.",
4+
"keywords": [
5+
"url",
6+
"builder",
7+
"parse",
8+
"query",
9+
"uri"
10+
],
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Ivan Vermeyen",
15+
"email": "[email protected]"
16+
}
17+
],
18+
"require": {
19+
"php": ">= 7.0"
20+
},
21+
"require-dev": {
22+
"phpunit/phpunit": "^8.0|^9.0"
23+
},
24+
"scripts": {
25+
"test": "phpunit"
26+
},
27+
"autoload": {
28+
"psr-4": {
29+
"CodeZero\\UrlBuilder\\": "src"
30+
}
31+
},
32+
"autoload-dev": {
33+
"psr-4": {
34+
"CodeZero\\UrlBuilder\\Tests\\": "tests"
35+
}
36+
},
37+
"config": {
38+
"preferred-install": "dist",
39+
"sort-packages": true,
40+
"optimize-autoloader": true
41+
},
42+
"minimum-stability": "dev",
43+
"prefer-stable": true
44+
}

phpunit.xml.dist

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit backupGlobals="false"
3+
backupStaticAttributes="false"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false">
11+
<testsuites>
12+
<testsuite name="Unit">
13+
<directory suffix="Test.php">./tests/Unit</directory>
14+
</testsuite>
15+
</testsuites>
16+
<filter>
17+
<whitelist processUncoveredFilesFromWhitelist="true">
18+
<directory suffix=".php">./src</directory>
19+
</whitelist>
20+
</filter>
21+
<php>
22+
<env name="APP_ENV" value="testing"/>
23+
<env name="CACHE_DRIVER" value="array"/>
24+
<env name="SESSION_DRIVER" value="array"/>
25+
<env name="QUEUE_DRIVER" value="sync"/>
26+
</php>
27+
</phpunit>

src/UrlBuilder.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
namespace CodeZero\UrlBuilder;
4+
5+
class UrlBuilder
6+
{
7+
//
8+
}

tests/TestCase.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace CodeZero\UrlBuilder\Tests;
4+
5+
use PHPUnit\Framework\TestCase as BaseTestCase;
6+
7+
abstract class TestCase extends BaseTestCase
8+
{
9+
//
10+
}

tests/Unit/UrlBuilderTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace CodeZero\UrlBuilder\Tests\Unit;
4+
5+
use CodeZero\UrlBuilder\Tests\TestCase;
6+
7+
class UrlBuilderTest extends TestCase
8+
{
9+
//
10+
}

0 commit comments

Comments
 (0)