Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jamielsharief committed Dec 10, 2019
0 parents commit 73cbebc
Show file tree
Hide file tree
Showing 12 changed files with 1,388 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
service_name: travis-ci
coverage_clover: clover.xml # file generated by phpunit
json_path: coverage.json # file generated by php-coveralls
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/tests export-ignore
/phpunit.xml.dist export-ignore
/phpcs.xml.dist export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.coveralls.yml export-ignore
/phpunit.xml.dist export-ignore
/phpcs.xml.dist export-ignore
/LICENSE.md export-ignore
/CHANGELOG.md export-ignore
/README.md export-ignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
vendor/
composer.lock
phpunit.xml
.phpunit.result.cache
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: php
php:
- 7.2
- 7.3
- 7.4snapshot
dist: xenial
before_script:
- composer install --prefer-source --no-interaction
script:
- vendor/bin/phpunit --coverage-clover=clover.xml
after_script:
- wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
- php php-coveralls.phar --verbose
cache:
directories:
- $HOME/.composer/cache/files
after_success:
- bash <(curl -s https://codecov.io/bash)
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.0] - 2019-12-XX

This is a new component for the [OriginPHP framework](https://www.originphp.com/).
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [2019] [Jamiel Sharief]

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.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Validation

![license](https://img.shields.io/badge/license-MIT-brightGreen.svg)
[![build](https://travis-ci.org/originphp/validation.svg?branch=master)](https://travis-ci.org/originphp/validation)
[![coverage](https://coveralls.io/repos/github/originphp/validation/badge.svg?branch=master)](https://coveralls.io/github/originphp/validation?branch=master)

This is the new Validation library.

## Installation

To install this package

```linux
$ composer require originphp/validation
```

### Rules
39 changes: 39 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "originphp/validation",
"description": "OriginPHP Validation",
"type": "library",
"keywords": [
"originphp",
"validation",
"validate",
"credit card",
"iban",
"md5",
"luhn",
"mac address"
],
"homepage": "https://www.originphp.com",
"license": "MIT",
"authors": [
{
"name": "Jamiel Sharief",
"email": "js@originphp.com"
}
],
"autoload": {
"psr-4": {
"Origin\\Validation\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Origin\\Test\\Validation\\": "tests/"
}
},
"require": {
"php": "^7.2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0"
}
}
7 changes: 7 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0"?>
<ruleset name="OriginPHP">
<description>The coding standard for OriginPHP.</description>
<rule ref="PSR2"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
</ruleset>
23 changes: 23 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
backupGlobals="true"
>
<testsuites>
<testsuite name="OriginPHP Validation">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
</whitelist>
</filter>
<php>
<const name="PHPUNIT" value="true"/>
<env name="ORIGIN_ENV" value="test"/>
</php>
</phpunit>
Loading

0 comments on commit 73cbebc

Please sign in to comment.