2017 © Pedro Peláez
 

library service-provider-utils

This package contains a set of tools to work with container-interop's service-providers.

image

thecodingmachine/service-provider-utils

This package contains a set of tools to work with container-interop's service-providers.

  • Tuesday, April 19, 2016
  • by mouf
  • Repository
  • 6 Watchers
  • 1 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Scrutinizer Code Quality Build Status Coverage Status, (*1)

Service-provider utils

This package contains a set of tools to work with container-interop's service-providers., (*2)

Installation

You can install this package through Composer:, (*3)

{
    "require": {
        "thecodingmachine/service-provider-utils": "~1.0"
    }
}

The packages adheres to the SemVer specification, and there will be full backward compatibility between minor versions., (*4)

Usage

This package contains a single utility method that analyses a factory (i.e. a callable) and returns if the second argument (the $previous argument) is used or not., (*5)

// $previous is not used in this callable
$callable = function(ContainerInterface $container, $previous) {
    return new MyService();
});

$factoryAnalyser = new FactoryAnalyzer();
$isPreviousUsed = $factoryAnalyser->isPreviousArgumentUsed($callable);
// $isPreviousUsed === false

Note: this function can sometimes return false positives, in particular if your body contains calls to func_get_args or refences by variable name ($$foo). It should however never return false negatives., (*6)

The Versions

19/04 2016

1.0.x-dev

1.0.9999999.9999999-dev

This package contains a set of tools to work with container-interop's service-providers.

  Sources   Download

MIT

The Requires

 

The Development Requires