| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function writeEvent( LoggingEvent $event, Bucket ...$buckets ): void { |
||
| 19 | $metadata = $event->getMetaData(); |
||
| 20 | |||
| 21 | if ( !isset( $metadata['id'] ) ) { |
||
| 22 | throw new LoggingError( 'Database Bucket Logger expects an external ID to be present' ); |
||
| 23 | } |
||
| 24 | |||
| 25 | $bucketLog = new BucketLog( $metadata['id'], $event->getName() ); |
||
| 26 | $this->addBucketLogBuckets( $bucketLog, $buckets ); |
||
| 27 | |||
| 28 | $this->bucketLoggingRepository->storeBucketLog( $bucketLog ); |
||
| 29 | } |
||
| 40 |