Skip to content

Commit

Permalink
add a bit of readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielsvanpach committed Jan 12, 2024
1 parent 4f4bf96 commit 6a34389
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 58 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PHPStan

on: [push]

jobs:
phpstan:
name: phpstan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none

- name: Install composer dependencies
run: composer install -n --prefer-dist
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

- name: Run PHPStan
run: ./vendor/bin/phpstan --error-format=github
30 changes: 22 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
[![Tests](https://img.shields.io/github/actions/workflow/status/spatie/holidays/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/spatie/holidays/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/spatie/holidays.svg?style=flat-square)](https://packagist.org/packages/spatie/holidays)

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.
**THIS PACKAGE IS IN DEVELOPMENT, DON'T USE IT IN PRODUCTION (YET)**

This package helps to calculate public holidays for a given country.

At the moment only Belgium public holidays are supported. You can always send PR with your country. Don't forget to include tests.

```php
use Spatie\Holidays\Holiday;

$holidays = Holiday::all();
```

Or for a specific country and year.

```php
use Spatie\Holidays\Holiday;

$holidays = Holiday::new()
->forYear(2024)
->forCountry('BE')
->get();
```

## Support us

Expand All @@ -22,13 +43,6 @@ You can install the package via composer:
composer require spatie/holidays
```

## Usage

```php
$skeleton = new Spatie\Holidays();
echo $skeleton->echoPhrase('Hello, Spatie!');
```

## Testing

```bash
Expand Down

This file was deleted.

8 changes: 0 additions & 8 deletions tests/HolidaysTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
expect($holidays)->toMatchSnapshot();
});

it('can get all holidays of 2022', function () {
$holidays = Holidays::new()
->year(2022)
->get();

expect($holidays)->toMatchSnapshot();
});

it('can get all holidays of 2023', function () {
$holidays = Holidays::new()
->year(2023)
Expand Down

0 comments on commit 6a34389

Please sign in to comment.