Skip to content

Commit

Permalink
Merge pull request #789 from ApiGen/cleanup
Browse files Browse the repository at this point in the history
General cleanup
  • Loading branch information
jankal committed Mar 12, 2017
2 parents a14cf2e + 28f795f commit 607ef30
Show file tree
Hide file tree
Showing 216 changed files with 138 additions and 1,491 deletions.
3 changes: 1 addition & 2 deletions .gitignore
@@ -1,3 +1,2 @@
/vendor
/composer.lock
/*.phar
composer.lock
18 changes: 0 additions & 18 deletions .scrutinizer.yml
@@ -1,21 +1,3 @@
filter:
excluded_paths:
- tests/*

before_commands:
- "composer install --prefer-source"

tools:
external_code_coverage:
timeout: 900
sensiolabs_security_checker: true
php_code_coverage:
enabled: true
php_analyzer:
config:
verify_php_doc_comments:
suggest_more_specific_types: false

checks:
php:
code_rating: true
51 changes: 20 additions & 31 deletions .travis.yml
@@ -1,45 +1,34 @@
language: php

php:
- 7.1

sudo: false

env:
global:
- DEFAULT=1

matrix:
fast_finish: true

include:
- php: 7.1
env: PHPCS=1 DEFAULT=0 COVERALLS=1

allow_failures:
- env: COVERALLS=1 DEFAULT=0
# add variables to enable coverage, coding standard check and static analysis
env: PHPUNIT_FLAGS="--coverage-clover coverage.xml" CHECK_CS=1 RUN_PHPSTAN=1

before_script:
- composer self-update
- composer install --prefer-dist --no-interaction

- sh -c "if [ '$COVERALLS' = '1' ]; then composer require --dev satooshi/php-coveralls:dev-master; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then mkdir -p build/logs; fi"

- phpenv rehash
- set +H
install:
# install composer dependencies
- composer install

script:
- sh -c "if [ '$DEFAULT' = '1' ]; then phpunit; fi"

- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=PSR2 ./src; fi"

- sh -c "if [ '$COVERALLS' = '1' ]; then phpunit --coverage-clover build/logs/clover.xml; fi"
- sh -c "if [ '$COVERALLS' = '1' ]; then vendor/bin/coveralls -c .coveralls.yml -v; fi"

notifications:
email: false
# run tests
- vendor/bin/phpunit $PHPUNIT_FLAGS
# check coding standard (defined in composer.json "scripts" section)
- if [[ $CHECK_CS = 1 ]]; then composer check-cs; fi
# check with phpstan (defined in composer.json "scripts" section)
- if [[ $RUN_PHPSTAN = 1 ]]; then composer phpstan; fi

after_script:
# upload coverage.xml file to Scrutinizer to analyze it
- |
if [[ $PHPUNIT_FLAGS != "" ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml
fi
- ./update-gh-page.sh
- ./generate-api.sh

notifications:
email: false
3 changes: 1 addition & 2 deletions README.md
@@ -1,8 +1,7 @@
# Smart and Readable Documentation for your PHP project

[![Build Status](https://img.shields.io/travis/ApiGen/ApiGen/master.svg?style=flat-square)](https://travis-ci.org/ApiGen/ApiGen)
[![Quality Score](https://img.shields.io/scrutinizer/g/ApiGen/ApiGen.svg?style=flat-square)](https://scrutinizer-ci.com/g/ApiGen/ApiGen)
[![Coverage Status](https://coveralls.io/repos/github/ApiGen/ApiGen/badge.svg?branch=master)](https://coveralls.io/github/ApiGen/ApiGen?branch=master)
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/ApiGen/ApiGen.svg?style=flat-square)](https://scrutinizer-ci.com/g/ApiGen/ApiGen)
[![Downloads](https://img.shields.io/packagist/dt/apigen/apigen.svg?style=flat-square)](https://packagist.org/packages/apigen/apigen)
[![Latest stable](https://img.shields.io/packagist/v/apigen/apigen.svg?style=flat-square)](https://packagist.org/packages/apigen/apigen)

Expand Down
42 changes: 21 additions & 21 deletions composer.json
Expand Up @@ -15,28 +15,28 @@
"popsul/php-token-reflection": "^1.5",
"apigen/theme-bootstrap": "1.1.*",
"apigen/theme-default": "1.0.*",
"kukulich/fshl": "~2.1",
"kukulich/fshl": "^2.1",
"latte/latte": "^2.3.6",
"michelf/php-markdown": "~1.4",
"nette/bootstrap": "^2.3",
"nette/di": "^2.3",
"nette/neon": "^2.3",
"nette/reflection": "^2.3",
"symfony/console": "^2.7",
"symfony/event-dispatcher": "^2.7",
"symfony/options-resolver": "^2.7",
"symfony/yaml": "^2.7",
"michelf/php-markdown": "^1.4",
"nette/bootstrap": "^2.4",
"nette/di": "^2.4",
"nette/neon": "^2.4",
"nette/reflection": "^2.4",
"symfony/console": "^3.2",
"symfony/event-dispatcher": "^3.2",
"symfony/options-resolver": "^3.2",
"symfony/yaml": "^3.2",
"tracy/tracy": "^2.3"
},
"require-dev": {
"ext-zip": "*",
"mockery/mockery": "~0.9",
"squizlabs/php_codesniffer": "~2.8",
"phpunit/phpunit": "~6.0"
"mockery/mockery": "^0.9",
"squizlabs/php_codesniffer": "^2.8",
"phpunit/phpunit": "^6.0",
"phpstan/phpstan": "^0.6.4"
},
"conflict": {
"latte/latte": "~2.4.0",
"nette/utils": "~2.4.0"
"latte/latte": "^2.4.0"
},
"autoload": {
"psr-4": {
Expand All @@ -50,12 +50,12 @@
"ApiGen\\Parser\\Tests\\": "tests/Parser"
}
},
"scripts": {
"check-cs": ["vendor/bin/phpcs -ps --extensions=php --standard=PSR2 --exclude=PSR1.Files.SideEffects src tests"],
"fix-cs": ["vendor/bin/phpcbf -p --extensions=php --standard=PSR2 --exclude=PSR1.Files.SideEffects src tests"],
"phpstan": "vendor/bin/phpstan analyse src --level 1 -c phpstan.neon"
},
"bin": [
"bin/apigen"
],
"extra": {
"branch-alias": {
"dev-master": "4.2.0-dev"
}
}
]
}
4 changes: 4 additions & 0 deletions phpstan.neon
@@ -0,0 +1,4 @@
parameters:
ignoreErrors:
- "#does not call parent constructor from#"
- "#getDocComment#"
28 changes: 0 additions & 28 deletions src/ApiGen.php

This file was deleted.

7 changes: 0 additions & 7 deletions src/Configuration/Configuration.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration;

use ApiGen\Contracts\Configuration\ConfigurationInterface;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/ConfigurationOptions.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration;

class ConfigurationOptions
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/ConfigurationOptionsResolver.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration;

use ApiGen\Configuration\ConfigurationOptions as CO;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Exceptions/ConfigurationException.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Exceptions;

use RuntimeException;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/OptionsResolverFactory.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration;

use Symfony\Component\OptionsResolver\OptionsResolver;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Readers/AbstractFile.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers;

use ApiGen\Configuration\Readers\Exceptions\FileNotReadableException;
Expand Down
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers\Exceptions;

use RuntimeException;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Readers/Exceptions/MissingFileException.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers\Exceptions;

use InvalidArgumentException;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Readers/NeonFile.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers;

use Nette\Neon\Neon;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Readers/ReaderFactory.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers;

class ReaderFactory
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Readers/ReaderInterface.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers;

interface ReaderInterface
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Readers/YamlFile.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Readers;

use Symfony\Component\Yaml\Yaml;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Theme/ThemeConfig.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Theme;

use ApiGen\Configuration\Exceptions\ConfigurationException;
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Theme/ThemeConfigFactory.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Theme;

interface ThemeConfigFactory
Expand Down
7 changes: 0 additions & 7 deletions src/Configuration/Theme/ThemeConfigOptions.php
@@ -1,12 +1,5 @@
<?php

/**
* This file is part of the ApiGen (http://apigen.org)
*
* For the full copyright and license information, please view
* the file LICENSE that was distributed with this source code.
*/

namespace ApiGen\Configuration\Theme;

class ThemeConfigOptions
Expand Down

0 comments on commit 607ef30

Please sign in to comment.