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

ICanBoogie / ActiveRecord / 6362433236

30 Sep 2023 11:14AM UTC coverage: 85.731% (+5.6%) from 80.178%
6362433236

push

github

olvlvl
Rename StaticModelProvider methods

1436 of 1675 relevant lines covered (85.73%)

29.41 hits per line

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

0.0
/lib/ActiveRecord/ScopeNotDefined.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
/**
18
 * Exception thrown in attempt to obtain a scope that is not defined.
19
 */
20
class ScopeNotDefined extends LogicException implements Exception
21
{
22
    public function __construct(
23
        public readonly string $scope_name,
24
        public readonly Model $model,
25
        Throwable $previous = null
26
    ) {
27
        parent::__construct($this->format_message($scope_name, $model), 0, $previous);
×
28
    }
29

30
    private function format_message(string $scope_name, Model $model): string
31
    {
32
        return "Unknown scope `$scope_name` for model `$model->unprefixed_name`.";
×
33
    }
34
}
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

© 2026 Coveralls, Inc