Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
os: ['ubuntu-latest']
include:
- php: '5.6'
allow_failure: true
- php: '7.0'
allow_failure: true

steps:
- name: Checkout code base
Expand Down Expand Up @@ -51,20 +46,18 @@ jobs:
runs-on: ${{ matrix.os }}

env:
phpunit-version: 8.5.15
phpunit-version: 8.5

strategy:
fail-fast: false
matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
os: ['ubuntu-latest']
include:
- php: '5.6'
phpunit-version: 5.7.27
- php: '7.0'
phpunit-version: 6.5.14
phpunit-version: 6.5
- php: '7.1'
phpunit-version: 7.5.20
phpunit-version: 7.5

steps:
- name: Checkout code base
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Icinga PHP Library - Standard Library

[![PHP Support](https://img.shields.io/badge/php-%3E%3D%205.6-777BB4?logo=PHP)](https://php.net/)
[![PHP Support](https://img.shields.io/badge/php-%3E%3D%207.0-777BB4?logo=PHP)](https://php.net/)
![Build Status](https://github.com/Icinga/ipl-stdlib/workflows/PHP%20Tests/badge.svg?branch=master)

This is the Stdlib prototype for the Icinga PHP library ([ipl](https://github.com/Icinga/ipl)).
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "library",
"license": "MIT",
"autoload": {
"files": ["src/functions_include.php", "src/polyfill-php71.php", "src/polyfill-php70.php"],
"files": ["src/functions_include.php", "src/polyfill-php71.php"],
"psr-4": {
"ipl\\Stdlib\\": "src"
}
Expand All @@ -15,7 +15,7 @@
}
},
"require": {
"php": ">=5.6.0",
"php": ">=7.0",
"ext-openssl": "*",
"evenement/evenement": "^2"
}
Expand Down
45 changes: 45 additions & 0 deletions src/BaseFilter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

namespace ipl\Stdlib;

use ipl\Stdlib\Filter\Rule;

trait BaseFilter
{
/** @var Rule Base filter */
private $baseFilter;

/**
* Get whether a base filter has been set
*
* @return bool
*/
public function hasBaseFilter(): bool
{
return $this->baseFilter !== null;
}

/**
* Get the base filter
*
* @return ?Rule
*/
public function getBaseFilter()
{
return $this->baseFilter;
}

/**
* Set the base filter
*
* @param Rule $baseFilter
*
* @return $this
*/
public function setBaseFilter(Rule $baseFilter = null): self
{
$this->baseFilter = $baseFilter;

return $this;
}
}
22 changes: 0 additions & 22 deletions src/polyfill-php70.php

This file was deleted.