Page MenuHomeDevCentral

Honour Application abstract contract in ReportServiceProvider
ClosedPublic

Authored by dereckson on Dec 28 2016, 03:45.
Tags
None
Referenced Files
F3113496: D771.id.diff
Mon, Jun 17, 03:01
F3111089: D771.id1952.diff
Sun, Jun 16, 18:54
Unknown Object (File)
Sun, Jun 16, 11:30
Unknown Object (File)
Sat, Jun 15, 11:53
Unknown Object (File)
Sat, Jun 15, 11:48
Unknown Object (File)
Fri, Jun 14, 07:32
Unknown Object (File)
Tue, Jun 11, 03:07
Unknown Object (File)
Mon, Jun 10, 05:39
Subscribers

Details

Summary

Laravel Container and so Application classes offer to access services:

  • using the make method in the abstract contract
  • through ArrayAccess in the concrete implementation

We used array access, but documented ReportServiceProvider::register
is happy to accept any \Illuminate\Contracts\Foundation\Application.

To honour this claim, we so switch to use the make method.

This is a follow-up to 6ed92b9a75b8.

This fixes the following phan issue:

app/Providers/ReportServiceProvider.php:21
PhanTypeArraySuspicious
Suspicious array access to \Illuminate\Contracts\Foundation\Application
Test Plan

Run tests

Diff Detail

Repository
rNOTIF Notifications center
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson edited edge metadata.
This revision is now accepted and ready to land.Dec 28 2016, 11:26
This revision was automatically updated to reflect the committed changes.