Benign php 45,902 installs Download

codebtech/coveragebadge v0.3.7

“Creates code coverage badge from Clover XML files.”

Basename is uppercase README.mdCalls PHP file_put_contents()

Evidence

PHP script path suffix Dockerfile · lines 1–28
1# Use the official PHP 8.2 image from Docker Hub
2FROM php:8.3-cli
3
4# Install Xdebug extension
5RUN pecl install xdebug && docker-php-ext-enable xdebug
6
7# Configure Xdebug
8RUN echo "xdebug.mode=debug,coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
9 echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini && \
10 echo "xdebug.client_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
11
12# Expose port 9000 for xdebug
13EXPOSE 9000
14
15# Install git, unzip (required by Composer) and Composer itself
16RUN apt-get update \
17 && apt-get install -y \
18 git \
19 unzip \
20 && php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
21 && php composer-setup.php --install-dir=/usr/bin --filename=composer \
22 && php -r "unlink('composer-setup.php');"
⋯6 lines
At least four Markdown-style heading lines README.md · lines 1–29
1# CoverageBadge
2
3[![PHP lint & test](https://github.com/codebtech/coveragebadge/actions/workflows/php.yml/badge.svg)](https://github.com/codebtech/coveragebadge/actions/workflows/php.yml) ![](./badges/php.svg)
4
5
6CoverageBadge is a PHP library for creating SVG coverage badges from Clover XML files.
7
8## Installation
9
10`composer require codebtech/coveragebadge --dev`
11
12## Features
13- Produces a code coverage badge utilizing a Clover coverage XML file
14- Creates a code coverage badge from several Clover XML files, automatically incorporating the coverage percentages
15- Accepts a coverage name as an input to include in the generated badge
16
17## Usage
18- Execute the command to generate badge for single Clover XML input
19```
20vendor/bin/coverage-badge /path/to/clover.xml /path/to/badge/destination.svg test-name
21```
22- To blend multiple Clover files, enumerate the XML inputs separated by commas and use the command
23```
24vendor/bin/coverage-badge /path/to/clover.xml,/path/to/clover2.xml /path/to/badge/destination.svg test-name
25```
26
27## Acknowledgements
28
29This library is inspired by [JASchilz/PHPCoverageBadge](https://github.com/JASchilz/PHPCoverageBadge)
SVG markup or image data URI output.svg · lines 1–21
1<?xml version="1.0" encoding="UTF-8"?>
2<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20">
3 <linearGradient id="b" x2="0" y2="100%">
4 <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
⋯17 lines
SVG markup or image data URI php.svg · lines 1–21
1<?xml version="1.0" encoding="UTF-8"?>
2<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20">
3 <linearGradient id="b" x2="0" y2="100%">
4 <stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
⋯17 lines
PHP script path suffix coverage-badge · lines 1–3
1#!/usr/bin/env php
2<?php
3include(__DIR__ . '/../coverage-badge.php');

Showing the top 5 files — 3 more files (15 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.