mirror of
https://github.com/Dannecron/coverage-merger.git
synced 2025-12-25 15:52:34 +03:00
Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 91b50b08e2 | |||
| 3433be1e79 | |||
| 47505b0927 | |||
| a3c2e3fe9c | |||
| aafcf6a106 | |||
| 1bf5abb10f | |||
| 5e2981a723 | |||
| c2e9c9559d | |||
| 6c94c20e30 | |||
| 3debe8ed1a | |||
| 450e07890e | |||
| 9ccb6e57a3 | |||
| 949dcc147d | |||
| 49ee12e1f6 | |||
| 10e2d1408c | |||
| 18359e6dec | |||
| fd321739d8 | |||
| eb6f66a7b1 | |||
| 807fb08d54 | |||
| 682507dd77 | |||
| d433412358 | |||
| a87af35f4d | |||
| dd502706d6 | |||
| 99d434840a |
21
.github/Dockerfile
vendored
Normal file
21
.github/Dockerfile
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
ARG PHP_VERSION=8.2.13
|
||||||
|
ARG COMPOSER_VERSION=2.6.6
|
||||||
|
ARG MERGER_VERSION=dev-master
|
||||||
|
|
||||||
|
FROM composer:${COMPOSER_VERSION} as composer
|
||||||
|
|
||||||
|
FROM php:${PHP_VERSION}-cli-alpine as runtime
|
||||||
|
|
||||||
|
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY composer.json composer.json
|
||||||
|
RUN composer update --no-dev
|
||||||
|
|
||||||
|
COPY merger merger
|
||||||
|
COPY src src
|
||||||
|
|
||||||
|
ENV MERGER_VERSION=${MERGER_VERSION}
|
||||||
|
|
||||||
|
ENTRYPOINT ["/app/merger"]
|
||||||
33
.github/workflows/ci-tags.yml
vendored
Normal file
33
.github/workflows/ci-tags.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
name: ci-tags
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-tag:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Build docker image
|
||||||
|
run: |
|
||||||
|
DOCKER_BUILDKIT=1 docker build \
|
||||||
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
|
--build-arg PHP_VERSION=${{ vars.DOCKER_RUNTIME_PHP_VERSION }} \
|
||||||
|
--build-arg COMPOSER_VERSION=${{ vars.DOCKER_RUNTIME_COMPOSER_VERSION }} \
|
||||||
|
--build-arg MERGER_VERSION=${{ github.ref_name }} \
|
||||||
|
--target=runtime \
|
||||||
|
--tag=dannecron/coverage-merger:${{ github.ref_name }} \
|
||||||
|
--file=./.github/Dockerfile .
|
||||||
|
- name: Login to docker hub
|
||||||
|
uses: actions-hub/docker/login@master
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
- name: Push docker image to docker-hub
|
||||||
|
uses: actions-hub/docker@master
|
||||||
|
with:
|
||||||
|
args: push dannecron/coverage-merger:${{ github.ref_name }}
|
||||||
80
.github/workflows/ci.yml
vendored
Normal file
80
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php_version: ['8.1', '8.2']
|
||||||
|
prefer_lowest: ['yes', '']
|
||||||
|
container: dannecron/php-for-dev:${{ matrix.php_version }}
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Init composer.lock
|
||||||
|
run: |
|
||||||
|
composer update --no-install $(if [[ "${{ matrix.prefer_lowest }}" == 'yes' ]]; then echo '--prefer-lowest'; fi)
|
||||||
|
- name: Install dependencies
|
||||||
|
run: composer install
|
||||||
|
- name: Run tests
|
||||||
|
run: composer run pest-coverage
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php_version: ['80100', '80200']
|
||||||
|
container: dannecron/php-for-dev:8.2
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Init composer.lock and install dependencies
|
||||||
|
run: composer update
|
||||||
|
- name: Run phpcs
|
||||||
|
run: vendor/bin/phpcs --standard=phpcs.xml --report=full --config-set php_version ${{ matrix.php_version }} ./src ./tests
|
||||||
|
|
||||||
|
analyze:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
container: dannecron/php-for-dev:8.2
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Init composer.lock and install dependencies
|
||||||
|
run: composer update
|
||||||
|
- name: Run phpstan
|
||||||
|
run: vendor/bin/phpstan analyse src tests
|
||||||
|
|
||||||
|
build-main:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
|
needs:
|
||||||
|
- tests
|
||||||
|
- lint
|
||||||
|
- analyze
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Build docker image
|
||||||
|
run: |
|
||||||
|
DOCKER_BUILDKIT=1 docker build \
|
||||||
|
--build-arg BUILDKIT_INLINE_CACHE=1 \
|
||||||
|
--build-arg PHP_VERSION=${{ vars.DOCKER_RUNTIME_PHP_VERSION }} \
|
||||||
|
--build-arg COMPOSER_VERSION=${{ vars.DOCKER_RUNTIME_COMPOSER_VERSION }} \
|
||||||
|
--target=runtime \
|
||||||
|
--tag=dannecron/coverage-merger:latest \
|
||||||
|
--file=./.github/Dockerfile .
|
||||||
|
- name: Login to docker hub
|
||||||
|
uses: actions-hub/docker/login@master
|
||||||
|
env:
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
- name: Push docker image to docker-hub
|
||||||
|
uses: actions-hub/docker@master
|
||||||
|
with:
|
||||||
|
args: push dannecron/coverage-merger:latest
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.2.0 - 2023-10-10
|
||||||
|
|
||||||
|
### Added
|
||||||
|
* phpstan to dev-dependencies
|
||||||
|
* CI
|
||||||
|
* New stage for static analysis
|
||||||
|
* New stages for building and pushing docker images
|
||||||
|
|
||||||
## 0.1.0 - 2023-09-21
|
## 0.1.0 - 2023-09-21
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -8,14 +8,38 @@ Supported formats:
|
|||||||
|
|
||||||
### Install
|
### Install
|
||||||
|
|
||||||
// todo
|
Available as composer-package on [packagist](https://packagist.org/packages/dannecron/coverage-merger)
|
||||||
|
and as docker-image on [docker-hub](https://hub.docker.com/r/dannecron/coverage-merger).
|
||||||
|
|
||||||
|
#### As global composer dependency
|
||||||
|
|
||||||
|
```shell
|
||||||
|
composer global require dannecron/coverage-merger
|
||||||
|
```
|
||||||
|
|
||||||
|
#### As local composer dev-dependency
|
||||||
|
|
||||||
|
```shell
|
||||||
|
composer require --dev dannecron/coverage-merger
|
||||||
|
```
|
||||||
|
|
||||||
|
#### As docker-container
|
||||||
|
|
||||||
|
```shell
|
||||||
|
docker pull dannecron/coverage-merger:latest
|
||||||
|
```
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
It's cli-app with single access point:
|
It's cli-app with single access point:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./merger
|
# if installed globally
|
||||||
|
$COMPOSER_HOME/vendor/bin/merger
|
||||||
|
# if installed locally
|
||||||
|
./vendor/bin/merger
|
||||||
|
# if pulled from docker hub
|
||||||
|
docker run --rm dannecron/coverage-merger:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
```text
|
```text
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"mockery/mockery": "1.6.6",
|
"mockery/mockery": "1.6.6",
|
||||||
"pestphp/pest": "2.18.2",
|
"pestphp/pest": "2.18.2",
|
||||||
|
"phpstan/phpstan": "1.10.37",
|
||||||
"squizlabs/php_codesniffer": "3.7.2"
|
"squizlabs/php_codesniffer": "3.7.2"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@@ -37,5 +38,10 @@
|
|||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"pestphp/pest-plugin": false
|
"pestphp/pest-plugin": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"pest": "vendor/bin/pest",
|
||||||
|
"pest-coverage": "env XDEBUG_MODE=coverage vendor/bin/pest --coverage-html=./tests/data/coverage-html --coverage-text",
|
||||||
|
"pest-coverage-html": "env XDEBUG_MODE=coverage vendor/bin/pest --coverage-html=./tests/data/coverage-html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
7
merger
7
merger
@@ -27,7 +27,12 @@ if (isset($GLOBALS['_composer_autoload_path'])) {
|
|||||||
unset($knownAutoloadPaths, $path);
|
unset($knownAutoloadPaths, $path);
|
||||||
}
|
}
|
||||||
|
|
||||||
$app = new \Ahc\Cli\Application('clover-merger', '0.1.0');
|
$appVersion = \getenv('MERGER_VERSION');
|
||||||
|
if ($appVersion === false) {
|
||||||
|
$appVersion = 'dev';
|
||||||
|
}
|
||||||
|
|
||||||
|
$app = new \Ahc\Cli\Application('clover-merger', $appVersion);
|
||||||
|
|
||||||
$app->onException(static function (\Throwable $exception, int $exitCode) use ($app): void {
|
$app->onException(static function (\Throwable $exception, int $exitCode) use ($app): void {
|
||||||
$io = $app->io();
|
$io = $app->io();
|
||||||
|
|||||||
32
phpstan.neon
Normal file
32
phpstan.neon
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
parameters:
|
||||||
|
level: 8
|
||||||
|
paths:
|
||||||
|
- src
|
||||||
|
- tests
|
||||||
|
scanFiles:
|
||||||
|
# Pest handles loading custom helpers only when running tests
|
||||||
|
# @see https://pestphp.com/docs/helpers#usage
|
||||||
|
- tests/Pest.php
|
||||||
|
# Mockery doesn't autoload its helper functions
|
||||||
|
- vendor/mockery/mockery/library/helpers.php
|
||||||
|
ignoreErrors:
|
||||||
|
# Pest implicitly binds $this to the current test case
|
||||||
|
# @see https://pestphp.com/docs/underlying-test-case
|
||||||
|
- message: '#^Undefined variable: \$this$#'
|
||||||
|
paths:
|
||||||
|
- tests/*
|
||||||
|
# Pest custom expectations are dynamic and not conducive static analysis
|
||||||
|
# @see https://pestphp.com/docs/expectations#custom-expectations
|
||||||
|
- messages:
|
||||||
|
- '#Call to an undefined method Pest\\Expectation|Pest\\Support\\Extendable::#'
|
||||||
|
- '#Call to an undefined method Pest\\Mixins\\Expectation#'
|
||||||
|
- '#Call to an undefined method Pest\\PendingCalls\\TestCall|Pest\\Support\\HigherOrderTapProxy::#'
|
||||||
|
- '#Access to an undefined property Pest\\Mixins\\Expectation#'
|
||||||
|
paths:
|
||||||
|
- tests/*
|
||||||
|
# Some mockery errors
|
||||||
|
- messages:
|
||||||
|
- '#Call to an undefined method Mockery\\ExpectationInterface|Mockery\\HigherOrderMessage::#'
|
||||||
|
- '#Parameter .+ Mockery\\LegacyMockInterface given.#'
|
||||||
|
paths:
|
||||||
|
- tests/*
|
||||||
@@ -14,6 +14,9 @@ class ClassDto
|
|||||||
) {
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
public function getProperties(): array
|
public function getProperties(): array
|
||||||
{
|
{
|
||||||
return $this->properties;
|
return $this->properties;
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ class LineDto
|
|||||||
return $this->count;
|
return $this->count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array<string, string>
|
||||||
|
*/
|
||||||
public function getProperties(): array
|
public function getProperties(): array
|
||||||
{
|
{
|
||||||
return $this->properties;
|
return $this->properties;
|
||||||
|
|||||||
@@ -57,6 +57,10 @@ class Parser implements ElementsDictionary
|
|||||||
return new LineDto($properties, (int) $count);
|
return new LineDto($properties, (int) $count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \SimpleXMLElement $xml
|
||||||
|
* @return array<array-key, \SimpleXMLElement>
|
||||||
|
*/
|
||||||
public function getAttributes(\SimpleXMLElement $xml): array
|
public function getAttributes(\SimpleXMLElement $xml): array
|
||||||
{
|
{
|
||||||
return ((array) $xml->attributes())['@attributes'] ?? [];
|
return ((array) $xml->attributes())['@attributes'] ?? [];
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ class Renderer
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param Accumulator $accumulator
|
* @param Accumulator $accumulator
|
||||||
* @return array
|
* @return array{0: string, 1: Metrics}
|
||||||
* @throws \DOMException
|
* @throws \DOMException
|
||||||
*/
|
*/
|
||||||
public function renderAccumulator(Accumulator $accumulator): array
|
public function renderAccumulator(Accumulator $accumulator): array
|
||||||
@@ -71,7 +71,7 @@ class Renderer
|
|||||||
|
|
||||||
$xmlProject->appendChild($this->renderMetricsProject($xmlDocument, $projectMetrics));
|
$xmlProject->appendChild($this->renderMetricsProject($xmlDocument, $projectMetrics));
|
||||||
|
|
||||||
return [$xmlDocument->saveXML(), $projectMetrics];
|
return [(string) $xmlDocument->saveXML(), $projectMetrics];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -56,6 +56,11 @@ final class CloverMergeCommand extends CliCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @param array<array-key, string> $files
|
||||||
|
* @param string $output
|
||||||
|
* @param string|null $workdir
|
||||||
|
* @param bool $stats
|
||||||
|
* @return int
|
||||||
* @throws ExecuteException
|
* @throws ExecuteException
|
||||||
*/
|
*/
|
||||||
public function execute(array $files, string $output, ?string $workdir, bool $stats): int
|
public function execute(array $files, string $output, ?string $workdir, bool $stats): int
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ use Dannecron\CoverageMerger\Clover\Parser;
|
|||||||
\test('examples without files', function (string $exampleFilename): void {
|
\test('examples without files', function (string $exampleFilename): void {
|
||||||
$handler = new Handler(new Parser());
|
$handler = new Handler(new Parser());
|
||||||
|
|
||||||
$cloverContents = \file_get_contents(\getExamplePath($exampleFilename));
|
$cloverContents = (string) \file_get_contents(\getExamplePath($exampleFilename));
|
||||||
|
/** @var \SimpleXMLElement $xml */
|
||||||
|
$xml = \simplexml_load_string($cloverContents);
|
||||||
|
|
||||||
$accumulator = $handler->handleSingleDocument(
|
$accumulator = $handler->handleSingleDocument($xml);
|
||||||
\simplexml_load_string($cloverContents),
|
|
||||||
);
|
|
||||||
|
|
||||||
$files = $accumulator->getFiles();
|
$files = $accumulator->getFiles();
|
||||||
\expect($files)->toHaveCount(0);
|
\expect($files)->toHaveCount(0);
|
||||||
@@ -34,11 +34,11 @@ use Dannecron\CoverageMerger\Clover\Parser;
|
|||||||
): void {
|
): void {
|
||||||
$handler = new Handler(new Parser());
|
$handler = new Handler(new Parser());
|
||||||
|
|
||||||
$cloverContents = \file_get_contents(\getExamplePath($exampleFilename));
|
$cloverContents = (string) \file_get_contents(\getExamplePath($exampleFilename));
|
||||||
|
/** @var \SimpleXMLElement $xml */
|
||||||
|
$xml = \simplexml_load_string($cloverContents);
|
||||||
|
|
||||||
$accumulator = $handler->handleSingleDocument(
|
$accumulator = $handler->handleSingleDocument($xml);
|
||||||
\simplexml_load_string($cloverContents),
|
|
||||||
);
|
|
||||||
|
|
||||||
$files = $accumulator->getFiles();
|
$files = $accumulator->getFiles();
|
||||||
\expect($files)->toHaveCount(1)->toHaveKey($expectedFilename);
|
\expect($files)->toHaveCount(1)->toHaveKey($expectedFilename);
|
||||||
@@ -62,11 +62,11 @@ use Dannecron\CoverageMerger\Clover\Parser;
|
|||||||
): void {
|
): void {
|
||||||
$handler = new Handler(new Parser());
|
$handler = new Handler(new Parser());
|
||||||
|
|
||||||
$cloverContents = \file_get_contents(\getExamplePath($exampleFilename));
|
$cloverContents = (string) \file_get_contents(\getExamplePath($exampleFilename));
|
||||||
|
/** @var \SimpleXMLElement $xml */
|
||||||
|
$xml = \simplexml_load_string($cloverContents);
|
||||||
|
|
||||||
$accumulator = $handler->handleSingleDocument(
|
$accumulator = $handler->handleSingleDocument($xml);
|
||||||
\simplexml_load_string($cloverContents),
|
|
||||||
);
|
|
||||||
|
|
||||||
$files = $accumulator->getFiles();
|
$files = $accumulator->getFiles();
|
||||||
\expect($files)->toHaveCount(2)
|
\expect($files)->toHaveCount(2)
|
||||||
@@ -81,12 +81,12 @@ use Dannecron\CoverageMerger\Clover\Parser;
|
|||||||
\test('examples with invalid structure', function (string $exampleFilename): void {
|
\test('examples with invalid structure', function (string $exampleFilename): void {
|
||||||
$handler = new Handler(new Parser());
|
$handler = new Handler(new Parser());
|
||||||
|
|
||||||
$cloverContents = \file_get_contents(\getExamplePath($exampleFilename));
|
$cloverContents = (string) \file_get_contents(\getExamplePath($exampleFilename));
|
||||||
|
/** @var \SimpleXMLElement $xml */
|
||||||
|
$xml = \simplexml_load_string($cloverContents);
|
||||||
|
|
||||||
$this->expectException(HandleException::class);
|
$this->expectException(HandleException::class);
|
||||||
$handler->handleSingleDocument(
|
$handler->handleSingleDocument($xml);
|
||||||
\simplexml_load_string($cloverContents),
|
|
||||||
);
|
|
||||||
})
|
})
|
||||||
->with([
|
->with([
|
||||||
'file-with-bad-line.xml',
|
'file-with-bad-line.xml',
|
||||||
|
|||||||
@@ -9,18 +9,27 @@ use Dannecron\CoverageMerger\Clover\Handler;
|
|||||||
use Dannecron\CoverageMerger\Clover\Parser;
|
use Dannecron\CoverageMerger\Clover\Parser;
|
||||||
|
|
||||||
\test('merge multiple valid files', function (): void {
|
\test('merge multiple valid files', function (): void {
|
||||||
$fileWithPackage = \file_get_contents(\getExamplePath('file-with-package.xml'));
|
$fileWithPackage = (string) \file_get_contents(\getExamplePath('file-with-package.xml'));
|
||||||
$fileWithoutPackage = \file_get_contents(\getExamplePath('file-without-package.xml'));
|
$fileWithoutPackage = (string) \file_get_contents(\getExamplePath('file-without-package.xml'));
|
||||||
$fileWithDifferences = \file_get_contents(\getExamplePath('file-with-differences.xml'));
|
$fileWithDifferences = (string) \file_get_contents(\getExamplePath('file-with-differences.xml'));
|
||||||
$metricsAndClasses = \file_get_contents(\getExamplePath('metrics-and-classes.xml'));
|
$metricsAndClasses = (string) \file_get_contents(\getExamplePath('metrics-and-classes.xml'));
|
||||||
|
|
||||||
$handler = new Handler(new Parser());
|
$handler = new Handler(new Parser());
|
||||||
|
|
||||||
|
/** @var \SimpleXMLElement $xmlFileWithPackage */
|
||||||
|
$xmlFileWithPackage = \simplexml_load_string($fileWithPackage);
|
||||||
|
/** @var \SimpleXMLElement $xmlFileWithoutPackage */
|
||||||
|
$xmlFileWithoutPackage = \simplexml_load_string($fileWithoutPackage);
|
||||||
|
/** @var \SimpleXMLElement $xmlFileWithDifferences */
|
||||||
|
$xmlFileWithDifferences = \simplexml_load_string($fileWithDifferences);
|
||||||
|
/** @var \SimpleXMLElement $xmlMetricsAndClasses */
|
||||||
|
$xmlMetricsAndClasses = \simplexml_load_string($metricsAndClasses);
|
||||||
|
|
||||||
$accumulator = $handler->handle(
|
$accumulator = $handler->handle(
|
||||||
\simplexml_load_string($fileWithPackage),
|
$xmlFileWithPackage,
|
||||||
\simplexml_load_string($fileWithoutPackage),
|
$xmlFileWithoutPackage,
|
||||||
\simplexml_load_string($fileWithDifferences),
|
$xmlFileWithDifferences,
|
||||||
\simplexml_load_string($metricsAndClasses),
|
$xmlMetricsAndClasses,
|
||||||
);
|
);
|
||||||
|
|
||||||
$files = $accumulator->getFiles();
|
$files = $accumulator->getFiles();
|
||||||
|
|||||||
1
tests/data/examples/not-xml.json
Normal file
1
tests/data/examples/not-xml.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"foo": "bar"}
|
||||||
Reference in New Issue
Block a user