Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
[PSR-2] fixers=braces,elseif,short_tag,php_closing_tag,trailing_space…
Browse files Browse the repository at this point in the history
…s,linefeed

Applied php-cs-fixer --fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed
  • Loading branch information
Maks3w committed Jul 12, 2012
1 parent bb79cae commit 587b0dd
Show file tree
Hide file tree
Showing 15 changed files with 78 additions and 78 deletions.
36 changes: 18 additions & 18 deletions src/ClassMapAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* Class-map autoloader
*
* Utilizes class-map files to lookup classfile locations.
*
*
* @catebory Zend
* @package Zend_Loader
*/
Expand All @@ -39,7 +39,7 @@ class ClassMapAutoloader implements SplAutoloader
* Constructor
*
* Create a new instance, and optionally configure the autoloader.
*
*
* @param null|array|\Traversable $options
*/
public function __construct($options = null)
Expand All @@ -53,8 +53,8 @@ public function __construct($options = null)
* Configure the autoloader
*
* Proxies to {@link registerAutoloadMaps()}.
*
* @param array|Traversable $options
*
* @param array|Traversable $options
* @return ClassMapAutoloader
*/
public function setOptions($options)
Expand All @@ -69,10 +69,10 @@ public function setOptions($options)
* An autoload map may be either an associative array, or a file returning
* an associative array.
*
* An autoload map should be an associative array containing
* An autoload map should be an associative array containing
* classname/file pairs.
*
* @param string|array $map
*
* @param string|array $map
* @return ClassMapAutoloader
*/
public function registerAutoloadMap($map)
Expand Down Expand Up @@ -103,8 +103,8 @@ public function registerAutoloadMap($map)

/**
* Register many autoload maps at once
*
* @param array $locations
*
* @param array $locations
* @return ClassMapAutoloader
*/
public function registerAutoloadMaps($locations)
Expand All @@ -121,7 +121,7 @@ public function registerAutoloadMaps($locations)

/**
* Retrieve current autoload map
*
*
* @return array
*/
public function getAutoloadMap()
Expand All @@ -131,8 +131,8 @@ public function getAutoloadMap()

/**
* Defined by Autoloadable
*
* @param string $class
*
* @param string $class
* @return void
*/
public function autoload($class)
Expand All @@ -144,7 +144,7 @@ public function autoload($class)

