Skip to content
This repository has been archived by the owner on Jul 8, 2023. It is now read-only.

Commit

Permalink
Code style fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzatron committed Sep 3, 2013
1 parent f6d0547 commit 4cfaf1f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 29 deletions.
15 changes: 7 additions & 8 deletions src/Eloquent/Pops/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
namespace Eloquent\Pops;

use Eloquent\Pops\Safe\SafeInterface;
use LogicException;
use ReflectionClass;

/**
Expand All @@ -23,7 +22,7 @@ class Proxy
/**
* Wrap the supplied value in a proxy.
*
* @param mixed $value The value to wrap.
* @param mixed $value The value to wrap.
* @param boolean|null $recursive True if the value should be recursively proxied.
*
* @return ProxyInterface The proxied value.
Expand All @@ -46,7 +45,7 @@ public static function proxy($value, $recursive = null)
/**
* Wrap the supplied array in a proxy.
*
* @param array $array The array to wrap.
* @param array $array The array to wrap.
* @param boolean|null $recursive True if the array should be recursively proxied.
*
* @return ProxyArray The proxied array.
Expand All @@ -61,7 +60,7 @@ public static function proxyArray($array, $recursive = null)
/**
* Wrap the supplied class in a non-static proxy.
*
* @param string $class The name of the class to wrap.
* @param string $class The name of the class to wrap.
* @param boolean|null $recursive True if the class should be recursively proxied.
*
* @return ProxyClass The non-static class proxy.
Expand All @@ -76,9 +75,9 @@ public static function proxyClass($class, $recursive = null)
/**
* Wrap the supplied class in a static proxy.
*
* @param string $class The name of the class to wrap.
* @param boolean|null $recursive True if the class should be recursively proxied.
* @param string $proxyClass
* @param string $class The name of the class to wrap.
* @param boolean|null $recursive True if the class should be recursively proxied.
* @param string $proxyClass
*
* @return string The static class proxy.
*/
Expand All @@ -95,7 +94,7 @@ public static function proxyClassStatic(
/**
* Wrap the supplied object in a proxy.
*
* @param object $object The object to wrap.
* @param object $object The object to wrap.
* @param boolean|null $recursive True if the object should be recursively proxied.
*
* @return ProxyObject The proxied object.
Expand Down
6 changes: 2 additions & 4 deletions src/Eloquent/Pops/ProxyArray.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
use ArrayAccess;
use ArrayIterator;
use Countable;
use InvalidArgumentException;
use Iterator;
use LogicException;

/**
* A transparent array proxy.
Expand All @@ -26,7 +24,7 @@ class ProxyArray implements ProxyInterface, ArrayAccess, Countable, Iterator
/**
* Construct a new array proxy.
*
* @param array $array The array to wrap.
* @param array $array The array to wrap.
* @param boolean|null $recursive True if the array should be recursively proxied.
*/
public function __construct(array $array, $recursive = null)
Expand Down Expand Up @@ -54,7 +52,7 @@ public function popsArray()
* Set the value of an array index.
*
* @param integer|string $index The index to set.
* @param mixed $value The new value.
* @param mixed $value The new value.
*/
public function offsetSet($index, $value)
{
Expand Down
23 changes: 11 additions & 12 deletions src/Eloquent/Pops/ProxyClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Eloquent\Pops;

use InvalidArgumentException;
use LogicException;

/**
Expand Down Expand Up @@ -67,7 +66,7 @@ public static function popsProxy()
/**
* Generate and load a static class proxy.
*
* @param string $class The name of the class to proxy.
* @param string $class The name of the class to proxy.
* @param boolean|null $recursive True if the proxy should be recursive.
* @param string|null $proxyClass The class name to use for the proxy class.
*
Expand Down Expand Up @@ -95,7 +94,7 @@ public static function popsGenerateStaticClassProxy(
/**
* Construct a new non-static class proxy.
*
* @param string $class The name of the class to proxy.
* @param string $class The name of the class to proxy.
* @param boolean|null $recursive True if the proxy should be recursive.
*/
public function __construct($class, $recursive = null)
Expand Down Expand Up @@ -138,7 +137,7 @@ public function popsCall($method, array &$arguments)
/**
* Call a static method on the proxied class.
*
* @param string $method The name of the method to call.
* @param string $method The name of the method to call.
* @param array $arguments The arguments.
*
* @return mixed The result of the method call.
Expand All @@ -152,7 +151,7 @@ public function __call($method, array $arguments)
* Set the value of a static property on the proxied class.
*
* @param string $property The name of the property to set.
* @param mixed $value The new value.
* @param mixed $value The new value.
*/
public function __set($property, $value)
{
Expand Down Expand Up @@ -216,7 +215,7 @@ protected static function popsProxyClass()
/**
* Wrap a sub-value in a proxy if recursive proxying is enabled.
*
* @param mixed $value The value to wrap.
* @param mixed $value The value to wrap.
* @param boolean $recursive True if recursive proxying is enabled.
*
* @return mixed The proxied value, or the untouched value.
Expand All @@ -235,9 +234,9 @@ protected static function popsProxySubValue($value, $recursive)
/**
* Generate a static class proxy definition.
*
* @param string $class The name of the class to proxy.
* @param boolean $recursive True if the proxy should be recursive.
* @param string|null &$proxyClass The class name to use for the proxy class.
* @param string $class The name of the class to proxy.
* @param boolean $recursive True if the proxy should be recursive.
* @param string|null &$proxyClass The class name to use for the proxy class.
*
* @return string The proxy class definition.
*/
Expand All @@ -264,8 +263,8 @@ protected static function popsStaticClassProxyDefinition(
/**
* Generate a static class proxy class name, or return the supplied name.
*
* @param string $originalClass The name of the class being proxied.
* @param string|null $proxyClass The class name to use for the proxy class.
* @param string $originalClass The name of the class being proxied.
* @param string|null $proxyClass The class name to use for the proxy class.
*
* @return string The proxy class name.
*/
Expand Down Expand Up @@ -323,7 +322,7 @@ protected static function popsStaticClassProxyDefinitionHeader($proxyClass)
* Generate the class body for a static class proxy class.
*
* @param string $originalClass The name of the class being proxied.
* @param boolean $recursive True if the proxy should be recursive.
* @param boolean $recursive True if the proxy should be recursive.
*
* @return string The static class proxy class body.
*/
Expand Down
8 changes: 4 additions & 4 deletions src/Eloquent/Pops/ProxyObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ProxyObject implements ProxyInterface, ArrayAccess, Countable, Iterator
/**
* Construct a new object proxy.
*
* @param object $object The object to wrap.
* @param object $object The object to wrap.
* @param boolean|null $recursive True if the object should be recursively proxied.
*/
public function __construct($object, $recursive = null)
Expand Down Expand Up @@ -65,7 +65,7 @@ public function popsObject()
* Call a method on the wrapped object with support for by-reference
* arguments.
*
* @param string $method The name of the method to call.
* @param string $method The name of the method to call.
* @param array &$arguments The arguments.
*
* @return mixed The result of the method call.
Expand Down Expand Up @@ -94,7 +94,7 @@ public function __call($method, array $arguments)
* Set the value of a property on the wrapped object.
*
* @param string $property The property name.
* @param mixed $value The new value.
* @param mixed $value The new value.
*/
public function __set($property, $value)
{
Expand Down Expand Up @@ -140,7 +140,7 @@ public function __unset($property)
/**
* Set a value on the wrapped object using the ArrayAccess interface.
*
* @param string $key The key to set.
* @param string $key The key to set.
* @param mixed $value The new value.
*/
public function offsetSet($key, $value)
Expand Down
1 change: 0 additions & 1 deletion test/suite/Eloquent/Pops/ProxyClassTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Eloquent\Pops;

use InvalidArgumentException;
use Eloquent\Pops\Test\Fixture\Object;
use Eloquent\Pops\Test\TestCase;

Expand Down

0 comments on commit 4cfaf1f

Please sign in to comment.