Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Commit

Permalink
Merge 1fd40c6 into c620f44
Browse files Browse the repository at this point in the history
  • Loading branch information
sanmai committed Mar 8, 2020
2 parents c620f44 + 1fd40c6 commit 70197f4
Show file tree
Hide file tree
Showing 117 changed files with 7,558 additions and 2,348 deletions.
75 changes: 75 additions & 0 deletions .php_cs.dist
@@ -0,0 +1,75 @@
<?php
/**
* Hoa
*
*
* @license
*
* BSD 3-Clause License
*
* Copyright © 2007-2017, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/

declare(strict_types=1);

$header = <<<'EOF'
Hoa
@license
EOF;

$header .= file_get_contents('LICENSE');

return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'header_comment' => ['commentType' => 'PHPDoc', 'header' => $header, 'separate' => 'bottom', 'location' => 'after_open'],
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
'blank_line_after_opening_tag' => true,
'concat_space' => ['spacing' => 'one'],
'no_blank_lines_after_class_opening' => true,
'ordered_imports' => true,
'phpdoc_no_access' => true,
'no_leading_import_slash' => true,
'self_accessor' => true,
'array_syntax' => ['syntax' => 'short'],
'cast_spaces' => true,
'no_unused_imports' => true,
'no_whitespace_in_blank_line' => true,

])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
)
;
70 changes: 20 additions & 50 deletions .travis.yml
@@ -1,59 +1,29 @@
language: php

branches:
only:
- staging
- trying
- master

matrix:
include:
- php: 5.6
- php: 7.0
- php: 7.1
env:
- ENABLE_DEVTOOLS=true
- php: nightly
- php: hhvm-3.12
sudo: required
dist: trusty
group: edge
- php: hhvm
sudo: required
dist: trusty
group: edge
php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

jobs:
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm-3.12
- php: hhvm
fast_finish: true

os:
- linux

notifications:
irc: "chat.freenode.net#hoaproject"

sudo: false

env:
global:
- secure: "AAAAB3NzaC1yc2EAAAADAQABAAAAgQCoAO780/K7xbK3aPnHJmAyw9B3OGRFx2sSnl6umenksq4kmlzmPaUF9g3cHGcXpM5O33P8Tux//iYGASy5W8f5vbxbWSvlwV/aWFW9oSM6G/01gyW9vRFK0MnXpUMyCF9B4K/RJumGxm9BSxkAFFo2gPHIJrd08SOQeiDLygpcEQ=="

cache:
directories:
- vendor/
- $HOME/.composer
- build/cache

before_script:
- export PATH="$PATH:$HOME/.composer/vendor/bin"
- if [[ ! $ENABLE_XDEBUG ]]; then
phpenv config-rm xdebug.ini || echo "ext-xdebug is not available, cannot remove it.";
fi
install:
- composer install --prefer-dist
- pecl install pcov || true

script:
- composer install
- vendor/bin/hoa test:run
- if [[ $ENABLE_DEVTOOLS ]]; then
composer global require friendsofphp/php-cs-fixer;
vendor/bin/hoa devtools:cs --diff --dry-run .;
fi
- php vendor/bin/phpunit --coverage-clover build/logs/clover.xml || php vendor/bin/phpunit
- phpenv config-rm xdebug.ini || true
- vendor/bin/atoum -ncc -d atoum/

after_success:
- travis_retry php vendor/bin/php-coveralls -v
165 changes: 0 additions & 165 deletions CHANGELOG.md

This file was deleted.

57 changes: 0 additions & 57 deletions Exception/Exception.php

This file was deleted.

0 comments on commit 70197f4

Please sign in to comment.