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

Commit 587b0dd

Browse files
committed
[PSR-2] fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed
Applied php-cs-fixer --fixers=braces,elseif,short_tag,php_closing_tag,trailing_spaces,linefeed
1 parent bb79cae commit 587b0dd

15 files changed

+78
-78
lines changed

src/ClassMapAutoloader.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Class-map autoloader
1818
*
1919
* Utilizes class-map files to lookup classfile locations.
20-
*
20+
*
2121
* @catebory Zend
2222
* @package Zend_Loader
2323
*/
@@ -39,7 +39,7 @@ class ClassMapAutoloader implements SplAutoloader
3939
* Constructor
4040
*
4141
* Create a new instance, and optionally configure the autoloader.
42-
*
42+
*
4343
* @param null|array|\Traversable $options
4444
*/
4545
public function __construct($options = null)
@@ -53,8 +53,8 @@ public function __construct($options = null)
5353
* Configure the autoloader
5454
*
5555
* Proxies to {@link registerAutoloadMaps()}.
56-
*
57-
* @param array|Traversable $options
56+
*
57+
* @param array|Traversable $options
5858
* @return ClassMapAutoloader
5959
*/
6060
public function setOptions($options)
@@ -69,10 +69,10 @@ public function setOptions($options)
6969
* An autoload map may be either an associative array, or a file returning
7070
* an associative array.
7171
*
72-
* An autoload map should be an associative array containing
72+
* An autoload map should be an associative array containing
7373
* classname/file pairs.
74-
*
75-
* @param string|array $map
74+
*
75+
* @param string|array $map
7676
* @return ClassMapAutoloader
7777
*/
7878
public function registerAutoloadMap($map)
@@ -103,8 +103,8 @@ public function registerAutoloadMap($map)
103103

104104
/**
105105
* Register many autoload maps at once
106-
*
107-
* @param array $locations
106+
*
107+
* @param array $locations
108108
* @return ClassMapAutoloader
109109
*/
110110
public function registerAutoloadMaps($locations)
@@ -121,7 +121,7 @@ public function registerAutoloadMaps($locations)
121121

122122
/**
123123
* Retrieve current autoload map
124-
*
124+
*
125125
* @return array
126126
*/
127127
public function getAutoloadMap()
@@ -131,8 +131,8 @@ public function getAutoloadMap()
131131

132132
/**
133133
* Defined by Autoloadable
134-
*
135-
* @param string $class
134+
*
135+
* @param string $class
136136
* @return void
137137
*/
138138
public function autoload($class)
@@ -144,7 +144,7 @@ public function autoload($class)
144144

