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

conedevelopment / root / 15084089635

17 May 2025 10:00AM UTC coverage: 77.93% (+0.04%) from 77.891%
15084089635

push

github

web-flow
Modernize back-end.yml (#240)

3291 of 4223 relevant lines covered (77.93%)

36.04 hits per line

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

63.64
/src/Traits/ResolvesWidgets.php
1
<?php
2

3
namespace Cone\Root\Traits;
4

5
use Cone\Root\Widgets\Widget;
6
use Cone\Root\Widgets\Widgets;
7
use Illuminate\Http\Request;
8

9
trait ResolvesWidgets
10
{
11
    /**
12
     * The widgets collection.
13
     */
14
    protected ?Widgets $widgets = null;
15

16
    /**
17
     * Define the widgets.
18
     */
19
    public function widgets(Request $request): array
×
20
    {
21
        return [];
×
22
    }
23

24
    /**
25
     * Resolve the widgets collection.
26
     */
27
    public function resolveWidgets(Request $request): Widgets
198✔
28
    {
29
        if (is_null($this->widgets)) {
198✔
30
            $this->widgets = new Widgets($this->widgets($request));
198✔
31

32
            $this->widgets->each(function (Widget $widget) use ($request): void {
198✔
33
                $this->resolveWidget($request, $widget);
198✔
34
            });
198✔
35
        }
36

37
        return $this->widgets;
198✔
38
    }
39

40
    /**
41
     * Handle the callback for the widget resolution.
42
     */
43
    protected function resolveWidget(Request $request, Widget $widget): void
×
44
    {
45
        //
46
    }
×
47
}
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