Skip to content

Commit

Permalink
Update boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl committed Nov 16, 2024
1 parent 9bfc719 commit 677773d
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 56 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:
jobs:
phpstan:
name: phpstan
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
ini-values: memory_limit=-1
tools: composer:v2
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.composer/cache
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dependencies:
- lowest
- highest
php-version:
- "8.1"
- "8.2"
Expand All @@ -37,7 +34,7 @@ jobs:
restore-keys: "php-${{ matrix.php-version }}"

- name: Install dependencies
run: composer install --no-interaction --no-progress
run: composer update --no-interaction --no-progress

- name: Run PHPUnit
run: make test-coveralls
Expand Down
13 changes: 0 additions & 13 deletions .scrutinizer.yml

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The icanboogie/prototype package is free software.
It is released under the terms of the following BSD License.

Copyright (c) 2007-2023 by Olivier Laviale
Copyright (c) 2007 by Olivier Laviale
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
30 changes: 7 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Prototype

[![Release](https://img.shields.io/packagist/v/ICanBoogie/Prototype.svg)](https://packagist.org/packages/icanboogie/prototype)
[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/Prototype.svg)](https://scrutinizer-ci.com/g/ICanBoogie/Prototype)
[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/Prototype.svg)](https://coveralls.io/r/ICanBoogie/Prototype)
[![Code Coverage](https://coveralls.io/repos/github/ICanBoogie/Prototype/badge.svg?branch=6.0)](https://coveralls.io/r/ICanBoogie/Prototype?branch=6.0)
[![Downloads](https://img.shields.io/packagist/dt/icanboogie/prototype.svg)](https://packagist.org/packages/icanboogie/prototype)

The **icanboogie/prototype** package allows methods of classes using the [PrototypeTrait][] to be
Expand All @@ -12,15 +11,7 @@ getters and setters.

#### Installation

```bash
composer require icanboogie/prototype
```



#### Installation

```bash
```shell
composer require icanboogie/prototype
```

Expand Down Expand Up @@ -374,29 +365,22 @@ The following exceptions are defined:

The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie/Prototype/actions).

[![Tests](https://github.com/ICanBoogie/Prototype/workflows/test/badge.svg)](https://github.com/ICanBoogie/Prototype/actions?query=workflow%3Atest)
[![Static Analysis](https://github.com/ICanBoogie/Prototype/workflows/static-analysis/badge.svg)](https://github.com/ICanBoogie/Prototype/actions?query=workflow%3Astatic-analysis)
[![Code Style](https://github.com/ICanBoogie/Prototype/workflows/code-style/badge.svg)](https://github.com/ICanBoogie/Prototype/actions?query=workflow%3Acode-style)
[![Tests](https://github.com/ICanBoogie/Prototype/actions/workflows/test.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie/Prototype/actions/workflows/test.yml)
[![Static Analysis](https://github.com/ICanBoogie/Prototype/actions/workflows/static-analysis.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie/Prototype/actions/workflows/static-analysis.yml)
[![Code Style](https://github.com/ICanBoogie/Prototype/actions/workflows/code-style.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie/Prototype/actions/workflows/code-style.yml)

## Code of Conduct

This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in
this project and its community, you are expected to uphold this code.

## Code of Conduct

This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in
this project and its community, you are expected to uphold this code.
this project and its community, you're expected to uphold this code.



## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## License

**icanboogie/prototype** is released under the [BSD-3-Clause](LICENSE).
See [CONTRIBUTING](CONTRIBUTING.md) for details.



Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"icanboogie/accessor": "^6.0"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.0"
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^10.5"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 6 additions & 3 deletions lib/Prototype.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ private function revoke_consolidated_methods(): void
*
* @param callable $value
*/
#[ReturnTypeWillChange]public function offsetSet(mixed $offset, mixed $value): void
#[ReturnTypeWillChange]
public function offsetSet(mixed $offset, mixed $value): void
{
self::$prototypes[$this->class]->methods[$offset] = $value;

Expand All @@ -242,7 +243,8 @@ private function revoke_consolidated_methods(): void
*
* @param string $offset The name of the method.
*/
#[ReturnTypeWillChange]public function offsetUnset(mixed $offset): void
#[ReturnTypeWillChange]
public function offsetUnset(mixed $offset): void
{
unset(self::$prototypes[$this->class]->methods[$offset]);

Expand All @@ -254,7 +256,8 @@ private function revoke_consolidated_methods(): void
*
* @param string $offset The name of the method.
*/
#[ReturnTypeWillChange]public function offsetExists(mixed $offset): bool
#[ReturnTypeWillChange]
public function offsetExists(mixed $offset): bool
{
$methods = $this->consolidated_methods ??= $this->consolidate_methods();

Expand Down
5 changes: 1 addition & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ parameters:
paths:
- lib
excludePaths:
- tests/sandbox/*
ignoreErrors:
- '#get_.*is unused#'
- '#Method ICanBoogie\\Prototyped::__call#'
- tests/sandbox/*
1 change: 0 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
displayDetailsOnTestsThatTriggerDeprecations="true"
executionOrder="depends,defects"
>
<coverage/>
<testsuites>
<testsuite name="icanboogie/prototype">
<directory>tests</directory>
Expand Down
2 changes: 0 additions & 2 deletions tests/PrototypedCases/SampleD.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

namespace Test\ICanBoogie\PrototypedCases;

use AllowDynamicProperties;
use ICanBoogie\Prototyped;

#[AllowDynamicProperties]
class SampleD extends Prototyped
{
public $a;
Expand Down

0 comments on commit 677773d

Please sign in to comment.