aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-05 09:26:53 +0200
committerIvan Enderlin <ivan.enderlin@hoa-project.net>2015-05-05 09:26:53 +0200
commit41ff1d2b19d289286a6749688bdbd963dd6534e4 (patch)
treef9d0ebb36f1f9a8618964ad5650166ced30add8d
parentc330d48bcfb0d848497c3f5bad19f1cda20a5234 (diff)
downloadIterator-41ff1d2b19d289286a6749688bdbd963dd6534e4.zip
Iterator-41ff1d2b19d289286a6749688bdbd963dd6534e4.tar.gz
Iterator-41ff1d2b19d289286a6749688bdbd963dd6534e4.tar.bz2
Move to PSR-1 and PSR-2.
-rw-r--r--Aggregate.php10
-rw-r--r--Append.php10
-rw-r--r--CallbackFilter.php10
-rw-r--r--CallbackGenerator.php46
-rw-r--r--Counter.php60
-rw-r--r--Demultiplexer.php54
-rw-r--r--Directory.php42
-rw-r--r--Exception.php10
-rw-r--r--FileSystem.php32
-rw-r--r--Filter.php10
-rw-r--r--Glob.php10
-rw-r--r--Infinite.php10
-rw-r--r--Iterator.php10
-rw-r--r--IteratorIterator.php10
-rw-r--r--Limit.php10
-rw-r--r--Lookahead.php71
-rw-r--r--Lookbehind.php66
-rw-r--r--Map.php10
-rw-r--r--Mock.php10
-rw-r--r--Multiple.php37
-rw-r--r--NoRewind.php10
-rw-r--r--Outer.php10
-rw-r--r--README.md57
-rw-r--r--Recursive/CallbackFilter.php10
-rw-r--r--Recursive/Directory.php64
-rw-r--r--Recursive/Filter.php10
-rw-r--r--Recursive/Iterator.php10
-rw-r--r--Recursive/Map.php10
-rw-r--r--Recursive/Mock.php55
-rw-r--r--Recursive/Recursive.php10
-rw-r--r--Recursive/RegularExpression.php42
-rw-r--r--RegularExpression.php132
-rw-r--r--Repeater.php70
-rw-r--r--Seekable.php10
-rw-r--r--SplFileInfo.php55
-rw-r--r--Test/Unit/Append.php24
-rw-r--r--Test/Unit/CallbackFilter.php75
-rw-r--r--Test/Unit/CallbackGenerator.php21
-rw-r--r--Test/Unit/Counter.php31
-rw-r--r--Test/Unit/Demultiplexer.php26
-rw-r--r--Test/Unit/Directory.php56
-rw-r--r--Test/Unit/FileSystem.php32
-rw-r--r--Test/Unit/Filter.php43
-rw-r--r--Test/Unit/Infinite.php16
-rw-r--r--Test/Unit/IteratorIterator.php32
-rw-r--r--Test/Unit/Limit.php30
-rw-r--r--Test/Unit/Lookahead.php28
-rw-r--r--Test/Unit/Lookbehind.php28
-rw-r--r--Test/Unit/Map.php39
-rw-r--r--Test/Unit/Mock.php24
-rw-r--r--Test/Unit/Multiple.php24
-rw-r--r--Test/Unit/NoRewind.php16
-rw-r--r--Test/Unit/RegularExpression.php24
-rw-r--r--Test/Unit/Repeater.php23
-rw-r--r--Test/Unit/SplFileInfo.php32
55 files changed, 786 insertions, 921 deletions
diff --git a/Aggregate.php b/Aggregate.php
index 9f95230..6820ca7 100644
--- a/Aggregate.php
+++ b/Aggregate.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL IteratorAggregate interface.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-interface Aggregate extends \IteratorAggregate { }
+interface Aggregate extends \IteratorAggregate
+{
+}
diff --git a/Append.php b/Append.php
index d45c7e4..151151a 100644
--- a/Append.php
+++ b/Append.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL AppendIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Append extends \AppendIterator { }
+class Append extends \AppendIterator
+{
+}
diff --git a/CallbackFilter.php b/CallbackFilter.php
index 56b7bae..0d4e130 100644
--- a/CallbackFilter.php
+++ b/CallbackFilter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL CallbackFilterIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class CallbackFilter extends \CallbackFilterIterator { }
+class CallbackFilter extends \CallbackFilterIterator
+{
+}
diff --git a/CallbackGenerator.php b/CallbackGenerator.php
index 9a3a40f..13c9264 100644
--- a/CallbackGenerator.php
+++ b/CallbackGenerator.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,31 +41,29 @@ namespace Hoa\Iterator;
*
* Yield a value based on a callback.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class CallbackGenerator implements Iterator {
-
+class CallbackGenerator implements Iterator
+{
/**
* Callback.
*
- * @var \Hoa\Iterator\CallbackGenerator callable
+ * @var callable
*/
protected $_callback = null;
/**
* Current key.
*
- * @var \Hoa\Iterator\Demultiplexer mixed
+ * @var mixed
*/
protected $_key = 0;
/**
* Current computed value.
*
- * @var \Hoa\Iterator\Demultiplexer mixed
+ * @var mixed
*/
protected $_current = null;
@@ -74,12 +72,11 @@ class CallbackGenerator implements Iterator {
/**
* Constructor.
*
- * @access public
* @param callable $callback Callback.
* @return void
*/
- public function __construct ( Callable $callback ) {
-
+ public function __construct(callable $callback)
+ {
$this->_callback = $callback;
return;
@@ -88,11 +85,10 @@ class CallbackGenerator implements Iterator {
/**
* Return the current element.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
$handle = $this->_callback;
return $this->_current = $handle($this->_key);
@@ -101,22 +97,20 @@ class CallbackGenerator implements Iterator {
/**
* Return the key of the current element.
*
- * @access public
* @return mixed
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_key;
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
++$this->_key;
return;
@@ -125,11 +119,10 @@ class CallbackGenerator implements Iterator {
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
$this->_key = 0;
$this->_current = null;
@@ -139,11 +132,10 @@ class CallbackGenerator implements Iterator {
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
return true;
}
}
diff --git a/Counter.php b/Counter.php
index b6ce67a..b1e7973 100644
--- a/Counter.php
+++ b/Counter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,45 +41,43 @@ namespace Hoa\Iterator;
*
* A counter.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Counter implements Iterator {
-
+class Counter implements Iterator
+{
/**
* From (lower bound).
*
- * @var \Hoa\Iterator\Counter int
+ * @var int
*/
protected $_from = 0;
/**
* Current key.
*
- * @var \Hoa\Iterator\Counter int
+ * @var int
*/
protected $_key = 0;
/**
* Current index.
*
- * @var \Hoa\Iterator\Counter int
+ * @var int
*/
protected $_i = 0;
/**
* To (upper bound).
*
- * @var \Hoa\Iterator\Counter int
+ * @var int
*/
protected $_to = 0;
/**
* Step.
*
- * @var \Hoa\Iterator\Counter int
+ * @var int
*/
protected $_step = 0;
@@ -90,18 +88,21 @@ class Counter implements Iterator {
* Equivalent to:
* for($i = $from; $i < $to; $i += $step)
*
- * @access public
* @param int $from Start value.
* @param int $to Maximum value.
* @param int $step Step.
* @return void
- * @throw \Hoa\Iterator\Exception
+ * @throws \Hoa\Iterator\Exception
*/
- public function __construct ( $from, $to, $step ) {
-
- if($step <= 0)
+ public function __construct($from, $to, $step)
+ {
+ if ($step <= 0) {
throw new Exception(
- 'The step must be non-negative; given %d.', 0, $step);
+ 'The step must be non-negative; given %d.',
+ 0,
+ $step
+ );
+ }
$this->_from = $from;
$this->_to = $to;
@@ -113,33 +114,30 @@ class Counter implements Iterator {
/**
* Return the current element.
*
- * @access public
* @return int
*/
- public function current ( ) {
-
+ public function current()
+ {
return $this->_i;
}
/**
* Return the key of the current element.
*
- * @access public
* @return int
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_key;
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
++$this->_key;
$this->_i += $this->_step;
@@ -149,11 +147,10 @@ class Counter implements Iterator {
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
$this->_key = 0;
$this->_i = $this->_from;
@@ -163,11 +160,10 @@ class Counter implements Iterator {
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
return $this->_i < $this->_to;
}
}
diff --git a/Demultiplexer.php b/Demultiplexer.php
index 1296d20..066f847 100644
--- a/Demultiplexer.php
+++ b/Demultiplexer.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -42,31 +42,29 @@ namespace Hoa\Iterator;
* Demux result from another iterator.
* This iterator is somehow the opposite of the Hoa\Iterator\Multiple iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Demultiplexer implements Iterator {
-
+class Demultiplexer implements Iterator
+{
/**
* Current iterator.
*
- * @var \Traversable object
+ * @var \Traversable
*/
protected $_iterator = null;
/**
* Current computed value.
*
- * @var \Hoa\Iterator\Demultiplexer mixed
+ * @var mixed
*/
protected $_current = null;
/**
* Demuxer (callable to execute each time).
*
- * @var \Hoa\Iterator\Demultiplexer callable
+ * @var callable
*/
protected $_demuxer = null;
@@ -75,16 +73,16 @@ class Demultiplexer implements Iterator {
/**
* Constructor.
*
- * @access public
* @param \Traversable $iterator Iterator.
* @param callable $demuxer Demuxer.
* @return void
- * @throw \Hoa\Iterator\Exception
+ * @throws \Hoa\Iterator\Exception
*/
- public function __construct ( \Traversable $iterator, $demuxer ) {
-
- if($iterator instanceof \IteratorAggregate)
+ public function __construct(\Traversable $iterator, $demuxer)
+ {
+ if ($iterator instanceof \IteratorAggregate) {
$iterator = $iterator->getIterator();
+ }
$this->_iterator = $iterator;
$this->_demuxer = $demuxer;
@@ -95,13 +93,13 @@ class Demultiplexer implements Iterator {
/**
* Return the current element.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
- if(null !== $this->_current)
+ public function current()
+ {
+ if (null !== $this->_current) {
return $this->_current;
+ }
$demuxer = $this->_demuxer;
@@ -111,22 +109,20 @@ class Demultiplexer implements Iterator {
/**
* Return the key of the current element.
*
- * @access public
* @return mixed
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_iterator->key();
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
$this->_current = null;
return $this->_iterator->next();
@@ -135,22 +131,20 @@ class Demultiplexer implements Iterator {
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
return $this->_iterator->rewind();
}
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
return $this->_iterator->valid();
}
}
diff --git a/Directory.php b/Directory.php
index 226dc89..496c823 100644
--- a/Directory.php
+++ b/Directory.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,24 +41,22 @@ namespace Hoa\Iterator;
*
* Extending the SPL DirectoryIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Directory extends \DirectoryIterator {
-
+class Directory extends \DirectoryIterator
+{
/**
* SplFileInfo classname.
*
- * @var \Hoa\Iterator\Directory string
+ * @var string
*/
protected $_splFileInfoClass = null;
/**
* Relative path.
*
- * @var \Hoa\Iterator\Recursive\Directory string
+ * @var string
*/
protected $_relativePath = null;
@@ -69,12 +67,11 @@ class Directory extends \DirectoryIterator {
* Please, see \DirectoryIterator::__construct() method.
* We add the $splFileInfoClass parameter.
*
- * @access public
* @param string $path Path.
* @param string $splFileInfoClass SplFileInfo classname.
*/
- public function __construct ( $path, $splFileInfoClass = null ) {
-
+ public function __construct($path, $splFileInfoClass = null)
+ {
$this->_splFileInfoClass = $splFileInfoClass;
parent::__construct($path);
$this->setRelativePath($path);
@@ -86,21 +83,20 @@ class Directory extends \DirectoryIterator {
* Current.
* Please, see \DirectoryIterator::current() method.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
$out = parent::current();
- if( null !== $this->_splFileInfoClass
- && $out instanceof \SplFileInfo) {
-
+ if (null !== $this->_splFileInfoClass &&
+ $out instanceof \SplFileInfo) {
$out->setInfoClass($this->_splFileInfoClass);
$out = $out->getFileInfo();
- if($out instanceof \Hoa\Iterator\SplFileInfo)
+ if ($out instanceof \Hoa\Iterator\SplFileInfo) {
$out->setRelativePath($this->getRelativePath());
+ }
}
return $out;
@@ -109,12 +105,11 @@ class Directory extends \DirectoryIterator {
/**
* Set relative path.
*
- * @access protected
* @param string $relativePath Relative path.
* @return string
*/
- protected function setRelativePath ( $path ) {
-
+ protected function setRelativePath($path)
+ {
$old = $this->_relativePath;
$this->_relativePath = $path;
@@ -124,11 +119,10 @@ class Directory extends \DirectoryIterator {
/**
* Get relative path (if given).
*
- * @access public
* @return string
*/
- public function getRelativePath ( ) {
-
+ public function getRelativePath()
+ {
return $this->_relativePath;
}
}
diff --git a/Exception.php b/Exception.php
index 4ab0119..9cf956e 100644
--- a/Exception.php
+++ b/Exception.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,9 +43,9 @@ use Hoa\Core;
*
* Extending the \Hoa\Core\Exception class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Exception extends Core\Exception { }
+class Exception extends Core\Exception
+{
+}
diff --git a/FileSystem.php b/FileSystem.php
index b63ac45..2408741 100644
--- a/FileSystem.php
+++ b/FileSystem.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,17 +41,15 @@ namespace Hoa\Iterator;
*
* Extending the SPL FileSystemIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class FileSystem extends \FilesystemIterator {
-
+class FileSystem extends \FilesystemIterator
+{
/**
* SplFileInfo classname.
*
- * @var \Hoa\Iterator\FileSystem string
+ * @var string
*/
protected $_splFileInfoClass = null;
@@ -62,19 +60,19 @@ class FileSystem extends \FilesystemIterator {
* Please, see \FileSystemIterator::__construct() method.
* We add the $splFileInfoClass parameter.
*
- * @access public
* @param string $path Path.
* @param int $flags Flags.
* @param string $splFileInfoClass SplFileInfo classname.
*/
- public function __construct ( $path, $flags = null, $splFileInfoClass = null ) {
-
+ public function __construct($path, $flags = null, $splFileInfoClass = null)
+ {
$this->_splFileInfoClass = $splFileInfoClass;
- if(null === $flags)
+ if (null === $flags) {
parent::__construct($path);
- else
+ } else {
parent::__construct($path, $flags);
+ }
return;
}
@@ -83,16 +81,14 @@ class FileSystem extends \FilesystemIterator {
* Current.
* Please, see \FileSystemIterator::current() method.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
$out = parent::current();
- if( null !== $this->_splFileInfoClass
- && $out instanceof \SplFileInfo) {
-
+ if (null !== $this->_splFileInfoClass &&
+ $out instanceof \SplFileInfo) {
$out->setInfoClass($this->_splFileInfoClass);
$out = $out->getFileInfo();
}
diff --git a/Filter.php b/Filter.php
index 1df922f..187ae44 100644
--- a/Filter.php
+++ b/Filter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL FilterIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-abstract class Filter extends \FilterIterator { }
+abstract class Filter extends \FilterIterator
+{
+}
diff --git a/Glob.php b/Glob.php
index 00f7aa8..26b232e 100644
--- a/Glob.php
+++ b/Glob.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL GlobIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Glob extends \GlobIterator { }
+class Glob extends \GlobIterator
+{
+}
diff --git a/Infinite.php b/Infinite.php
index f8074ce..1b0fb24 100644
--- a/Infinite.php
+++ b/Infinite.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL InfiniteIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Infinite extends \InfiniteIterator { }
+class Infinite extends \InfiniteIterator
+{
+}
diff --git a/Iterator.php b/Iterator.php
index 8c48b7c..891341c 100644
--- a/Iterator.php
+++ b/Iterator.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,12 +43,12 @@ use Hoa\Core;
*
* Extending the SPL Iterator interface.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-interface Iterator extends \Iterator { }
+interface Iterator extends \Iterator
+{
+}
/**
* Flex entity.
diff --git a/IteratorIterator.php b/IteratorIterator.php
index 4b1290d..32ea1e7 100644
--- a/IteratorIterator.php
+++ b/IteratorIterator.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL IteratorIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class IteratorIterator extends \IteratorIterator { }
+class IteratorIterator extends \IteratorIterator
+{
+}
diff --git a/Limit.php b/Limit.php
index 2516f3c..0c339d7 100644
--- a/Limit.php
+++ b/Limit.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL LimitIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Limit extends \LimitIterator { }
+class Limit extends \LimitIterator
+{
+}
diff --git a/Lookahead.php b/Lookahead.php
index e776671..5ff5e1f 100644
--- a/Lookahead.php
+++ b/Lookahead.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,40 +41,38 @@ namespace Hoa\Iterator;
*
* Look ahead iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
class Lookahead
extends IteratorIterator
- implements Outer {
-
+ implements Outer
+{
/**
* Current iterator.
*
- * @var \Hoa\Iterator\Lookahead object
+ * @var \Hoa\Iterator\Lookahead
*/
protected $_iterator = null;
/**
* Current key.
*
- * @var \Hoa\Iterator\Lookahead mixed
+ * @var mixed
*/
protected $_key = 0;
/**
* Current value.
*
- * @var \Hoa\Iterator\Lookahead mixed
+ * @var mixed
*/
protected $_current = null;
/**
* Whether the current element is valid or not.
*
- * @var \Hoa\Iterator\Lookahead bool
+ * @var bool
*/
protected $_valid = false;
@@ -83,12 +81,11 @@ class Lookahead
/**
* Construct.
*
- * @access public
* @param \Iterator $iterator Iterator.
* @return void
*/
- public function __construct ( \Iterator $iterator ) {
-
+ public function __construct(\Iterator $iterator)
+ {
$this->_iterator = $iterator;
return;
@@ -97,49 +94,46 @@ class Lookahead
/**
* Get inner iterator.
*
- * @access public
* @return \Iterator
*/
- public function getInnerIterator ( ) {
-
+ public function getInnerIterator()
+ {
return $this->_iterator;
}
/**
* Return the current element.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
return $this->_current;
}
/**
* Return the key of the current element.
*
- * @access public
* @return mixed
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_key;
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
$innerIterator = $this->getInnerIterator();
$this->_valid = $innerIterator->valid();
- if(false === $this->_valid)
+ if (false === $this->_valid) {
return;
+ }
$this->_key = $innerIterator->key();
$this->_current = $innerIterator->current();
@@ -150,11 +144,10 @@ class Lookahead
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
$out = $this->getInnerIterator()->rewind();
$this->next();
@@ -164,44 +157,40 @@ class Lookahead
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
return $this->_valid;
}
/**
* Check whether there is a next element.
*
- * @access public
* @return bool
*/
- public function hasNext ( ) {
-
+ public function hasNext()
+ {
return $this->getInnerIterator()->valid();
}
/**
* Get next value.
*
- * @access public
* @return mixed
*/
- public function getNext ( ) {
-
+ public function getNext()
+ {
return $this->getInnerIterator()->current();
}
/**
* Get next key.
*
- * @access public
* @return mixed
*/
- public function getNextKey ( ) {
-
+ public function getNextKey()
+ {
return $this->getInnerIterator()->key();
}
}
diff --git a/Lookbehind.php b/Lookbehind.php
index 2a4ada1..5e485ec 100644
--- a/Lookbehind.php
+++ b/Lookbehind.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,33 +41,31 @@ namespace Hoa\Iterator;
*
* Look behind iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
class Lookbehind
extends IteratorIterator
- implements Outer {
-
+ implements Outer
+{
/**
* Current iterator.
*
- * @var \Hoa\Iterator\Lookbehind object
+ * @var \Hoa\Iterator\Lookbehind
*/
protected $_iterator = null;
/**
* Previous key.
*
- * @var \Hoa\Iterator\Lookbehind mixed
+ * @var mixed
*/
protected $_previousKey = -1;
/**
* Previous value.
*
- * @var \Hoa\Iterator\Lookbehind mixed
+ * @var mixed
*/
protected $_previousCurrent = null;
@@ -76,12 +74,11 @@ class Lookbehind
/**
* Construct.
*
- * @access public
* @param \Iterator $iterator Iterator.
* @return void
*/
- public function __construct ( \Iterator $iterator ) {
-
+ public function __construct(\Iterator $iterator)
+ {
$this->_iterator = $iterator;
return;
@@ -90,44 +87,40 @@ class Lookbehind
/**
* Get inner iterator.
*
- * @access public
* @return \Iterator
*/
- public function getInnerIterator ( ) {
-
+ public function getInnerIterator()
+ {
return $this->_iterator;
}
/**
* Return the current element.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
return $this->getInnerIterator()->current();
}
/**
* Return the key of the current element.
*
- * @access public
* @return mixed
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->getInnerIterator()->key();
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
$this->_previousKey = $this->key();
$this->_previousCurrent = $this->current();
@@ -137,11 +130,10 @@ class Lookbehind
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
$this->_previousKey = -1;
$this->_previousCurrent = null;
@@ -151,44 +143,40 @@ class Lookbehind
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
return $this->getInnerIterator()->valid();
}
/**
* Check whether there is a previous element.
*
- * @access public
* @return bool
*/
- public function hasPrevious ( ) {
-
+ public function hasPrevious()
+ {
return -1 !== $this->_previousKey;
}
/**
* Get previous value.
*
- * @access public
* @return mixed
*/
- public function getPrevious ( ) {
-
+ public function getPrevious()
+ {
return $this->_previousCurrent;
}
/**
* Get previous key.
*
- * @access public
* @return mixed
*/
- public function getPreviousKey ( ) {
-
+ public function getPreviousKey()
+ {
return $this->_previousKey;
}
}
diff --git a/Map.php b/Map.php
index 7185a41..c34303c 100644
--- a/Map.php
+++ b/Map.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL ArrayIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Map extends \ArrayIterator { }
+class Map extends \ArrayIterator
+{
+}
diff --git a/Mock.php b/Mock.php
index 3d6b6bc..282bcd3 100644
--- a/Mock.php
+++ b/Mock.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL EmptyIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Mock extends \EmptyIterator { }
+class Mock extends \EmptyIterator
+{
+}
diff --git a/Multiple.php b/Multiple.php
index f6f9bfd..c802063 100644
--- a/Multiple.php
+++ b/Multiple.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,17 +41,15 @@ namespace Hoa\Iterator;
*
* Extending the SPL MultipleIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Multiple extends \MultipleIterator {
-
+class Multiple extends \MultipleIterator
+{
/**
* Default value for each $infos.
*
- * @var \Hoa\Iterator\Multiple array
+ * @var array
*/
protected $_infos = [];
@@ -62,21 +60,23 @@ class Multiple extends \MultipleIterator {
* Add the $default argument that will be use when the iterator has reached
* its end.
*
- * @access public
* @param \Iterator $iterator Iterator.
* @param string $infos Informations to attach.
* @param mixed $default Default value.
* @return void
*/
- public function attachIterator ( \Iterator $iterator, $infos = null,
- $default = null ) {
-
+ public function attachIterator(
+ \Iterator $iterator,
+ $infos = null,
+ $default = null
+ ) {
$out = parent::attachIterator($iterator, $infos);
- if(null === $infos)
+ if (null === $infos) {
$this->_infos[] = $default;
- else
+ } else {
$this->_infos[$infos] = $default;
+ }
return $out;
}
@@ -84,16 +84,17 @@ class Multiple extends \MultipleIterator {
/**
* Get the registered iterator instances.
*
- * @access public
* @return array
*/
- public function current ( ) {
-
+ public function current()
+ {
$out = parent::current();
- foreach($out as $key => &$value)
- if(null === $value)
+ foreach ($out as $key => &$value) {
+ if (null === $value) {
$value = $this->_infos[$key];
+ }
+ }
return $out;
}
diff --git a/NoRewind.php b/NoRewind.php
index 52a44b1..96e5e88 100644
--- a/NoRewind.php
+++ b/NoRewind.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL NoRewindIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class NoRewind extends \NoRewindIterator { }
+class NoRewind extends \NoRewindIterator
+{
+}
diff --git a/Outer.php b/Outer.php
index 8974c37..180322d 100644
--- a/Outer.php
+++ b/Outer.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL OuterIterator interface.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-interface Outer extends \OuterIterator { }
+interface Outer extends \OuterIterator
+{
+}
diff --git a/README.md b/README.md
index a663f79..2b1a93c 100644
--- a/README.md
+++ b/README.md
@@ -70,8 +70,9 @@ extends [`OuterIterator`](http://php.net/outeriterator).
```php
$foobar = new Hoa\Iterator\Map(['f', 'o', 'o', 'b', 'a', 'r']);
-foreach($foobar as $value)
+foreach ($foobar as $value) {
echo $value;
+}
/**
* Will output:
@@ -89,14 +90,14 @@ content of an iterator. It extends
```php
$filter = new Hoa\Iterator\CallbackFilter(
$foobar,
- function ( $value, $key, $iterator ) {
-
+ function ($value, $key, $iterator) {
return false === in_array($value, ['a', 'e', 'i', 'o', 'u']);
}
);
-foreach($filter as $value)
+foreach ($filter as $value) {
echo $value;
+}
/**
* Will output:
@@ -115,8 +116,9 @@ a specific offset. It extends [`LimitIterator`](http://php.net/limititerator).
```php
$limit = new Hoa\Iterator\Limit($foobar, 2, 3);
-foreach($limit as $value)
+foreach ($limit as $value) {
echo $value;
+}
/**
* Will output:
@@ -133,8 +135,9 @@ It extends [`InfiniteIterator`](http://php.net/infiniteiterator).
$infinite = new Hoa\Iterator\Infinite($foobar);
$limit = new Hoa\Iterator\Limit($infinite, 0, 21);
-foreach($limit as $value)
+foreach ($limit as $value) {
echo $value;
+}
/**
* Will output:
@@ -153,11 +156,14 @@ Also, `Hoa\Iterator\NoRewind` is an iterator that does not rewind. It extends
$repeater = new Hoa\Iterator\Repeater(
$foobar,
3,
- function ( $i ) { echo "\n"; }
+ function ($i) {
+ echo "\n";
+ }
);
-foreach($repeater as $value)
+foreach ($repeater as $value) {
echo $value;
+}
/**
* Will output:
@@ -175,8 +181,9 @@ $step)` loop.
```php
$counter = new Hoa\Iterator\Counter(0, 12, 3);
-foreach($counter as $value)
+foreach ($counter as $value) {
echo $value, ' ';
+}
/**
* Will output:
@@ -196,8 +203,9 @@ $append = new Hoa\Iterator\Append();
$append->append($counter1);
$append->append($counter2);
-foreach($append as $value)
+foreach ($append as $value) {
echo $value, ' ';
+}
/**
* Will output:
@@ -220,8 +228,9 @@ $multiple = new Hoa\Iterator\Multiple(
$multiple->attachIterator($foobar, 'one', '!');
$multiple->attachIterator($baz, 'two', '?');
-foreach($multiple as $iterators)
+foreach ($multiple as $iterators) {
echo $iterators['one'], ' | ', $iterators['two'], "\n";
+}
/**
* Will output:
@@ -246,14 +255,14 @@ $multiple->attachIterator($counter);
$multiple->attachIterator(clone $counter);
$demultiplexer = new Hoa\Iterator\Demultiplexer(
$multiple,
- function ( $current ) {
-
+ function ($current) {
return $current[0] * $current[1];
}
);
-foreach($demultiplexer as $value)
+foreach ($demultiplexer as $value) {
echo $value, ' ';
+}
/**
* Will output:
@@ -273,8 +282,9 @@ They respectively extend
```php
$directory = new Hoa\Iterator\Directory(resolve('hoa://Library/Iterator'));
-foreach($directory as $value)
+foreach ($directory as $value) {
echo $value->getFilename(), "\n";
+}
/**
* Will output:
@@ -297,8 +307,9 @@ extends [`GlobIterator`](http://php.net/globiterator). Thus:
```php
$glob = new Hoa\Iterator\Glob(resolve('hoa://Library/Iterator') . '/M*.php');
-foreach($glob as $value)
+foreach ($glob as $value) {
echo $value->getFilename(), "\n";
+}
/**
* Will output:
@@ -316,12 +327,12 @@ foreach($glob as $value)
$counter = new Hoa\Iterator\Counter(0, 5, 1);
$lookahead = new Hoa\Iterator\Lookahead($counter);
-foreach($lookahead as $value) {
-
+foreach ($lookahead as $value) {
echo $value;
- if(true === $lookahead->hasNext())
+ if (true === $lookahead->hasNext()) {
echo ' (next: ', $lookahead->getNext(), ')';
+ }
echo "\n";
}
@@ -346,14 +357,14 @@ iterator. This is very useful when combined with other iterators, for instance
with `Hoa\Iterator\Limit`:
```php
-$generator = new Hoa\Iterator\CallbackGenerator(function ( $key ) {
-
+$generator = new Hoa\Iterator\CallbackGenerator(function ($key) {
return mt_rand($key, $key * 2);
});
-$limit = new Hoa\Iterator\Limit($generator, 0, 10);
+$limit = new Hoa\Iterator\Limit($generator, 0, 10);
-foreach($limit as $value)
+foreach ($limit as $value) {
echo $value, ' ';
+}
/**
* Could output:
diff --git a/Recursive/CallbackFilter.php b/Recursive/CallbackFilter.php
index 48a1d5c..7dbe899 100644
--- a/Recursive/CallbackFilter.php
+++ b/Recursive/CallbackFilter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator\Recursive;
*
* Extending the SPL RecursiveCallbackFilterIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class CallbackFilter extends \RecursiveCallbackFilterIterator { }
+class CallbackFilter extends \RecursiveCallbackFilterIterator
+{
+}
diff --git a/Recursive/Directory.php b/Recursive/Directory.php
index ed805c3..336ce63 100644
--- a/Recursive/Directory.php
+++ b/Recursive/Directory.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,31 +41,29 @@ namespace Hoa\Iterator\Recursive;
*
* Extending the SPL RecursiveDirectoryIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Directory extends \RecursiveDirectoryIterator {
-
+class Directory extends \RecursiveDirectoryIterator
+{
/**
* SplFileInfo classname.
*
- * @var \Hoa\Iterator\Recursive\Directory string
+ * @var string
*/
protected $_splFileInfoClass = null;
/**
* Relative path.
*
- * @var \Hoa\Iterator\Recursive\Directory string
+ * @var string
*/
protected $_relativePath = 0;
/**
* Workaround for the bug #65136.
*
- * @var \Hoa\Iterator\Recursive\Directory string
+ * @var string
*/
private static $_handlePath = null;
@@ -76,25 +74,24 @@ class Directory extends \RecursiveDirectoryIterator {
* Please, see \RecursiveDirectoryIterator::__construct() method.
* We add the $splFileInfoClass parameter.
*
- * @access public
* @param string $path Path.
* @param int $flags Flags.
* @param string $splFileInfoClass SplFileInfo classname.
*/
- public function __construct ( $path, $flags = null, $splFileInfoClass = null ) {
-
- if(null === $flags)
+ public function __construct($path, $flags = null, $splFileInfoClass = null)
+ {
+ if (null === $flags) {
parent::__construct($path);
- else
+ } else {
parent::__construct($path, $flags);
+ }
- if(null !== self::$_handlePath) {
-
+ if (null !== self::$_handlePath) {
$this->_relativePath = self::$_handlePath;
self::$_handlePath = null;
- }
- else
+ } else {
$this->_relativePath = $path;
+ }
$this->setSplFileInfoClass($splFileInfoClass);
@@ -105,21 +102,20 @@ class Directory extends \RecursiveDirectoryIterator {
* Current.
* Please, see \RecursiveDirectoryIterator::current() method.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
$out = parent::current();
- if( null !== $this->_splFileInfoClass
- && $out instanceof \SplFileInfo) {
-
+ if (null !== $this->_splFileInfoClass &&
+ $out instanceof \SplFileInfo) {
$out->setInfoClass($this->_splFileInfoClass);
$out = $out->getFileInfo();
- if($out instanceof \Hoa\Iterator\SplFileInfo)
+ if ($out instanceof \Hoa\Iterator\SplFileInfo) {
$out->setRelativePath($this->getRelativePath());
+ }
}
return $out;
@@ -129,16 +125,16 @@ class Directory extends \RecursiveDirectoryIterator {
* Get children.
* Please, see \RecursiveDirectoryIterator::getChildren() method.
*
- * @access public
* @return mixed
*/
- public function getChildren ( ) {
-
+ public function getChildren()
+ {
self::$_handlePath = $this->getRelativePath();
$out = parent::getChildren();
- if($out instanceof \RecursiveDirectoryIterator)
+ if ($out instanceof \RecursiveDirectoryIterator) {
$out->setSplFileInfoClass($this->_splFileInfoClass);
+ }
return $out;
}
@@ -146,12 +142,11 @@ class Directory extends \RecursiveDirectoryIterator {
/**
* Set SplFileInfo classname.
*
- * @access public
* @param string $splFileInfoClass SplFileInfo classname.
* @return void
*/
- public function setSplFileInfoClass ( $splFileInfoClass ) {
-
+ public function setSplFileInfoClass($splFileInfoClass)
+ {
$this->_splFileInfoClass = $splFileInfoClass;
return;
@@ -160,11 +155,10 @@ class Directory extends \RecursiveDirectoryIterator {
/**
* Get relative path (if given).
*
- * @access public
* @return string
*/
- public function getRelativePath ( ) {
-
+ public function getRelativePath()
+ {
return $this->_relativePath;
}
}
diff --git a/Recursive/Filter.php b/Recursive/Filter.php
index bf87957..7ba6c6d 100644
--- a/Recursive/Filter.php
+++ b/Recursive/Filter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator\Recursive;
*
* Extending the SPL RecursiveFilterIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-abstract class Filter extends \RecursiveFilterIterator { }
+abstract class Filter extends \RecursiveFilterIterator
+{
+}
diff --git a/Recursive/Iterator.php b/Recursive/Iterator.php
index d55134a..3f0ac3b 100644
--- a/Recursive/Iterator.php
+++ b/Recursive/Iterator.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator\Recursive;
*
* Extending the SPL RecursiveIteratorIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Iterator extends \RecursiveIteratorIterator { }
+class Iterator extends \RecursiveIteratorIterator
+{
+}
diff --git a/Recursive/Map.php b/Recursive/Map.php
index 3afc95d..c2fb2ff 100644
--- a/Recursive/Map.php
+++ b/Recursive/Map.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator\Recursive;
*
* Extending the SPL RecursiveArrayIterator class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Map extends \RecursiveArrayIterator { }
+class Map extends \RecursiveArrayIterator
+{
+}
diff --git a/Recursive/Mock.php b/Recursive/Mock.php
index b25fea8..082ca45 100644
--- a/Recursive/Mock.php
+++ b/Recursive/Mock.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -42,17 +42,15 @@ namespace Hoa\Iterator\Recursive;
* Mock a recursive iterator with no children.
* It allows to use regular iterators with a recursive iterator iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Mock implements Recursive {
-
+class Mock implements Recursive
+{
/**
* Current iterator.
*
- * @var \Traversable object
+ * @var \Traversable
*/
protected $_iterator = null;
@@ -61,14 +59,14 @@ class Mock implements Recursive {
/**
* Constructor.
*
- * @access public
* @param \Traversable $iterator Iterator.
* @return void
*/
- public function __construct ( \Traversable $iterator ) {
-
- if($iterator instanceof \IteratorAggregate)
+ public function __construct(\Traversable $iterator)
+ {
+ if ($iterator instanceof \IteratorAggregate) {
$iterator = $iterator->getIterator();
+ }
$this->_iterator = $iterator;
@@ -78,55 +76,50 @@ class Mock implements Recursive {
/**
* Return the current element.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
return $this->_iterator->current();
}
/**
* Return the key of the current element.
*
- * @access public
* @return mixed
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_iterator->key();
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
return $this->_iterator->next();
}
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
return $this->_iterator->rewind();
}
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
return $this->_iterator->valid();
}
@@ -134,11 +127,10 @@ class Mock implements Recursive {
* Return an iterator for the current entry.
* It's a fake, we return null.
*
- * @access public
* @return void
*/
- public function getChildren ( ) {
-
+ public function getChildren()
+ {
return null;
}
@@ -146,11 +138,10 @@ class Mock implements Recursive {
* Return if an iterator can be created for the current entry.
* It's a fake, we return false.
*
- * @access public
* @return bool
*/
- public function hasChildren ( ) {
-
+ public function hasChildren()
+ {
return false;
}
}
diff --git a/Recursive/Recursive.php b/Recursive/Recursive.php
index 6a8ed61..ff07b97 100644
--- a/Recursive/Recursive.php
+++ b/Recursive/Recursive.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -43,12 +43,12 @@ use Hoa\Core;
*
* Extending the SPL RecursiveIterator interface.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-interface Recursive extends \RecursiveIterator { }
+interface Recursive extends \RecursiveIterator
+{
+}
/**
* Flex entity.
diff --git a/Recursive/RegularExpression.php b/Recursive/RegularExpression.php
index c0f3dd0..67545a7 100644
--- a/Recursive/RegularExpression.php
+++ b/Recursive/RegularExpression.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -47,19 +47,16 @@ use Hoa\Iterator;
*
* Inspired by hhvm://hphp/system/php/spl/iterators/RecursiveRegexIterator.php
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
class RegularExpression
extends Iterator\RegularExpression
- implements Recursive {
-
+ implements Recursive
+{
/**
* Constructor.
*
- * @access public
* @param \RecursiveIterator $iterator The recursive iterator to
* apply this regex filter to.
* @param string $regex The regular expression to
@@ -73,10 +70,13 @@ class RegularExpression
* \RegexIterator constants.
* @return void
*/
- public function __construct( \RecursiveIterator $iterator, $regex,
- $mode = self::MATCH, $flags = 0,
- $pregFlags = 0) {
-
+ public function __construct(
+ \RecursiveIterator $iterator,
+ $regex,
+ $mode = self::MATCH,
+ $flags = 0,
+ $pregFlags = 0
+ ) {
parent::__construct($iterator, $regex, $mode, $flags, $pregFlags);
return;
@@ -85,23 +85,22 @@ class RegularExpression
/**
* Get accept status.
*
- * @access public
* @return bool
*/
- public function accept ( ) {
-
- return true === $this->hasChildren()
- || true === parent::accept();
+ public function accept()
+ {
+ return
+ true === $this->hasChildren() ||
+ true === parent::accept();
}
/**
* Get an iterator for the current entry.
*
- * @access public
* @return \Hoa\Iterator\Recursive\RegularExpression
*/
- public function getChildren ( ) {
-
+ public function getChildren()
+ {
return new static(
true === $this->hasChildren()
? $this->getInnerIterator()->getChildren()
@@ -116,11 +115,10 @@ class RegularExpression
/**
* Check whether an iterator can be obtained for the current entry.
*
- * @access public
* @return bool
*/
- public function hasChildren ( ) {
-
+ public function hasChildren()
+ {
return $this->getInnerIterator()->hasChildren();
}
}
diff --git a/RegularExpression.php b/RegularExpression.php
index 55f902f..fcb9f53 100644
--- a/RegularExpression.php
+++ b/RegularExpression.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -45,13 +45,11 @@ namespace Hoa\Iterator;
*
* Inspired by hhvm://hphp/system/php/spl/iterators/RegexIterator.php
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class RegularExpression extends Filter {
-
+class RegularExpression extends Filter
+{
/**
* Flag: match the entry key instead of the entry value.
*
@@ -104,7 +102,7 @@ class RegularExpression extends Filter {
/**
* The regular expression to match.
*
- * @var \Hoa\Iterator\RegularExpression string
+ * @var string
*/
protected $_regex = null;
@@ -112,7 +110,7 @@ class RegularExpression extends Filter {
* Operation mode, see the \RegexIterator::setMode method for a list of
* modes.
*
- * @var \Hoa\Iterator\RegularExpression int
+ * @var int
*/
protected $_mode = 0;
@@ -120,35 +118,35 @@ class RegularExpression extends Filter {
* Special flags, see the \RegexIterator::setFlag method for a list of
* available flags.
*
- * @var \Hoa\Iterator\RegularExpression int
+ * @var int
*/
protected $_flags = 0;
/**
* The regular expression flags. See constants.
*
- * @var \Hoa\Iterator\RegularExpression int
+ * @var int
*/
protected $_pregFlags = 0;
/**
* Current key.
*
- * @var \Hoa\Iterator\RegularExpression int
+ * @var int
*/
protected $_key = 0;
/**
* Current value.
*
- * @var \Hoa\Iterator\RegularExpression string
+ * @var string
*/
protected $_current = null;
/**
* Replacement.
*
- * @var \Hoa\Iterator\RegularExpression string
+ * @var string
*/
public $replacement = null;
@@ -157,7 +155,6 @@ class RegularExpression extends Filter {
/**
* Constructor.
*
- * @access public
* @param \RecursiveIterator $iterator The recursive iterator to
* apply this regex filter to.
* @param string $regex The regular expression to
@@ -171,10 +168,13 @@ class RegularExpression extends Filter {
* \RegexIterator constants.
* @return void
*/
- public function __construct ( \Iterator $iterator, $regex,
- $mode = self::MATCH, $flags = 0,
- $pregFlags = 0) {
-
+ public function __construct(
+ \Iterator $iterator,
+ $regex,
+ $mode = self::MATCH,
+ $flags = 0,
+ $pregFlags = 0
+ ) {
parent::__construct($iterator);
$this->_regex = $regex;
@@ -189,13 +189,13 @@ class RegularExpression extends Filter {
/**
* Get accept status.
*
- * @access public
* @return bool
*/
- public function accept ( ) {
-
- if(is_array(parent::current()))
+ public function accept()
+ {
+ if (is_array(parent::current())) {
return false;
+ }
$this->_key = parent::key();
$this->_current = parent::current();
@@ -205,7 +205,7 @@ class RegularExpression extends Filter {
$subject = $useKey ? $this->_key : $this->_current;
$out = false;
- switch($this->_mode) {
+ switch ($this->_mode) {
case self::MATCH:
$out = 0 !== preg_match(
@@ -214,7 +214,8 @@ class RegularExpression extends Filter {
$matches,
$this->_pregFlags
);
- break;
+
+ break;
case self::GET_MATCH:
$this->_current = [];
@@ -224,17 +225,19 @@ class RegularExpression extends Filter {
$this->_current,
$this->_pregFlags
);
- break;
+
+ break;
case self::ALL_MATCHES:
$this->_current = [];
- $out = 0 < preg_match_all(
+ $out = 0 < preg_match_all(
$this->_regex,
$subject,
$this->_current,
$this->_pregFlags
);
- break;
+
+ break;
case self::SPLIT:
$this->_current = preg_split(
@@ -244,9 +247,11 @@ class RegularExpression extends Filter {
$this->_pregFlags
);
- $out = is_array($this->_current)
- && 1 < count($this->_current);
- break;
+ $out =
+ is_array($this->_current) &&
+ 1 < count($this->_current);
+
+ break;
case self::REPLACE:
$numberOfReplacement = 0;
@@ -258,14 +263,13 @@ class RegularExpression extends Filter {
$numberOfReplacement
);
- if(null === $result || 0 === $numberOfReplacement) {
-
+ if (null === $result || 0 === $numberOfReplacement) {
$out = false;
+
break;
}
- if(0 !== $useKey) {
-
+ if (0 !== $useKey) {
$this->_key = $result;
$out = true;
@@ -274,15 +278,18 @@ class RegularExpression extends Filter {
$this->_current = $result;
$out = true;
- break;
+
+ break;
default:
$out = false;
- break;
+
+ break;
}
- if(0 !== ($this->_flags & self::INVERT_MATCH))
+ if (0 !== ($this->_flags & self::INVERT_MATCH)) {
return false === $out;
+ }
return $out;
}
@@ -290,37 +297,36 @@ class RegularExpression extends Filter {
/**
* Get current key.
*
- * @access public
* @return int
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_key;
}
/**
* Get current value.
*
- * @access public
* @return string
*/
- public function current ( ) {
-
+ public function current()
+ {
return $this->_current;
}
/**
* Set mode.
*
- * @access public
* @param int $mode Mode.
* @return void
*/
- public function setMode ( $mode ) {
-
- if($mode < self::MATCH || $mode > self::REPLACE)
+ public function setMode($mode)
+ {
+ if ($mode < self::MATCH || $mode > self::REPLACE) {
throw new \InvalidArgumentException(
- 'Illegal mode ' . $mode . '.');
+ 'Illegal mode ' . $mode . '.'
+ );
+ }
$this->_mode = $mode;
@@ -330,12 +336,11 @@ class RegularExpression extends Filter {
/**
* Set flags.
*
- * @access public
* @param int $flags Flags.
* @return void
*/
- public function setFlags ( $flags ) {
-
+ public function setFlags($flags)
+ {
$this->_flags = $flags;
return;
@@ -344,12 +349,11 @@ class RegularExpression extends Filter {
/**
* Set preg flags.
*
- * @access public
* @param int $pregFlags Preg flags.
* @return void
*/
- public function setPregFlags ( $pregFlags ) {
-
+ public function setPregFlags($pregFlags)
+ {
$this->_pregFlags = $pregFlags;
return;
@@ -358,44 +362,40 @@ class RegularExpression extends Filter {
/**
* Get regular expression.
*
- * @access public
* @return string
*/
- public function getRegex ( ) {
-
+ public function getRegex()
+ {
return $this->_regex;
}
/**
* Get mode.
*
- * @access public
* @return int
*/
- public function getMode ( ) {
-
+ public function getMode()
+ {
return $this->_mode;
}
/**
* Get flags.
*
- * @access public
* @return int
*/
- public function getFlags ( ) {
-
+ public function getFlags()
+ {
return $this->_flags;
}
/**
* Get preg flags.
*
- * @access public
* @return int
*/
- public function getPregFlags ( ) {
-
+ public function getPregFlags()
+ {
return $this->_pregFlags;
}
}
diff --git a/Repeater.php b/Repeater.php
index 0612422..f6731c5 100644
--- a/Repeater.php
+++ b/Repeater.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,38 +41,36 @@ namespace Hoa\Iterator;
*
* Repeat an iterator n-times.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Repeater implements Iterator {
-
+class Repeater implements Iterator
+{
/**
* Current iterator.
*
- * @var \Traversable object
+ * @var \Traversable
*/
protected $_iterator = null;
/**
* Maximum repetition.
*
- * @var \Hoa\Iterator\Repeater int
+ * @var int
*/
protected $_n = 1;
/**
* Current repetition.
*
- * @var \Hoa\Iterator\Repeater int
+ * @var int
*/
protected $_i = 1;
/**
* Body (callable to execute each time).
*
- * @var \Hoa\Iterator\Repeater callable
+ * @var callable
*/
protected $_body = null;
@@ -81,21 +79,25 @@ class Repeater implements Iterator {
/**
* Constructor.
*
- * @access public
* @param \Traversable $iterator Iterator.
* @param int $n Repeat $n-times.
* @param callable $body Body.
* @return void
- * @throw \Hoa\Iterator\Exception
+ * @throws \Hoa\Iterator\Exception
*/
- public function __construct ( \Traversable $iterator, $n, $body = null ) {
-
- if(0 >= $n)
+ public function __construct(\Traversable $iterator, $n, $body = null)
+ {
+ if (0 >= $n) {
throw new Exception(
- 'n must be greater than 0, given %d.', 0, $n);
+ 'n must be greater than 0, given %d.',
+ 0,
+ $n
+ );
+ }
- if($iterator instanceof \IteratorAggregate)
+ if ($iterator instanceof \IteratorAggregate) {
$iterator = $iterator->getIterator();
+ }
$this->_iterator = $iterator;
$this->_n = $n;
@@ -107,70 +109,64 @@ class Repeater implements Iterator {
/**
* Return the current element.
*
- * @access public
* @return mixed
*/
- public function current ( ) {
-
+ public function current()
+ {
return $this->_iterator->current();
}
/**
* Return the key of the current element.
*
- * @access public
* @return mixed
*/
- public function key ( ) {
-
+ public function key()
+ {
return $this->_iterator->key();
}
/**
* Move forward to next element.
*
- * @access public
* @return void
*/
- public function next ( ) {
-
+ public function next()
+ {
return $this->_iterator->next();
}
/**
* Rewind the iterator to the first element.
*
- * @access public
* @return void
*/
- public function rewind ( ) {
-
+ public function rewind()
+ {
return $this->_iterator->rewind();
}
/**
* Check if current position is valid.
*
- * @access public
* @return bool
*/
- public function valid ( ) {
-
+ public function valid()
+ {
$valid = $this->_iterator->valid();
- if(true === $valid)
+ if (true === $valid) {
return true;
+ }
- if(null !== $this->_body) {
-
+ if (null !== $this->_body) {
$handle = &$this->_body;
$handle($this->_i);
}
$this->rewind();
- if($this->_n <= $this->_i++) {
-
+ if ($this->_n <= $this->_i++) {
$this->_i = 1;
return false;
diff --git a/Seekable.php b/Seekable.php
index 84309e6..7021e4e 100644
--- a/Seekable.php
+++ b/Seekable.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,9 +41,9 @@ namespace Hoa\Iterator;
*
* Extending the SPL SeekableIterator interface.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-interface Seekable extends \SeekableIterator { }
+interface Seekable extends \SeekableIterator
+{
+}
diff --git a/SplFileInfo.php b/SplFileInfo.php
index 71a73ac..23a80ad 100644
--- a/SplFileInfo.php
+++ b/SplFileInfo.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -41,24 +41,22 @@ namespace Hoa\Iterator;
*
* Enhance SplFileInfo implementation.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class SplFileInfo extends \SplFileInfo {
-
+class SplFileInfo extends \SplFileInfo
+{
/**
* Hash.
*
- * @var \Hoa\Iterator\SplFileInfo string
+ * @var string
*/
protected $_hash = null;
/**
* Relative path.
*
- * @var \Hoa\Iterator\SplFileInfo string
+ * @var string
*/
protected $_relativePath = null;
@@ -67,17 +65,17 @@ class SplFileInfo extends \SplFileInfo {
/**
* Construct.
*
- * @access public
* @param string $filename Filename.
* @param string $relativePath Relative path.
* @return void
*/
- public function __construct ( $filename, $relativePath = null ) {
-
+ public function __construct($filename, $relativePath = null)
+ {
parent::__construct($filename);
- if(-1 !== $mtime = $this->getMTime())
+ if (-1 !== $mtime = $this->getMTime()) {
$this->_hash = md5($this->getPathname() . $mtime);
+ }
$this->_relativePath = $relativePath;
@@ -87,28 +85,23 @@ class SplFileInfo extends \SplFileInfo {
/**
* Get the hash.
*
- * @access public
* @return string
*/
- public function getHash ( ) {
-
+ public function getHash()
+ {
return $this->_hash;
}
/**
* Get the MTime.
*
- * @access public
* @return int
*/
- public function getMTime ( ) {
-
+ public function getMTime()
+ {
try {
-
return parent::getMTime();
- }
- catch ( \RuntimeException $e ) {
-
+ } catch (\RuntimeException $e) {
return -1;
}
}
@@ -116,12 +109,11 @@ class SplFileInfo extends \SplFileInfo {
/**
* Set relative path.
*
- * @access public
* @param string $relativePath Relative path.
* @return string
*/
- public function setRelativePath ( $relativePath ) {
-
+ public function setRelativePath($relativePath)
+ {
$old = $this->_relativePath;
$this->_relativePath = $relativePath;
@@ -131,24 +123,23 @@ class SplFileInfo extends \SplFileInfo {
/**
* Get relative path (if given).
*
- * @access public
* @return string
*/
- public function getRelativePath ( ) {
-
+ public function getRelativePath()
+ {
return $this->_relativePath;
}
/**
* Get relative pathname (if possible).
*
- * @access public
* @return string
*/
- public function getRelativePathname ( ) {
-
- if(null === $relative = $this->getRelativePath())
+ public function getRelativePathname()
+ {
+ if (null === $relative = $this->getRelativePath()) {
return $this->getPathname();
+ }
return substr($this->getPathname(), strlen($relative));
}
diff --git a/Test/Unit/Append.php b/Test/Unit/Append.php
index 155e2d8..4f71122 100644
--- a/Test/Unit/Append.php
+++ b/Test/Unit/Append.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Append.
*
* Test suite of the repeater iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Append extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Append extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$counter1 = new LUT\Counter(0, 12, 3),
@@ -77,8 +75,8 @@ class Append extends Test\Unit\Suite {
]);
}
- public function case_singleton ( ) {
-
+ public function case_singleton()
+ {
$this
->given(
$counter1 = new LUT\Counter(0, 12, 3),
@@ -96,8 +94,8 @@ class Append extends Test\Unit\Suite {
]);
}
- public function case_empty ( ) {
-
+ public function case_empty()
+ {
$this
->given($append = new LUT\Append())
->when($result = iterator_to_array($append))
diff --git a/Test/Unit/CallbackFilter.php b/Test/Unit/CallbackFilter.php
index 67e6cfc..f6ae4cb 100644
--- a/Test/Unit/CallbackFilter.php
+++ b/Test/Unit/CallbackFilter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,30 +36,27 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\CallbackFilter.
*
* Test suite of the callback filter iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class CallbackFilter extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class CallbackFilter extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$foobar = $this->getDummyIterator(),
$filter = new LUT\CallbackFilter(
$foobar,
- function ( $value ) {
-
+ function ($value) {
return false === in_array($value, ['a', 'e', 'i', 'o', 'u']);
}
)
@@ -74,8 +71,8 @@ class CallbackFilter extends Test\Unit\Suite {
]);
}
- public function case_all_callback_parameters ( ) {
-
+ public function case_all_callback_parameters()
+ {
$self = $this;
$this
@@ -85,9 +82,12 @@ class CallbackFilter extends Test\Unit\Suite {
$values = [],
$filter = new LUT\CallbackFilter(
$foobar,
- function ( $value, $key, $iterator )
- use ( $self, $foobar, &$keys, &$values ) {
-
+ function ($value, $key, $iterator) use (
+ $self,
+ $foobar,
+ &$keys,
+ &$values
+ ) {
$self
->object($iterator)
->isIdenticalTo($foobar);
@@ -111,15 +111,14 @@ class CallbackFilter extends Test\Unit\Suite {
->isEqualTo(iterator_to_array($foobar));
}
- public function case_remove_all ( ) {
-
+ public function case_remove_all()
+ {
$this
->given(
$foobar = $this->getDummyIterator(),
$filter = new LUT\CallbackFilter(
$foobar,
- function ( ) {
-
+ function () {
return false;
}
)
@@ -130,15 +129,14 @@ class CallbackFilter extends Test\Unit\Suite {
->isEmpty();
}
- public function case_remove_none ( ) {
-
+ public function case_remove_none()
+ {
$this
->given(
$foobar = $this->getDummyIterator(),
$filter = new LUT\CallbackFilter(
$foobar,
- function ( ) {
-
+ function () {
return true;
}
)
@@ -152,15 +150,14 @@ class CallbackFilter extends Test\Unit\Suite {
->isEqualTo($filterResult);
}
- public function case_recursive ( ) {
-
+ public function case_recursive()
+ {
$this
->given(
$foobar = $this->getDummyRecursiveIterator(),
$filter = new LUT\Recursive\CallbackFilter(
$foobar,
- function ( $value ) {
-
+ function ($value) {
return false === in_array($value, ['a', 'e', 'i', 'o', 'u']);
}
),
@@ -176,15 +173,14 @@ class CallbackFilter extends Test\Unit\Suite {
]);
}
- public function case_recursive_remove_all ( ) {
-
+ public function case_recursive_remove_all()
+ {
$this
->given(
$foobar = $this->getDummyRecursiveIterator(),
$filter = new LUT\Recursive\CallbackFilter(
$foobar,
- function ( ) {
-
+ function () {
return false;
}
),
@@ -196,15 +192,14 @@ class CallbackFilter extends Test\Unit\Suite {
->isEmpty();
}
- public function case_recursive_remove_none ( ) {
-
+ public function case_recursive_remove_none()
+ {
$this
->given(
$foobar = $this->getDummyRecursiveIterator(),
$filter = new LUT\Recursive\CallbackFilter(
$foobar,
- function ( ) {
-
+ function () {
return true;
}
),
@@ -220,13 +215,13 @@ class CallbackFilter extends Test\Unit\Suite {
->isEqualTo($filterResult);
}
- protected function getDummyIterator ( ) {
-
+ protected function getDummyIterator()
+ {
return new LUT\Map(['f', 'o', 'o', 'b', 'a', 'r']);
}
- protected function getDummyRecursiveIterator ( ) {
-
+ protected function getDummyRecursiveIterator()
+ {
return new LUT\Recursive\Map([['f', 'o', 'o'], ['b', 'a', 'r']]);
}
}
diff --git a/Test/Unit/CallbackGenerator.php b/Test/Unit/CallbackGenerator.php
index 1fe4733..f898dd4 100644
--- a/Test/Unit/CallbackGenerator.php
+++ b/Test/Unit/CallbackGenerator.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,30 +36,27 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\CallbackGenerator.
*
* Test suite of the callback generator iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class CallbackGenerator extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class CallbackGenerator extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
- $iterator = new LUT\CallbackGenerator(function ( $key ) {
-
+ $iterator = new LUT\CallbackGenerator(function ($key) {
return $key * 2;
}),
- $limit = new LUT\Limit($iterator, 0, 5)
+ $limit = new LUT\Limit($iterator, 0, 5)
)
->when($result = iterator_to_array($limit))
->then
diff --git a/Test/Unit/Counter.php b/Test/Unit/Counter.php
index 5651f39..73c6ebf 100644
--- a/Test/Unit/Counter.php
+++ b/Test/Unit/Counter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Counter.
*
* Test suite of the counter iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Counter extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Counter extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given($iterator = new LUT\Counter(0, 12, 3))
->when($result = iterator_to_array($iterator))
@@ -61,8 +59,8 @@ class Counter extends Test\Unit\Suite {
->isEqualTo([0, 3, 6, 9]);
}
- public function case_offset ( ) {
-
+ public function case_offset()
+ {
$this
->given($iterator = new LUT\Counter(6, 12, 3))
->when($result = iterator_to_array($iterator))
@@ -71,18 +69,17 @@ class Counter extends Test\Unit\Suite {
->isEqualTo([6, 9]);
}
- public function case_too_small ( ) {
-
+ public function case_too_small()
+ {
$this
- ->exception(function ( ) {
-
+ ->exception(function () {
new LUT\Counter(0, 0, 0);
})
->isInstanceOf('Hoa\Iterator\Exception');
}
- public function case_too_big ( ) {
-
+ public function case_too_big()
+ {
$this
->given($iterator = new LUT\Counter(0, 12, 13))
->when($result = iterator_to_array($iterator))
diff --git a/Test/Unit/Demultiplexer.php b/Test/Unit/Demultiplexer.php
index aa8a281..703abef 100644
--- a/Test/Unit/Demultiplexer.php
+++ b/Test/Unit/Demultiplexer.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Demultiplexer.
*
* Test suite of the demultiplexer iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Demultiplexer extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Demultiplexer extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$counter = new LUT\Counter(0, 10, 1),
@@ -61,8 +59,7 @@ class Demultiplexer extends Test\Unit\Suite {
$multiple->attachIterator(clone $counter),
$demultiplexer = new LUT\Demultiplexer(
$multiple,
- function ( $current ) {
-
+ function ($current) {
return $current[0] * $current[1];
}
)
@@ -84,8 +81,8 @@ class Demultiplexer extends Test\Unit\Suite {
]);
}
- public function case_associative_keys ( ) {
-
+ public function case_associative_keys()
+ {
$this
->given(
$counter = new LUT\Counter(0, 10, 1),
@@ -97,8 +94,7 @@ class Demultiplexer extends Test\Unit\Suite {
$multiple->attachIterator(clone $counter, 'two'),
$demultiplexer = new LUT\Demultiplexer(
$multiple,
- function ( $current ) {
-
+ function ($current) {
return $current['one'] * $current['two'];
}
)
diff --git a/Test/Unit/Directory.php b/Test/Unit/Directory.php
index 606664a..8e75ba8 100644
--- a/Test/Unit/Directory.php
+++ b/Test/Unit/Directory.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Directory.
*
* Test suite of the directory iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Directory extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Directory extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$root = resolve('hoa://Test/Vfs/Root?type=directory'),
@@ -62,10 +60,8 @@ class Directory extends Test\Unit\Suite {
$iterator = new LUT\Directory($root),
$result = []
)
- ->when(function ( ) use ( $iterator, &$result ) {
-
- foreach($iterator as $key => $file) {
-
+ ->when(function () use ($iterator, &$result) {
+ foreach ($iterator as $key => $file) {
$result[$key] = $file->getFilename();
$this
@@ -82,8 +78,8 @@ class Directory extends Test\Unit\Suite {
]);
}
- public function case_seek_and_dots ( ) {
-
+ public function case_seek_and_dots()
+ {
$this
->given(
$root = resolve('hoa://Test/Vfs/Root?type=directory'),
@@ -123,8 +119,8 @@ class Directory extends Test\Unit\Suite {
->isEqualTo('Skip');
}
- public function case_recursive ( ) {
-
+ public function case_recursive()
+ {
$this
->given(
$root = resolve('hoa://Test/Vfs/Root?type=directory'),
@@ -143,10 +139,10 @@ class Directory extends Test\Unit\Suite {
$iterator = new LUT\Recursive\Iterator($directory),
$result = []
)
- ->when(function ( ) use ( $iterator, &$result ) {
-
- foreach($iterator as $file)
+ ->when(function () use ($iterator, &$result) {
+ foreach ($iterator as $file) {
$result[] = $file->getFilename();
+ }
})
->then
->array($result)
@@ -163,8 +159,8 @@ class Directory extends Test\Unit\Suite {
]);
}
- public function case_splFileClassInfo ( ) {
-
+ public function case_splFileClassInfo()
+ {
$this
->given(
$splFileInfo = 'Hoa\Iterator\SplFileInfo',
@@ -181,10 +177,8 @@ class Directory extends Test\Unit\Suite {
),
$result = []
)
- ->when(function ( ) use ( $iterator, $splFileInfo, &$result ) {
-
- foreach($iterator as $file) {
-
+ ->when(function () use ($iterator, $splFileInfo, &$result) {
+ foreach ($iterator as $file) {
$this
->object($file)
->isInstanceOf($splFileInfo);
@@ -204,8 +198,8 @@ class Directory extends Test\Unit\Suite {
]);
}
- public function case_recursive_splFileClassInfo ( ) {
-
+ public function case_recursive_splFileClassInfo()
+ {
$this
->given(
$splFileInfo = 'Hoa\Iterator\SplFileInfo',
@@ -227,10 +221,8 @@ class Directory extends Test\Unit\Suite {
$iterator = new LUT\Recursive\Iterator($directory),
$result = []
)
- ->when(function ( ) use ( $iterator, $splFileInfo, &$result ) {
-
- foreach($iterator as $file) {
-
+ ->when(function () use ($iterator, $splFileInfo, &$result) {
+ foreach ($iterator as $file) {
$this
->object($file)
->isInstanceOf($splFileInfo);
diff --git a/Test/Unit/FileSystem.php b/Test/Unit/FileSystem.php
index a4236ca..50d2673 100644
--- a/Test/Unit/FileSystem.php
+++ b/Test/Unit/FileSystem.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\FileSystem.
*
* Test suite of the filesystem iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class FileSystem extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class FileSystem extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$root = resolve('hoa://Test/Vfs/Root?type=directory'),
@@ -63,10 +61,8 @@ class FileSystem extends Test\Unit\Suite {
$iterator = new LUT\FileSystem($root),
$result = []
)
- ->when(function ( ) use ( $iterator, &$result ) {
-
- foreach($iterator as $pathname => $file) {
-
+ ->when(function () use ($iterator, &$result) {
+ foreach ($iterator as $pathname => $file) {
$this
->object($file)
->isInstanceOf('SplFileInfo');
@@ -81,8 +77,8 @@ class FileSystem extends Test\Unit\Suite {
]);
}
- public function case_splFileClassInfo ( ) {
-
+ public function case_splFileClassInfo()
+ {
$this
->given(
$splFileInfo = 'Hoa\Iterator\SplFileInfo',
@@ -100,10 +96,8 @@ class FileSystem extends Test\Unit\Suite {
),
$result = []
)
- ->when(function ( ) use ( $iterator, $splFileInfo, &$result ) {
-
- foreach($iterator as $file) {
-
+ ->when(function () use ($iterator, $splFileInfo, &$result) {
+ foreach ($iterator as $file) {
$this
->object($file)
->isInstanceOf($splFileInfo);
diff --git a/Test/Unit/Filter.php b/Test/Unit/Filter.php
index 725f9bd..a35756d 100644
--- a/Test/Unit/Filter.php
+++ b/Test/Unit/Filter.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\MyFilter.
*
* Basic filter.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class MyFilter extends LUT\Filter {
-
- public function accept ( ) {
-
+class MyFilter extends LUT\Filter
+{
+ public function accept()
+ {
return true;
}
}
@@ -62,21 +60,18 @@ class MyFilter extends LUT\Filter {
*
* Test suite of the filter iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Filter extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Filter extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$foobar = $this->getDummyIterator(),
$filter = new \Mock\Hoa\Iterator\Test\Unit\MyFilter($foobar),
- $this->calling($filter)->accept = function ( ) {
-
+ $this->calling($filter)->accept = function () {
$value = $this->current();
return false === in_array($value, ['a', 'e', 'i', 'o', 'u']);
@@ -92,8 +87,8 @@ class Filter extends Test\Unit\Suite {
]);
}
- public function case_remove_all ( ) {
-
+ public function case_remove_all()
+ {
$this
->given(
$foobar = $this->getDummyIterator(),
@@ -106,8 +101,8 @@ class Filter extends Test\Unit\Suite {
->isEmpty();
}
- public function case_remove_none ( ) {
-
+ public function case_remove_none()
+ {
$this
->given(
$foobar = $this->getDummyIterator(),
@@ -122,8 +117,8 @@ class Filter extends Test\Unit\Suite {
->isEqualTo($filterResult);
}
- protected function getDummyIterator ( ) {
-
+ protected function getDummyIterator()
+ {
return new LUT\Map(['f', 'o', 'o', 'b', 'a', 'r']);
}
}
diff --git a/Test/Unit/Infinite.php b/Test/Unit/Infinite.php
index b7f470b..6d4a6aa 100644
--- a/Test/Unit/Infinite.php
+++ b/Test/Unit/Infinite.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Infinite.
*
* Test suite of the infinite iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Infinite extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Infinite extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$iterator = new LUT\Map(['a']),
diff --git a/Test/Unit/IteratorIterator.php b/Test/Unit/IteratorIterator.php
index 4b4c932..76a2548 100644
--- a/Test/Unit/IteratorIterator.php
+++ b/Test/Unit/IteratorIterator.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\IteratorIterator.
*
* Test suite of the iterator iterator iterator (;-)).
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class IteratorIterator extends Test\Unit\Suite {
-
- public function case_inner_iterator ( ) {
-
+class IteratorIterator extends Test\Unit\Suite
+{
+ public function case_inner_iterator()
+ {
$this
->given(
$iterator = new LUT\Map([]),
@@ -64,8 +62,8 @@ class IteratorIterator extends Test\Unit\Suite {
->isIdenticalTo($iterator);
}
- public function case_traverse ( ) {
-
+ public function case_traverse()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -77,8 +75,8 @@ class IteratorIterator extends Test\Unit\Suite {
->isEqualTo(['a', 'b', 'c']);
}
- public function case_recursive_leaves_only ( ) {
-
+ public function case_recursive_leaves_only()
+ {
$this
->given(
$array = [
@@ -97,8 +95,8 @@ class IteratorIterator extends Test\Unit\Suite {
->isEqualTo(['b', 'c', 'd', 'f', 'g', 'i']);
}
- public function case_recursive_self_first ( ) {
-
+ public function case_recursive_self_first()
+ {
$this
->given(
$array = [
@@ -126,8 +124,8 @@ class IteratorIterator extends Test\Unit\Suite {
]);
}
- public function case_recursive_child_first ( ) {
-
+ public function case_recursive_child_first()
+ {
$this
->given(
$array = [
diff --git a/Test/Unit/Limit.php b/Test/Unit/Limit.php
index 6959256..ff4c81a 100644
--- a/Test/Unit/Limit.php
+++ b/Test/Unit/Limit.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,27 +36,25 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Limit.
*
* Test suite of the limit iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Limit extends Test\Unit\Suite {
-
+class Limit extends Test\Unit\Suite
+{
private static $_dummyArray = ['f', 'o', 'o', 'b', 'a', 'r'];
- public function case_classic ( ) {
-
+ public function case_classic()
+ {
$this
->given(
$iterator = new LUT\Map(self::$_dummyArray),
@@ -72,26 +70,24 @@ class Limit extends Test\Unit\Suite {
]);
}
- public function case_negative_offset ( ) {
-
+ public function case_negative_offset()
+ {
$this
->given($iterator = new LUT\Map(self::$_dummyArray))
- ->exception(function ( ) use ( $iterator ) {
-
+ ->exception(function () use ($iterator) {
new LUT\Limit($iterator, -2, 3);
})
->isInstanceOf('OutOfRangeException');
}
- public function case_empty ( ) {
-
+ public function case_empty()
+ {
$this
->given(
$iterator = new LUT\Map(self::$_dummyArray),
$limit = new LUT\Limit($iterator, 0, 0)
)
- ->exception(function ( ) use ( $limit ) {
-
+ ->exception(function () use ($limit) {
iterator_to_array($limit);
})
->isInstanceOf('OutOfBoundsException');
diff --git a/Test/Unit/Lookahead.php b/Test/Unit/Lookahead.php
index a831bce..cc5a851 100644
--- a/Test/Unit/Lookahead.php
+++ b/Test/Unit/Lookahead.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Lookahead.
*
* Test suite of the look ahead iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Lookahead extends Test\Unit\Suite {
-
- public function case_traverse ( ) {
-
+class Lookahead extends Test\Unit\Suite
+{
+ public function case_traverse()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -64,8 +62,8 @@ class Lookahead extends Test\Unit\Suite {
->isEqualTo(['a', 'b', 'c']);
}
- public function case_check_ahead ( ) {
-
+ public function case_check_ahead()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -123,8 +121,8 @@ class Lookahead extends Test\Unit\Suite {
->isNull();
}
- public function case_double_rewind ( ) {
-
+ public function case_double_rewind()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -165,8 +163,8 @@ class Lookahead extends Test\Unit\Suite {
->isEqualTo('b');
}
- public function case_empty ( ) {
-
+ public function case_empty()
+ {
$this
->given(
$iterator = new LUT\Mock(),
diff --git a/Test/Unit/Lookbehind.php b/Test/Unit/Lookbehind.php
index e086666..4ed0996 100644
--- a/Test/Unit/Lookbehind.php
+++ b/Test/Unit/Lookbehind.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Lookbehind.
*
* Test suite of the look behind iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Lookbehind extends Test\Unit\Suite {
-
- public function case_traverse ( ) {
-
+class Lookbehind extends Test\Unit\Suite
+{
+ public function case_traverse()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -64,8 +62,8 @@ class Lookbehind extends Test\Unit\Suite {
->isEqualTo(['a', 'b', 'c']);
}
- public function case_check_behind ( ) {
-
+ public function case_check_behind()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -123,8 +121,8 @@ class Lookbehind extends Test\Unit\Suite {
->isEqualTo('b');
}
- public function case_double_rewind ( ) {
-
+ public function case_double_rewind()
+ {
$this
->given(
$iterator = new LUT\Map(['a', 'b', 'c']),
@@ -159,8 +157,8 @@ class Lookbehind extends Test\Unit\Suite {
->isFalse();
}
- public function case_empty ( ) {
-
+ public function case_empty()
+ {
$this
->given(
$iterator = new LUT\Mock(),
diff --git a/Test/Unit/Map.php b/Test/Unit/Map.php
index c98207c..8b76bdd 100644
--- a/Test/Unit/Map.php
+++ b/Test/Unit/Map.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,27 +36,25 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Map.
*
* Test suite of the map iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Map extends Test\Unit\Suite {
-
+class Map extends Test\Unit\Suite
+{
private static $_dummyArray = ['f', 'o', 'o', 'b', 'a', 'r'];
- public function case_classic ( ) {
-
+ public function case_classic()
+ {
$this
->given($iterator = new LUT\Map(self::$_dummyArray))
->when($result = iterator_to_array($iterator))
@@ -65,8 +63,8 @@ class Map extends Test\Unit\Suite {
->isEqualTo(self::$_dummyArray);
}
- public function case_empty ( ) {
-
+ public function case_empty()
+ {
$this
->given($iterator = new LUT\Map())
->when($result = iterator_to_array($iterator))
@@ -75,8 +73,8 @@ class Map extends Test\Unit\Suite {
->isEmpty();
}
- public function case_recursive ( ) {
-
+ public function case_recursive()
+ {
$this
->given(
$array = [
@@ -86,11 +84,9 @@ class Map extends Test\Unit\Suite {
],
$iterator = new LUT\Recursive\Map($array)
)
- ->when(function ( ) use ( $iterator ) {
-
- foreach($iterator as $key => $value) {
-
- if('a' === $key)
+ ->when(function () use ($iterator) {
+ foreach ($iterator as $key => $value) {
+ if ('a' === $key) {
$this
->boolean($iterator->hasChildren())
->isTrue()
@@ -98,8 +94,7 @@ class Map extends Test\Unit\Suite {
->isInstanceOf('Hoa\Iterator\Recursive\Map')
->array(iterator_to_array($children))
->isEqualTo(['b', 'c', 'd']);
-
- elseif('e' === $key)
+ } elseif ('e' === $key) {
$this
->boolean($iterator->hasChildren())
->isTrue()
@@ -107,11 +102,11 @@ class Map extends Test\Unit\Suite {
->isInstanceOf('Hoa\Iterator\Recursive\Map')
->array(iterator_to_array($children))
->isEqualTo(['f', 'g', 'i']);
-
- elseif('k' === $value)
+ } elseif ('k' === $value) {
$this
->boolean($iterator->hasChildren())
->isFalse();
+ }
}
});
}
diff --git a/Test/Unit/Mock.php b/Test/Unit/Mock.php
index d5c168b..3c431be 100644
--- a/Test/Unit/Mock.php
+++ b/Test/Unit/Mock.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Mock.
*
* Test suite of the mock iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Mock extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Mock extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given($iterator = new LUT\Mock())
->when($result = iterator_to_array($iterator))
@@ -61,8 +59,8 @@ class Mock extends Test\Unit\Suite {
->isEmpty();
}
- public function case_recursive_mock_mock ( ) {
-
+ public function case_recursive_mock_mock()
+ {
$this
->when($iterator = new LUT\Recursive\Mock(new LUT\Mock()))
->then
@@ -72,8 +70,8 @@ class Mock extends Test\Unit\Suite {
->isFalse();
}
- public function case_recursive ( ) {
-
+ public function case_recursive()
+ {
$this
->given(
$map = new LUT\Map(['a', 'b', 'c']),
diff --git a/Test/Unit/Multiple.php b/Test/Unit/Multiple.php
index ef304f0..610162c 100644
--- a/Test/Unit/Multiple.php
+++ b/Test/Unit/Multiple.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Multiple.
*
* Test suite of the multiple iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Multiple extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class Multiple extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$foo = new LUT\Map(['f', 'o', 'o']),
@@ -74,8 +72,8 @@ class Multiple extends Test\Unit\Suite {
]);
}
- public function case_default_value ( ) {
-
+ public function case_default_value()
+ {
$this
->given(
$foobar = new LUT\Map(['f', 'o', 'o', 'b', 'a', 'r']),
@@ -100,8 +98,8 @@ class Multiple extends Test\Unit\Suite {
]);
}
- public function case_empty ( ) {
-
+ public function case_empty()
+ {
$this
->given($multiple = new LUT\Multiple())
->when($result = iterator_to_array($multiple))
diff --git a/Test/Unit/NoRewind.php b/Test/Unit/NoRewind.php
index 2af2379..85b334b 100644
--- a/Test/Unit/NoRewind.php
+++ b/Test/Unit/NoRewind.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\NoRewind.
*
* Test suite of the no-rewind iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class NoRewind extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class NoRewind extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$dummyArray = ['f', 'o', 'o', 'b', 'a', 'r'],
diff --git a/Test/Unit/RegularExpression.php b/Test/Unit/RegularExpression.php
index 9398f1d..a7fbb17 100644
--- a/Test/Unit/RegularExpression.php
+++ b/Test/Unit/RegularExpression.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\RegularExpression.
*
* Test suite of the regular expression iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class RegularExpression extends Test\Unit\Suite {
-
- public function case_classic ( ) {
-
+class RegularExpression extends Test\Unit\Suite
+{
+ public function case_classic()
+ {
$this
->given(
$map = new LUT\Map([
@@ -74,8 +72,8 @@ class RegularExpression extends Test\Unit\Suite {
]);
}
- public function case_recursive ( ) {
-
+ public function case_recursive()
+ {
$this
->given(
$map = new LUT\Recursive\Map([
@@ -95,8 +93,8 @@ class RegularExpression extends Test\Unit\Suite {
]);
}
- public function case_recursive_children_flags ( ) {
-
+ public function case_recursive_children_flags()
+ {
$this
->given(
$map = new LUT\Recursive\Map([
diff --git a/Test/Unit/Repeater.php b/Test/Unit/Repeater.php
index 0bf40a8..409c00c 100644
--- a/Test/Unit/Repeater.php
+++ b/Test/Unit/Repeater.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,27 +36,25 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\Repeater.
*
* Test suite of the repeater iterator.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class Repeater extends Test\Unit\Suite {
-
+class Repeater extends Test\Unit\Suite
+{
private static $_dummyArray = ['f', 'o', 'o', 'b', 'a', 'r'];
- public function case_classic ( ) {
-
+ public function case_classic()
+ {
$this
->given(
$iterator = new LUT\Map(self::$_dummyArray),
@@ -72,8 +70,8 @@ class Repeater extends Test\Unit\Suite {
);
}
- public function case_with_body ( ) {
-
+ public function case_with_body()
+ {
$self = $this;
$this
@@ -83,8 +81,7 @@ class Repeater extends Test\Unit\Suite {
$repeater = new LUT\Repeater(
$iterator,
3,
- function ( $repetition ) use ( $self, &$count ) {
-
+ function ($repetition) use ($self, &$count) {
$this
->integer($repetition)
->isEqualTo($count + 1);
diff --git a/Test/Unit/SplFileInfo.php b/Test/Unit/SplFileInfo.php
index 918f5b4..37c232a 100644
--- a/Test/Unit/SplFileInfo.php
+++ b/Test/Unit/SplFileInfo.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2015, Ivan Enderlin. All rights reserved.
+ * Copyright © 2007-2015, Hoa community. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,23 +36,21 @@
namespace Hoa\Iterator\Test\Unit;
-use Hoa\Test;
use Hoa\Iterator as LUT;
+use Hoa\Test;
/**
* Class \Hoa\Iterator\Test\Unit\SplFileInfo.
*
* Test suite of the SplFileInfo class.
*
- * @author Ivan Enderlin <ivan.enderlin@hoa-project.net>
- * @copyright Copyright © 2007-2015 Ivan Enderlin.
+ * @copyright Copyright © 2007-2015 Hoa community
* @license New BSD License
*/
-
-class SplFileInfo extends Test\Unit\Suite {
-
- public function case_file ( ) {
-
+class SplFileInfo extends Test\Unit\Suite
+{
+ public function case_file()
+ {
$this
->given($pathname = 'hoa://Test/Vfs/Foo.bar')
->when($result = new LUT\SplFileInfo($pathname))
@@ -63,8 +61,8 @@ class SplFileInfo extends Test\Unit\Suite {
->isEqualTo('file');
}
- public function case_directory ( ) {
-
+ public function case_directory()
+ {
$this
->given($pathname = 'hoa://Test/Vfs/Foo?type=directory')
->when($result = new LUT\SplFileInfo($pathname))
@@ -75,8 +73,8 @@ class SplFileInfo extends Test\Unit\Suite {
->isEqualTo('dir');
}
- public function case_path_informations ( ) {
-
+ public function case_path_informations()
+ {
$this
->given(
$relativePath = 'hoa://Test/Vfs/A/B/',
@@ -101,8 +99,8 @@ class SplFileInfo extends Test\Unit\Suite {
->isEqualTo($pathname);
}
- public function case_times ( ) {
-
+ public function case_times()
+ {
$this
->given(
$timestamp = $this->realdom->boundinteger(
@@ -129,8 +127,8 @@ class SplFileInfo extends Test\Unit\Suite {
->isEqualTo($mtime);
}
- public function case_permissions ( ) {
-
+ public function case_permissions()
+ {
$this
->given($pathname = 'hoa://Test/Vfs/Fo.bar?permissions=0744')
->when($result = new LUT\SplFileInfo($pathname))