/**
* Register the autoloader with spl_autoload registry
*
*
* @return void
*/
public function register()
Expand All @@ -158,8 +158,8 @@ public function register()
* If the map has been previously loaded, returns the current instance;
* otherwise, returns whatever was returned by calling include() on the
* location.
*
* @param string $location
*
* @param string $location
* @return ClassMapAutoloader|mixed
* @throws Exception\InvalidArgumentException for nonexistent locations
*/
Expand Down Expand Up @@ -190,16 +190,16 @@ protected function loadMapFromFile($location)
/**
* Resolve the real_path() to a file within a phar.
*
* @see https://bugs.php.net/bug.php?id=52769
* @param string $path
* @see https://bugs.php.net/bug.php?id=52769
* @param string $path
* @return string
*/
public static function realPharPath($path)
{
if (strpos($path, 'phar:///') !== 0) {
return;
}

$parts = explode('/', str_replace(array('/','\\'), '/', substr($path, 8)));
$parts = array_values(array_filter($parts, function($p) { return ($p !== '' && $p !== '.'); }));

Expand Down
2 changes: 1 addition & 1 deletion src/Exception/BadMethodCallException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @package Zend_Loader
* @subpackage Exception
*/
class BadMethodCallException extends \BadMethodCallException implements
class BadMethodCallException extends \BadMethodCallException implements
ExceptionInterface
{
}
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @package Zend_Loader
* @subpackage Exception
*/
class InvalidArgumentException extends \InvalidArgumentException implements
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{}
2 changes: 1 addition & 1 deletion src/Exception/MissingResourceNamespaceException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
* @package Zend_Loader
* @subpackage Exception
*/
class MissingResourceNamespaceException extends \Exception implements
class MissingResourceNamespaceException extends \Exception implements
ExceptionInterface
{}
32 changes: 16 additions & 16 deletions src/PluginClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class PluginClassLoader implements PluginClassLocator

/**
* Constructor
*
*
* @param null|array|Traversable $map If provided, seeds the loader with a map
* @return void
*/
Expand All @@ -57,8 +57,8 @@ public function __construct($map = null)
* Add a static map of plugins
*
* A null value will clear the static map.
*
* @param null|array|Traversable $map
*
* @param null|array|Traversable $map
* @return void
*/
public static function addStaticMap($map)
Expand All @@ -78,9 +78,9 @@ public static function addStaticMap($map)

/**
* Register a class to a given short name
*
* @param string $shortName
* @param string $className
*
* @param string $shortName
* @param string $className
* @return PluginClassLoader
*/
public function registerPlugin($shortName, $className)
Expand All @@ -92,17 +92,17 @@ public function registerPlugin($shortName, $className)
/**
* Register many plugins at once
*
* If $map is a string, assumes that the map is the class name of a
* If $map is a string, assumes that the map is the class name of a
* Traversable object (likely a ShortNameLocator); it will then instantiate
* this class and use it to register plugins.
*
* If $map is an array or Traversable object, it will iterate it to
* If $map is an array or Traversable object, it will iterate it to
* register plugin names/classes.
*
* For all other arguments, or if the string $map is not a class or not a
* For all other arguments, or if the string $map is not a class or not a
* Traversable class, an exception will be raised.
*
* @param string|array|Traversable $map
*
* @param string|array|Traversable $map
* @return PluginClassLoader
* @throws Exception\InvalidArgumentException
*/
Expand Down Expand Up @@ -146,8 +146,8 @@ public function registerPlugins($map)

/**
* Unregister a short name lookup
*
* @param mixed $shortName
*
* @param mixed $shortName
* @return PluginClassLoader
*/
public function unregisterPlugin($shortName)
Expand All @@ -161,7 +161,7 @@ public function unregisterPlugin($shortName)

/**
* Get a list of all registered plugins
*
*
* @return array|Traversable
*/
public function getRegisteredPlugins()
Expand Down Expand Up @@ -209,9 +209,9 @@ public function load($name)
/**
* Defined by IteratorAggregate
*
* Returns an instance of ArrayIterator, containing a map of
* Returns an instance of ArrayIterator, containing a map of
* all plugins
*
*
* @return Iterator
*/
public function getIterator()
Expand Down
12 changes: 6 additions & 6 deletions src/PluginClassLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,24 @@ interface PluginClassLocator extends ShortNameLocator, \IteratorAggregate
{
/**
* Register a class to a given short name
*
* @param string $shortName
* @param string $className
*
* @param string $shortName
* @param string $className
* @return PluginClassLocator
*/
public function registerPlugin($shortName, $className);

/**
* Unregister a short name lookup
*
* @param mixed $shortName
*
* @param mixed $shortName
* @return void
*/
public function unregisterPlugin($shortName);

/**
* Get a list of all registered plugins
*
*
* @return array|Traversable
*/
public function getRegisteredPlugins();
Expand Down
36 changes: 18 additions & 18 deletions src/PrefixPathLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function __construct($options = null)
{
// Allow extending classes to pre-set the prefix paths
if (is_array($this->prefixPaths)) {
// If prefixPaths is an array, pass the array to addPrefixPaths()
// If prefixPaths is an array, pass the array to addPrefixPaths()
// after first setting the property to an ArrayStack
$prefixPaths = $this->prefixPaths;
$this->prefixPaths = new ArrayStack();
Expand All @@ -84,8 +84,8 @@ public function __construct($options = null)

/**
* Add global static paths to merge at instantiation
*
* @param null|array|Traversable $paths
*
* @param null|array|Traversable $paths
* @return void
*/
public static function addStaticPaths($paths)
Expand Down Expand Up @@ -117,7 +117,7 @@ public static function addStaticPaths($paths)
* Configure the prefix path plugin loader
*
* Proxies to {@link addPrefixPaths()}.
*
*
* @param array|\Traversable $options
* @return PrefixPathLoader
*/
Expand Down Expand Up @@ -161,20 +161,20 @@ public function addPrefixPath($prefix, $path, $namespaced = true)
/**
* Add many prefix paths at once
*
* Accepts an array or Traversable object of prefix (or namspace) / path
* Accepts an array or Traversable object of prefix (or namspace) / path
* pairs. The path may either be a string path, or an array or Traversable
* object with many paths to associate with this prefix. If adding many
* paths at once, please remember that the prefix/path pairs act as a LIFO
* object with many paths to associate with this prefix. If adding many
* paths at once, please remember that the prefix/path pairs act as a LIFO
* stack, as does the stack of paths associated with any given prefix.
*
* @param array|Traversable $prefixPaths
*
* @param array|Traversable $prefixPaths
* @return PrefixPathLoader
*/
public function addPrefixPaths($prefixPaths)
{
if (!is_array($prefixPaths) && !$prefixPaths instanceof \Traversable) {
throw new Exception\InvalidArgumentException(sprintf(
'Expected an array or Traversable object; received %s',
'Expected an array or Traversable object; received %s',
(is_object($prefixPaths) ? get_class($prefixPaths) : gettype($prefixPaths))
));
}
Expand Down Expand Up @@ -209,8 +209,8 @@ public function addPrefixPaths($prefixPaths)
* Get path stack
*
* @param string $prefix
* @return false|ArrayStack|SplStack False if prefix does not exist,
* SplStack otherwise; if no prefix provide, ArrayStack of prefix/SplStack
* @return false|ArrayStack|SplStack False if prefix does not exist,
* SplStack otherwise; if no prefix provide, ArrayStack of prefix/SplStack
* pairs
*/
public function getPaths($prefix = null)
Expand Down Expand Up @@ -399,7 +399,7 @@ public function load($name)
*
* Returns an array of plugin name/class name pairs, suitable for seeding
* a PluginClassLoader instance.
*
*
* @return array
*/
public function getPluginMap()
Expand All @@ -414,7 +414,7 @@ public function getPluginMap()
* a ClassMapAutoloader instance. Note: filenames will be absolute paths
* based on the operating system on which the class map is retrieved. You
* may need to alter the paths to be relative to any filesystem.
*
*
* @return array
*/
public function getClassMap()
Expand All @@ -437,7 +437,7 @@ protected function formatName($name)
* Format prefix for internal use
*
* @param string $prefix
* @param bool $namespaced Whether the paths are namespaced or prefixed;
* @param bool $namespaced Whether the paths are namespaced or prefixed;
* namespaced by default
* @return string
*/
Expand Down Expand Up @@ -470,10 +470,10 @@ protected function formatPrefix($prefix, $namespaced = true)
/**
* Format a path for comparisons
*
* Strips trailing directory separator(s), if any, and then appends
* Strips trailing directory separator(s), if any, and then appends
* system directory separator.
*
* @param string $path
*
* @param string $path
* @return string
*/
protected function formatPath($path)
Expand Down
Loading

0 comments on commit 587b0dd

Please sign in to comment.