Augmentation vers version 3.3.0

This commit is contained in:
Gauvain Boiché
2020-03-31 15:31:03 +02:00
parent d926806907
commit a1864c0414
2618 changed files with 406015 additions and 31377 deletions

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**
@@ -34,7 +36,7 @@ interface AccessInterceptorInterface extends ProxyInterface
* A prefix interceptor should have a signature like following:
*
* <code>
* $prefixInterceptor = function ($proxy, $instance, $method, $params, & $returnEarly) {};
* $interceptor = function ($proxy, $instance, string $method, array $params, & $returnEarly) {};
* </code>
*
* @param string $methodName name of the intercepted method
@@ -42,7 +44,7 @@ interface AccessInterceptorInterface extends ProxyInterface
*
* @return void
*/
public function setMethodPrefixInterceptor($methodName, \Closure $prefixInterceptor = null);
public function setMethodPrefixInterceptor(string $methodName, \Closure $prefixInterceptor = null);
/**
* Set or remove the suffix interceptor for a method
@@ -52,7 +54,7 @@ interface AccessInterceptorInterface extends ProxyInterface
* A prefix interceptor should have a signature like following:
*
* <code>
* $suffixInterceptor = function ($proxy, $instance, $method, $params, $returnValue, & $returnEarly) {};
* $interceptor = function ($proxy, $instance, string $method, array $params, $returnValue, & $returnEarly) {};
* </code>
*
* @param string $methodName name of the intercepted method
@@ -60,5 +62,5 @@ interface AccessInterceptorInterface extends ProxyInterface
*
* @return void
*/
public function setMethodSuffixInterceptor($methodName, \Closure $suffixInterceptor = null);
public function setMethodSuffixInterceptor(string $methodName, \Closure $suffixInterceptor = null);
}

View File

@@ -0,0 +1,31 @@
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**
* Aggregates AccessInterceptor and ValueHolderInterface, mostly for return type hinting
*
* @author Marco Pivetta <ocramius@gmail.com>
* @license MIT
*/
interface AccessInterceptorValueHolderInterface extends AccessInterceptorInterface, ValueHolderInterface
{
}

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy\Exception;
use RuntimeException;

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**
@@ -34,7 +36,7 @@ interface LazyLoadingInterface extends ProxyInterface
* An initializer should have a signature like following:
*
* <code>
* $initializer = function (& $wrappedObject, $proxy, $method, $parameters, & $initializer) {};
* $initializer = function (& $wrappedObject, $proxy, string $method, array $parameters, & $initializer) {};
* </code>
*
* @param \Closure|null $initializer
@@ -53,12 +55,12 @@ interface LazyLoadingInterface extends ProxyInterface
*
* @return bool true if the proxy could be initialized
*/
public function initializeProxy();
public function initializeProxy() : bool;
/**
* Retrieves current initialization status of the proxy
*
* @return bool
*/
public function isProxyInitialized();
public function isProxyInitialized() : bool;
}

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**

View File

@@ -16,6 +16,8 @@
* and is licensed under the MIT license.
*/
declare(strict_types=1);
namespace ProxyManager\Proxy;
/**