diff --git a/.idea/atom-generator.iml b/.idea/atom-generator.iml index c956989..aec3792 100644 --- a/.idea/atom-generator.iml +++ b/.idea/atom-generator.iml @@ -1,7 +1,71 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..bb21305 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,129 @@ + + + + \ No newline at end of file diff --git a/.idea/php.xml b/.idea/php.xml index cf195ad..aae202b 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -1,9 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 508fac6..2773cb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,9 +9,14 @@ sudo: false matrix: fast_finish: true include: - - php: '7.1' - - php: '7.2' - - php: '7.3' + - php: 7.1 + - php: 7.2 + - php: 7.3 + +before_script: + - 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 install: - travis_retry composer install --no-progress --no-interaction --prefer-dist @@ -19,7 +24,8 @@ install: script: - ./vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run -v --stop-on-violation - ./vendor/bin/phpstan analyse -l 7 -c phpstan.neon src tests - - ./vendor/bin/phpunit --coverage-clover=coverage.xml + - ./vendor/bin/phpunit --coverage-clover=clover.xml after_success: - - bash <(curl -s https://codecov.io/bash) \ No newline at end of file + - bash <(curl -s https://codecov.io/bash) + - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT \ No newline at end of file diff --git a/README.md b/README.md index e1667eb..acd1d93 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,19 @@ To include `mc-google-visualization` in your project, add it to your `composer.j include_once 'vendor/autoload.php'; -$feed = new AtomGenerator\Feed(); -$feed->setTitle('Blog'); -$feed->setUpdatedDateTime(new DateTime('now')); - $entry = new AtomGenerator\Entry(); $entry->setTitle('Post', 'text'); $entry->setId('tag:id'); $entry->setContent('Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'text'); $entry->setUpdatedDateTime(new DateTime('2019-05-04T21:00:40Z')); +$feed = new AtomGenerator\Feed(); +$feed->setTitle('Blog'); +$feed->setUpdatedDateTime(new DateTime('now')); $feed->addEntry($entry); +assert(AtomGenerator\Feed::validate($feed->getDocument())); + echo $feed->saveXML(); ``` diff --git a/composer.json b/composer.json index 0590246..c6ab99e 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "require": { "php": "^7.1", "ext-dom": "*", + "ext-libxml": "*", "ext-simplexml": "*", "webmozart/assert": "^1.5" }, diff --git a/composer.lock b/composer.lock index eadad76..f1fcdef 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cd2795c8d8d7e6466bb20798975ef8bc", + "content-hash": "2d3f7ef721c1bff7db191cd1d7c92491", "packages": [ { "name": "symfony/polyfill-ctype", @@ -3468,6 +3468,7 @@ "platform": { "php": "^7.1", "ext-dom": "*", + "ext-libxml": "*", "ext-simplexml": "*" }, "platform-dev": [],