• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ICanBoogie / ActiveRecord / 8587980914

07 Apr 2024 10:12AM UTC coverage: 85.614% (+1.7%) from 83.927%
8587980914

push

github

olvlvl
Tidy Query

13 of 22 new or added lines in 3 files covered. (59.09%)

116 existing lines in 8 files now uncovered.

1345 of 1571 relevant lines covered (85.61%)

24.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/lib/ActiveRecord/StatementInvocationFailed.php
1
<?php
2

3
/*
4
 * This file is part of the ICanBoogie package.
5
 *
6
 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
namespace ICanBoogie\ActiveRecord;
13

14
use LogicException;
15
use Throwable;
16

17
use function json_encode;
18

19
/**
20
 * Exception thrown when the execution of a statement fails.
21
 */
22
class StatementInvocationFailed extends LogicException implements Exception
23
{
24
    /**
25
     * @param mixed[] $args
26
     */
27
    public function __construct(
28
        public readonly Statement $statement,
29
        public readonly array $args,
30
        string $message = null,
31
        Throwable $previous = null
32
    ) {
UNCOV
33
        parent::__construct($message ?? $this->format_message($statement, $args), previous: $previous);
×
34
    }
35

36
    /**
37
     * Formats a message from a statement and its arguments.
38
     *
39
     * @param mixed[] $args
40
     */
41
    private function format_message(Statement $statement, array $args): string
42
    {
UNCOV
43
        return "Statement execution failed: {$statement->pdo_statement->queryString}, with: " . json_encode($args);
×
44
    }
45
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc