Skip to content

Commit

Permalink
Merge pull request #91 from alleyinteractive/psr-fix
Browse files Browse the repository at this point in the history
Add void return type to appease psr/log v3
  • Loading branch information
srtfisher authored Mar 20, 2023
2 parents 0ebc5ee + b23412c commit f990a51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
This library adheres to [Semantic Versioning](https://semver.org/) and [Keep a
CHANGELOG](https://keepachangelog.com/en/1.0.0/).

## 2.4.0
## 2.3.2

- Add return types to logger to appease `psr/log` v3.

## 2.3.1

- Renamed the main plugin file from `ai-logger.php` to `logger.php`.

Expand Down
18 changes: 9 additions & 9 deletions inc/class-ai-logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function to_term( string $key, int $term_id, $level = Logger::DEBUG ) {
*
* @return void
*/
public function emergency( $message, array $context = [] ) {
public function emergency( $message, array $context = [] ): void {
$this->logger->emergency( $message, $context );
}

Expand All @@ -252,7 +252,7 @@ public function emergency( $message, array $context = [] ) {
*
* @return void
*/
public function alert( $message, array $context = [] ) {
public function alert( $message, array $context = [] ): void {
$this->logger->alert( $message, $context );
}

Expand All @@ -266,7 +266,7 @@ public function alert( $message, array $context = [] ) {
*
* @return void
*/
public function critical( $message, array $context = [] ) {
public function critical( $message, array $context = [] ): void {
$this->logger->critical( $message, $context );
}

Expand All @@ -279,7 +279,7 @@ public function critical( $message, array $context = [] ) {
*
* @return void
*/
public function error( $message, array $context = [] ) {
public function error( $message, array $context = [] ): void {
$this->logger->error( $message, $context );
}

Expand All @@ -294,7 +294,7 @@ public function error( $message, array $context = [] ) {
*
* @return void
*/
public function warning( $message, array $context = [] ) {
public function warning( $message, array $context = [] ): void {
$this->logger->warning( $message, $context );
}

Expand All @@ -306,7 +306,7 @@ public function warning( $message, array $context = [] ) {
*
* @return void
*/
public function notice( $message, array $context = [] ) {
public function notice( $message, array $context = [] ): void {
$this->logger->notice( $message, $context );
}

Expand All @@ -319,7 +319,7 @@ public function notice( $message, array $context = [] ) {
* @param mixed[] $context Log context.
* @return void
*/
public function info( $message, array $context = [] ) {
public function info( $message, array $context = [] ): void {
$this->logger->info( $message, $context );
}

Expand All @@ -331,7 +331,7 @@ public function info( $message, array $context = [] ) {
*
* @return void
*/
public function debug( $message, array $context = [] ) {
public function debug( $message, array $context = [] ): void {
$this->logger->debug( $message, $context );
}

Expand All @@ -344,7 +344,7 @@ public function debug( $message, array $context = [] ) {
*
* @return void
*/
public function log( $level, $message, array $context = [] ) {
public function log( $level, $message, array $context = [] ): void {
$this->logger->log( $level, $message, $context );
}

Expand Down
2 changes: 1 addition & 1 deletion logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Alley Logger
* Plugin URI: https://github.com/alleyinteractive/logger
* Description: A Monolog-based logging tool for WordPress. Supports storing log message in a custom post type or in individual posts and terms.
* Version: 2.4.0
* Version: 2.3.2
* Author: Alley Interactive
* Author URI: https://alley.com/
* Requires at least: 5.9
Expand Down

0 comments on commit f990a51

Please sign in to comment.