145145
/**
146146
* Register the autoloader with spl_autoload registry
147-
*
147+
*
148148
* @return void
149149
*/
150150
public function register()
@@ -158,8 +158,8 @@ public function register()
158158
* If the map has been previously loaded, returns the current instance;
159159
* otherwise, returns whatever was returned by calling include() on the
160160
* location.
161-
*
162-
* @param string $location
161+
*
162+
* @param string $location
163163
* @return ClassMapAutoloader|mixed
164164
* @throws Exception\InvalidArgumentException for nonexistent locations
165165
*/
@@ -190,16 +190,16 @@ protected function loadMapFromFile($location)
190190
/**
191191
* Resolve the real_path() to a file within a phar.
192192
*
193-
* @see https://bugs.php.net/bug.php?id=52769
194-
* @param string $path
193+
* @see https://bugs.php.net/bug.php?id=52769
194+
* @param string $path
195195
* @return string
196196
*/
197197
public static function realPharPath($path)
198198
{
199199
if (strpos($path, 'phar:///') !== 0) {
200200
return;
201201
}
202-
202+
203203
$parts = explode('/', str_replace(array('/','\\'), '/', substr($path, 8)));
204204
$parts = array_values(array_filter($parts, function($p) { return ($p !== '' && $p !== '.'); }));
205205

src/Exception/BadMethodCallException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* @package Zend_Loader
1818
* @subpackage Exception
1919
*/
20-
class BadMethodCallException extends \BadMethodCallException implements
20+
class BadMethodCallException extends \BadMethodCallException implements
2121
ExceptionInterface
2222
{
2323
}

src/Exception/InvalidArgumentException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
* @package Zend_Loader
1818
* @subpackage Exception
1919
*/
20-
class InvalidArgumentException extends \InvalidArgumentException implements
20+
class InvalidArgumentException extends \InvalidArgumentException implements
2121
ExceptionInterface
2222
{}

src/Exception/MissingResourceNamespaceException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
* @package Zend_Loader
1818
* @subpackage Exception
1919
*/
20-
class MissingResourceNamespaceException extends \Exception implements
20+
class MissingResourceNamespaceException extends \Exception implements
2121
ExceptionInterface
2222
{}

src/PluginClassLoader.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class PluginClassLoader implements PluginClassLocator
3636

3737
/**
3838
* Constructor
39-
*
39+
*
4040
* @param null|array|Traversable $map If provided, seeds the loader with a map
4141
* @return void
4242
*/
@@ -57,8 +57,8 @@ public function __construct($map = null)
5757
* Add a static map of plugins
5858
*
5959
* A null value will clear the static map.
60-
*
61-
* @param null|array|Traversable $map
60+
*
61+
* @param null|array|Traversable $map
6262
* @return void
6363
*/
6464
public static function addStaticMap($map)
@@ -78,9 +78,9 @@ public static function addStaticMap($map)
7878

7979
/**
8080
* Register a class to a given short name
81-
*
82-
* @param string $shortName
83-
* @param string $className
81+
*
82+
* @param string $shortName
83+
* @param string $className
8484
* @return PluginClassLoader
8585
*/
8686
public function registerPlugin($shortName, $className)
@@ -92,17 +92,17 @@ public function registerPlugin($shortName, $className)
9292
/**
9393
* Register many plugins at once
9494
*
95-
* If $map is a string, assumes that the map is the class name of a
95+
* If $map is a string, assumes that the map is the class name of a
9696
* Traversable object (likely a ShortNameLocator); it will then instantiate
9797
* this class and use it to register plugins.
9898
*
99-
* If $map is an array or Traversable object, it will iterate it to
99+
* If $map is an array or Traversable object, it will iterate it to
100100
* register plugin names/classes.
101101
*
102-
* For all other arguments, or if the string $map is not a class or not a
102+
* For all other arguments, or if the string $map is not a class or not a
103103
* Traversable class, an exception will be raised.
104-
*
105-
* @param string|array|Traversable $map
104+
*
105+
* @param string|array|Traversable $map
106106
* @return PluginClassLoader
107107
* @throws Exception\InvalidArgumentException
108108
*/
@@ -146,8 +146,8 @@ public function registerPlugins($map)
146146

147147
/**
148148
* Unregister a short name lookup
149-
*
150-
* @param mixed $shortName
149+
*
150+
* @param mixed $shortName
151151
* @return PluginClassLoader
152152
*/
153153
public function unregisterPlugin($shortName)
@@ -161,7 +161,7 @@ public function unregisterPlugin($shortName)
161161

162162
/**
163163
* Get a list of all registered plugins
164-
*
164+
*
165165
* @return array|Traversable
166166
*/
167167
public function getRegisteredPlugins()
@@ -209,9 +209,9 @@ public function load($name)
209209
/**
210210
* Defined by IteratorAggregate
211211
*
212-
* Returns an instance of ArrayIterator, containing a map of
212+
* Returns an instance of ArrayIterator, containing a map of
213213
* all plugins
214-
*
214+
*
215215
* @return Iterator
216216
*/
217217
public function getIterator()

src/PluginClassLocator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@ interface PluginClassLocator extends ShortNameLocator, \IteratorAggregate
2020
{
2121
/**
2222
* Register a class to a given short name
23-
*
24-
* @param string $shortName
25-
* @param string $className
23+
*
24+
* @param string $shortName
25+
* @param string $className
2626
* @return PluginClassLocator
2727
*/
2828
public function registerPlugin($shortName, $className);
2929

3030
/**
3131
* Unregister a short name lookup
32-
*
33-
* @param mixed $shortName
32+
*
33+
* @param mixed $shortName
3434
* @return void
3535
*/
3636
public function unregisterPlugin($shortName);
3737

3838
/**
3939
* Get a list of all registered plugins
40-
*
40+
*
4141
* @return array|Traversable
4242
*/
4343
public function getRegisteredPlugins();

src/PrefixPathLoader.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct($options = null)
6262
{
6363
// Allow extending classes to pre-set the prefix paths
6464
if (is_array($this->prefixPaths)) {
65-
// If prefixPaths is an array, pass the array to addPrefixPaths()
65+
// If prefixPaths is an array, pass the array to addPrefixPaths()
6666
// after first setting the property to an ArrayStack
6767
$prefixPaths = $this->prefixPaths;
6868
$this->prefixPaths = new ArrayStack();
@@ -84,8 +84,8 @@ public function __construct($options = null)
8484

8585
/**
8686
* Add global static paths to merge at instantiation
87-
*
88-
* @param null|array|Traversable $paths
87+
*
88+
* @param null|array|Traversable $paths
8989
* @return void
9090
*/
9191
public static function addStaticPaths($paths)
@@ -117,7 +117,7 @@ public static function addStaticPaths($paths)
117117
* Configure the prefix path plugin loader
118118
*
119119
* Proxies to {@link addPrefixPaths()}.
120-
*
120+
*
121121
* @param array|\Traversable $options
122122
* @return PrefixPathLoader
123123
*/
@@ -161,20 +161,20 @@ public function addPrefixPath($prefix, $path, $namespaced = true)
161161
/**
162162
* Add many prefix paths at once
163163
*
164-
* Accepts an array or Traversable object of prefix (or namspace) / path
164+
* Accepts an array or Traversable object of prefix (or namspace) / path
165165
* pairs. The path may either be a string path, or an array or Traversable
166-
* object with many paths to associate with this prefix. If adding many
167-
* paths at once, please remember that the prefix/path pairs act as a LIFO
166+
* object with many paths to associate with this prefix. If adding many
167+
* paths at once, please remember that the prefix/path pairs act as a LIFO
168168
* stack, as does the stack of paths associated with any given prefix.
169-
*
170-
* @param array|Traversable $prefixPaths
169+
*
170+
* @param array|Traversable $prefixPaths
171171
* @return PrefixPathLoader
172172
*/
173173
public function addPrefixPaths($prefixPaths)
174174
{
175175
if (!is_array($prefixPaths) && !$prefixPaths instanceof \Traversable) {
176176
throw new Exception\InvalidArgumentException(sprintf(
177-
'Expected an array or Traversable object; received %s',
177+
'Expected an array or Traversable object; received %s',
178178
(is_object($prefixPaths) ? get_class($prefixPaths) : gettype($prefixPaths))
179179
));
180180
}
@@ -209,8 +209,8 @@ public function addPrefixPaths($prefixPaths)
209209
* Get path stack
210210
*
211211
* @param string $prefix
212-
* @return false|ArrayStack|SplStack False if prefix does not exist,
213-
* SplStack otherwise; if no prefix provide, ArrayStack of prefix/SplStack
212+
* @return false|ArrayStack|SplStack False if prefix does not exist,
213+
* SplStack otherwise; if no prefix provide, ArrayStack of prefix/SplStack
214214
* pairs
215215
*/
216216
public function getPaths($prefix = null)
@@ -399,7 +399,7 @@ public function load($name)
399399
*
400400
* Returns an array of plugin name/class name pairs, suitable for seeding
401401
* a PluginClassLoader instance.
402-
*
402+
*
403403
* @return array
404404
*/
405405
public function getPluginMap()
@@ -414,7 +414,7 @@ public function getPluginMap()
414414
* a ClassMapAutoloader instance. Note: filenames will be absolute paths
415415
* based on the operating system on which the class map is retrieved. You
416416
* may need to alter the paths to be relative to any filesystem.
417-
*
417+
*
418418
* @return array
419419
*/
420420
public function getClassMap()
@@ -437,7 +437,7 @@ protected function formatName($name)
437437
* Format prefix for internal use
438438
*
439439
* @param string $prefix
440-
* @param bool $namespaced Whether the paths are namespaced or prefixed;
440+
* @param bool $namespaced Whether the paths are namespaced or prefixed;
441441
* namespaced by default
442442
* @return string
443443
*/
@@ -470,10 +470,10 @@ protected function formatPrefix($prefix, $namespaced = true)
470470
/**
471471
* Format a path for comparisons
472472
*
473-
* Strips trailing directory separator(s), if any, and then appends
473+
* Strips trailing directory separator(s), if any, and then appends
474474
* system directory separator.
475-
*
476-
* @param string $path
475+
*
476+
* @param string $path
477477
* @return string
478478
*/
479479
protected function formatPath($path)

0 commit comments

Comments
 (0)