| Total Complexity | 7 |
| Total Lines | 56 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | class ContentProvider implements IContentProvider { |
||
| 22 | private $logger; |
||
| 23 | |||
| 24 | public function __construct( |
||
| 25 | private IURLGenerator $urlGenerator, |
||
| 26 | LoggerInterface $logger, |
||
| 27 | ) { |
||
| 28 | $this->logger = $logger; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function handle(Event $event): void { |
||
| 32 | if (!$event instanceof ContentProviderRegisterEvent) { |
||
| 33 | return; |
||
| 34 | } |
||
| 35 | $event->registerContentProvider('analytics', 'report', ContentProvider::class); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * The ID of the provider |
||
| 40 | * |
||
| 41 | * @return string |
||
| 42 | * @since 1.1.0 |
||
| 43 | */ |
||
| 44 | public function getId(): string { |
||
| 45 | return 'report'; |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * The ID of the app making the provider avaialble |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | * @since 1.1.0 |
||
| 53 | */ |
||
| 54 | public function getAppId(): string { |
||
| 55 | return 'analytics'; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * The absolute URL to the content item |
||
| 60 | * |
||
| 61 | * @param string $id |
||
| 62 | * @return string |
||
| 63 | * @since 1.1.0 |
||
| 64 | */ |
||
| 65 | public function getItemUrl(string $id): string { |
||
| 66 | return $this->urlGenerator->linkToRouteAbsolute('analytics.page.index') . '#/r/' . $id; |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Starts the initial import of content items into content chat |
||
| 71 | * |
||
| 72 | * @return void |
||
| 73 | * @since 1.1.0 |
||
| 74 | */ |
||
| 75 | public function triggerInitialImport(): void { |
||
| 77 | } |
||
| 78 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths