HomeDevCentral

Honour Application abstract contract in ReportServiceProvider

Description

Honour Application abstract contract in ReportServiceProvider

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

Reviewers: dereckson

Reviewed By: dereckson

Subscribers: alken-orin

Differential Revision: https://devcentral.nasqueron.org/D771

Details

Provenance
derecksonAuthored on Dec 28 2016, 03:36
Reviewer
dereckson
Differential Revision
D771: Honour Application abstract contract in ReportServiceProvider
Parents
rNOTIF413c5b51a8cb: Improve documentation and code types coherence
Branches
Unknown
Tags
Unknown