Skip to content

Commit

Permalink
adjust class utils for php 7
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Dec 13, 2023
1 parent f05906a commit 0ea8922
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [2.233.0] - 2023-12-13
- Added: Utils/ClassUtil

## [2.232.0] - 2023-11-14
- Changed: backported Utils/DatabaseUtil from v3 to v2
- Deprecated: old DatabaseUtil class
Expand Down
5 changes: 4 additions & 1 deletion src/Util/ClassUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ class ClassUtil
{
/**
* Return true if the given class or a parent class implements the given trait
* @param object|string $class
* @param string $trait
* @return bool
*/
public function classImplementsTrait(object|string $class, string $trait): bool
public function classImplementsTrait($class, string $trait): bool
{
do {
if (in_array($trait, class_uses($class))) {
Expand Down

0 comments on commit 0ea8922

Please sign in to comment.