Page MenuHomeDevCentral

Honour Application abstract contract in ReportServiceProvider
ClosedPublic

Authored by dereckson on Dec 28 2016, 03:45.
Tags
None
Referenced Files
F52031251: D771.id1952.diff
Tue, Sep 29, 21:20
F52013156: D771.id1951.diff
Tue, Sep 29, 18:14
F52012882: D771.id1951.diff
Tue, Sep 29, 18:11
F52012502: D771.id1952.diff
Tue, Sep 29, 18:04
F52012494: D771.id.diff
Tue, Sep 29, 18:04
F52010759: D771.diff
Tue, Sep 29, 17:44
Unknown Object (File)
Sat, Sep 26, 23:39
Unknown Object (File)
Fri, Sep 25, 04:19
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 Passed
Unit
Tests Passed
Branch
suspicious-array-access (branched from master)

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.