Skip to content

Commit

Permalink
Merge pull request #3 from abbadon1334/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
abbadon1334 authored Jul 11, 2019
2 parents c505464 + 7af3b47 commit 105c520
Show file tree
Hide file tree
Showing 72 changed files with 1,586 additions and 1,487 deletions.
7 changes: 6 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/vendor/
/vendor
.idea/
composer.lock
docs/_build
composer.phar
/composer.lock
.DS_Store
.php_cs.cache
/build
Empty file modified .readthedocs.yml
100644 → 100755
Empty file.
27 changes: 15 additions & 12 deletions .travis.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
dist: trusty
sudo: required
language: php

php:
- 7.1
- 7.2
- 7.3

install:
- composer install --dev --no-interaction
before_script:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install -n
- composer require satooshi/php-coveralls:~1.0@stable # Require phpCoveralls
- mkdir -p coverage/xml # Create a folder to store clover files #1
- mkdir -p build/logs # Create a folder to store clover files #2
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build

script:
- mkdir build
- cd tests
- phpunit --coverage-clover ../build/clover.xml --configuration phpunit.xml
- cd ..

- php vendor/bin/phpunit --coverage-clover build/logs/clover.xml

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/clover.xml
- php vendor/bin/codacycoverage clover build/logs/clover.xml
- sh -c 'if( [ "$TRAVIS_PHP_VERSION" != "hhvm" ] ); then php vendor/bin/coveralls -v; fi;'
- ./cc-test-reporter after-build --coverage-input-type clover --exit-code $TRAVIS_TEST_RESULT
Empty file modified LICENSE
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions Makefile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
default: test docs


docs: clean
./bin/phpdoc-to-rst generate --repo-base $(CURDIR) --repo-github https://github.com/juliushaertl/phpdoc-to-rst -t ./docs/api src
cd docs && make html

test:
phpunit -c tests/phpunit.xml
phpunit -c phpunit.xml

clean:
rm -fr docs/api/
Expand Down
12 changes: 11 additions & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# phpdoc-to-rst

[![Documentation Status](https://readthedocs.org/projects/phpdoc-to-rst/badge/?version=latest)](http://phpdoc-to-rst.readthedocs.io/en/latest/?badge=latest) [![Build Status](https://scrutinizer-ci.com/g/juliushaertl/phpdoc-to-rst/badges/build.png?b=master)](https://scrutinizer-ci.com/g/juliushaertl/phpdoc-to-rst/build-status/master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/juliushaertl/phpdoc-to-rst/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/juliushaertl/phpdoc-to-rst/?branch=master)
[![Build Status](https://travis-ci.org/abbadon1334/phpdoc-to-rst.svg?branch=master)](https://travis-ci.org/abbadon1334/phpdoc-to-rst)
[![Coverage Status](https://coveralls.io/repos/github/abbadon1334/phpdoc-to-rst/badge.svg?branch=master)](https://coveralls.io/github/abbadon1334/phpdoc-to-rst?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/4b4264eb36ca49ed81d29f5102a64a39)](https://www.codacy.com/app/abbadon1334/phpdoc-to-rst?utm_source=github.com&utm_medium=referral&utm_content=abbadon1334/phpdoc-to-rst&utm_campaign=Badge_Grade)

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/badges/build.png?b=master)](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/build-status/master)
[![Code Intelligence Status](https://scrutinizer-ci.com/g/abbadon1334/phpdoc-to-rst/badges/code-intelligence.svg?b=master)](https://scrutinizer-ci.com/code-intelligence)

Forked and refactor by Francesco "Abbadon1334" Danti.

Now working as intended, with good coverage.

Generate reStructuredText for Sphinx based documentation from PHPDoc annotations.

Expand Down
50 changes: 26 additions & 24 deletions bin/phpdoc-to-rst
Original file line number Diff line number Diff line change
@@ -1,31 +1,33 @@
#!/usr/bin/env php
<?php
/**
* @copyright Copyright (c) 2017 Julius Härtl <jus@bitgrid.net>
*
* @author Julius Härtl <jus@bitgrid.net>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

require 'vendor/autoload.php';

if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}

foreach (array(__DIR__ . '/../../autoload.php', __DIR__ . '/../vendor/autoload.php', __DIR__ . '/vendor/autoload.php') as $file) {
if (file_exists($file)) {
define('PHPUNIT_COMPOSER_INSTALL', $file);
break;
}
}

unset($file);

if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
fwrite(STDERR,
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
'wget http://getcomposer.org/composer.phar' . PHP_EOL .
'php composer.phar install' . PHP_EOL
);
die(1);
}

require PHPUNIT_COMPOSER_INSTALL;


use Symfony\Component\Console\Application;

$application = new Application();
$application->add(new \JuliusHaertl\PHPDocToRst\GenerateDocumentationCommand());
$application->add(new JuliusHaertl\PHPDocToRst\GenerateDocumentationCommand());
$application->run();
9 changes: 2 additions & 7 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"symfony/console": "^4.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8|^7.0"
"phpunit/phpunit": "*"
},
"license": "AGPL-3.0-or-later",
"authors": [
Expand Down Expand Up @@ -36,10 +36,5 @@
"JuliusHaertl\\PHPDocToRst\\Test\\": "tests/"
}
},
"config": {
"bin-dir": "bin/"
},
"bin": [
"bin/phpdoc-to-rst"
]
"bin": ["bin/phpdoc-to-rst"]
}
Empty file modified docs/Makefile
100644 → 100755
Empty file.
Empty file modified docs/_static/style.css
100644 → 100755
Empty file.
Empty file modified docs/_templates/layout.html
100644 → 100755
Empty file.
Loading

0 comments on commit 105c520

Please sign in to comment.