Skip to content

Commit

Permalink
Drop LoggerAttachment, use closures instead
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Jun 18, 2021
1 parent 172de7e commit e6c912c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 33 deletions.
14 changes: 9 additions & 5 deletions src/AttachableLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,33 @@
* GNU General Public License for more details.
*/

/**
* @phpstan-type LoggerAttachment \Closure(mixed $level, string $message) : void
*/
interface AttachableLogger extends \Logger{

/**
* @param LoggerAttachment $attachment
* @phpstan-param LoggerAttachment $attachment
*
* @return void
*/
public function addAttachment(\LoggerAttachment $attachment);
public function addAttachment(\Closure $attachment);

/**
* @param LoggerAttachment $attachment
* @phpstan-param LoggerAttachment $attachment
*
* @return void
*/
public function removeAttachment(\LoggerAttachment $attachment);
public function removeAttachment(\Closure $attachment);

/**
* @return void
*/
public function removeAttachments();

/**
* @return \LoggerAttachment[]
* @return \Closure[]
* @phpstan-return LoggerAttachment[]
*/
public function getAttachments();
}
28 changes: 0 additions & 28 deletions src/LoggerAttachment.php

This file was deleted.

0 comments on commit e6c912c

Please sign in to comment.