aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis von Glasow <ashgenesis@gmail.com>2017-01-09 21:38:09 +0100
committerAlexis von Glasow <ashgenesis@gmail.com>2017-01-10 12:59:04 +0100
commit1804913f5c04aae4866afff732bcca8bbb7ae0b2 (patch)
tree08e4afb74f921c9455fee9403f9eaffff33c5972
parentf6f11fc7d51ea990a6f98c5c491ed5b2fa7ca769 (diff)
downloadGraph-1804913f5c04aae4866afff732bcca8bbb7ae0b2.zip
Graph-1804913f5c04aae4866afff732bcca8bbb7ae0b2.tar.gz
Graph-1804913f5c04aae4866afff732bcca8bbb7ae0b2.tar.bz2
Quality: Happy new year!
-rw-r--r--AdjacencyList.php6
-rw-r--r--Exception.php4
-rw-r--r--Graph.php5
-rw-r--r--Iterator/BackwardBreadthFirst.php5
-rw-r--r--Iterator/BackwardDepthFirst.php5
-rw-r--r--Iterator/BreadthFirst.php4
-rw-r--r--Iterator/DepthFirst.php4
-rw-r--r--Iterator/Generic.php5
-rw-r--r--Node.php4
-rw-r--r--SimpleNode.php5
-rw-r--r--Test/Unit/AdjacencyList.php7
-rw-r--r--Test/Unit/Exception.php4
-rw-r--r--Test/Unit/Graph.php5
-rw-r--r--Test/Unit/Iterator/BackwardBreadthFirst.php4
-rw-r--r--Test/Unit/Iterator/BackwardDepthFirst.php4
-rw-r--r--Test/Unit/Iterator/BreadthFirst.php4
-rw-r--r--Test/Unit/Iterator/DepthFirst.php4
-rw-r--r--Test/Unit/Iterator/Generic.php6
-rw-r--r--Test/Unit/SimpleNode.php4
19 files changed, 41 insertions, 48 deletions
diff --git a/AdjacencyList.php b/AdjacencyList.php
index 2e657a0..8ca683b 100644
--- a/AdjacencyList.php
+++ b/AdjacencyList.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +43,7 @@ use Hoa\Iterator;
*
* Graph implementation using an adjacency list.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class AdjacencyList extends Graph
@@ -352,7 +352,7 @@ class AdjacencyList extends Graph
foreach ($this->getNodes() as $nodeId => $node) {
foreach ($this->getChildren($node[self::NODE_VALUE]) as $childId => $child) {
- $out .= ' ' . $nodeId . ' -> ' . $childId . ';' . "\n";
+ $out .= ' ' . $nodeId . ' -> ' . $childId . ';' . "\n";
}
}
diff --git a/Exception.php b/Exception.php
index 90d910b..00ef962 100644
--- a/Exception.php
+++ b/Exception.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +43,7 @@ use Hoa\Exception as HoaException;
*
* Extending the \Hoa\Exception\Exception class.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Exception extends HoaException
diff --git a/Graph.php b/Graph.php
index e0cb6eb..eb4e0da 100644
--- a/Graph.php
+++ b/Graph.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Iterator;
* Abstract graph. One or more implementation of a graph may exists but the
* public API remains the same.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
abstract class Graph implements Iterator\Aggregate
@@ -98,7 +98,6 @@ abstract class Graph implements Iterator\Aggregate
* Get an empty graph.
*
* @param bool $loop Whether loops are allowed.
- * @return void
*/
public function __construct($loop = self::DISALLOW_LOOP)
{
diff --git a/Iterator/BackwardBreadthFirst.php b/Iterator/BackwardBreadthFirst.php
index c5d5586..ea6c02d 100644
--- a/Iterator/BackwardBreadthFirst.php
+++ b/Iterator/BackwardBreadthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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:
@@ -37,7 +37,6 @@
namespace Hoa\Graph\Iterator;
use Hoa\Graph;
-use Hoa\Iterator;
/**
* Class \Hoa\Graph\Iterator\BackwardBreadthFirst.
@@ -45,7 +44,7 @@ use Hoa\Iterator;
* Iterate over the graph with the Backward Breadth-First search algorithm,
* starting from a specific node.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class BackwardBreadthFirst extends BreadthFirst
diff --git a/Iterator/BackwardDepthFirst.php b/Iterator/BackwardDepthFirst.php
index 53537fe..107e30e 100644
--- a/Iterator/BackwardDepthFirst.php
+++ b/Iterator/BackwardDepthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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:
@@ -37,7 +37,6 @@
namespace Hoa\Graph\Iterator;
use Hoa\Graph;
-use Hoa\Iterator;
/**
* Class \Hoa\Graph\Iterator\BackwardDepthFirst.
@@ -45,7 +44,7 @@ use Hoa\Iterator;
* Iterate over the graph with the Backward Depth-First Search algorithm,
* starting from a specific node.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class BackwardDepthFirst extends DepthFirst
diff --git a/Iterator/BreadthFirst.php b/Iterator/BreadthFirst.php
index 30684ff..3257529 100644
--- a/Iterator/BreadthFirst.php
+++ b/Iterator/BreadthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Iterator;
* Iterate over the graph with the Breadth-First search algorithm, starting
* from a specific node.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class BreadthFirst extends Generic implements Iterator\Aggregate
diff --git a/Iterator/DepthFirst.php b/Iterator/DepthFirst.php
index 77610d1..f22cede 100644
--- a/Iterator/DepthFirst.php
+++ b/Iterator/DepthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Iterator;
* Iterate over the graph with the Depth-First Search algorithm, starting from a
* specific node.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class DepthFirst extends Generic implements Iterator\Aggregate
diff --git a/Iterator/Generic.php b/Iterator/Generic.php
index 8113cb6..6b0460d 100644
--- a/Iterator/Generic.php
+++ b/Iterator/Generic.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Graph;
* to, given a specific graph and a starting node, iterators will be able to
* run. The iterator interface must be implemented in the children classes.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
abstract class Generic
@@ -71,7 +71,6 @@ abstract class Generic
*
* @param \Hoa\Graph $graph Graph.
* @param \Hoa\Graph\Node $node Starting node.
- * @return void
* @throws \Hoa\Graph\Exception
*/
public function __construct(Graph $graph, Graph\Node $node)
diff --git a/Node.php b/Node.php
index 306fec4..a7303a4 100644
--- a/Node.php
+++ b/Node.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +41,7 @@ namespace Hoa\Graph;
*
* Each implementor of this interface is a vertex in a graph.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
interface Node
diff --git a/SimpleNode.php b/SimpleNode.php
index 6f45ae0..cc1f53d 100644
--- a/SimpleNode.php
+++ b/SimpleNode.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +41,7 @@ namespace Hoa\Graph;
*
* A very simple node.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class SimpleNode implements Node
@@ -67,7 +67,6 @@ class SimpleNode implements Node
*
* @param string $id ID.
* @param string $value Value.
- * @return void
*/
public function __construct($id, $value = null)
{
diff --git a/Test/Unit/AdjacencyList.php b/Test/Unit/AdjacencyList.php
index 03f8c99..d62b227 100644
--- a/Test/Unit/AdjacencyList.php
+++ b/Test/Unit/AdjacencyList.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,8 +36,8 @@
namespace Hoa\Graph\Test\Unit;
-use Hoa\Graph as LUT;
use Hoa\Graph\AdjacencyList as SUT;
+use Hoa\Graph as LUT;
use Hoa\Test;
/**
@@ -45,7 +45,7 @@ use Hoa\Test;
*
* Test suite of the adjancency list graph implementation.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class AdjacencyList extends Graph
@@ -615,7 +615,6 @@ class AdjacencyList extends Graph
$graph->addNode($n2, [$n4]),
$graph->addNode($n5)
)
- ->dump($graph. '')
->when($result = $graph->__toString())
->then
->string($result)
diff --git a/Test/Unit/Exception.php b/Test/Unit/Exception.php
index 172d775..9b0f8e5 100644
--- a/Test/Unit/Exception.php
+++ b/Test/Unit/Exception.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Test;
*
* Test suite of the exception.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Exception extends Test\Unit\Suite
diff --git a/Test/Unit/Graph.php b/Test/Unit/Graph.php
index 4c36737..21f658e 100644
--- a/Test/Unit/Graph.php
+++ b/Test/Unit/Graph.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +36,6 @@
namespace Hoa\Graph\Test\Unit;
-use Hoa\Iterator;
use Hoa\Test;
use Mock\Hoa\Graph as SUT;
@@ -45,7 +44,7 @@ use Mock\Hoa\Graph as SUT;
*
* Test suite of the graph abstract class.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Graph extends Test\Unit\Suite
diff --git a/Test/Unit/Iterator/BackwardBreadthFirst.php b/Test/Unit/Iterator/BackwardBreadthFirst.php
index f9edfb9..aa940e3 100644
--- a/Test/Unit/Iterator/BackwardBreadthFirst.php
+++ b/Test/Unit/Iterator/BackwardBreadthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Test;
*
* Test suite of the Backward Breadth-First iterator.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class BackwardBreadthFirst extends Test\Unit\Suite
diff --git a/Test/Unit/Iterator/BackwardDepthFirst.php b/Test/Unit/Iterator/BackwardDepthFirst.php
index 84e221b..61a369b 100644
--- a/Test/Unit/Iterator/BackwardDepthFirst.php
+++ b/Test/Unit/Iterator/BackwardDepthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Test;
*
* Test suite of the Backward Depth-First iterator.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class BackwardDepthFirst extends Test\Unit\Suite
diff --git a/Test/Unit/Iterator/BreadthFirst.php b/Test/Unit/Iterator/BreadthFirst.php
index ca62835..2878d6a 100644
--- a/Test/Unit/Iterator/BreadthFirst.php
+++ b/Test/Unit/Iterator/BreadthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Test;
*
* Test suite of the Breadth-First iterator.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class BreadthFirst extends Test\Unit\Suite
diff --git a/Test/Unit/Iterator/DepthFirst.php b/Test/Unit/Iterator/DepthFirst.php
index 0df6645..a958103 100644
--- a/Test/Unit/Iterator/DepthFirst.php
+++ b/Test/Unit/Iterator/DepthFirst.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Test;
*
* Test suite of the Depth-First iterator.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class DepthFirst extends Test\Unit\Suite
diff --git a/Test/Unit/Iterator/Generic.php b/Test/Unit/Iterator/Generic.php
index f8936d6..9779ccb 100644
--- a/Test/Unit/Iterator/Generic.php
+++ b/Test/Unit/Iterator/Generic.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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:
@@ -37,15 +37,15 @@
namespace Hoa\Graph\Test\Unit\Iterator;
use Hoa\Graph as LUT;
-use Mock\Hoa\Graph\Iterator\Generic as SUT;
use Hoa\Test;
+use Mock\Hoa\Graph\Iterator\Generic as SUT;
/**
* Class \Hoa\Graph\Test\Unit\Iterator\Generic.
*
* Test suite of the generic iterator class.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class Generic extends Test\Unit\Suite
diff --git a/Test/Unit/SimpleNode.php b/Test/Unit/SimpleNode.php
index 055ef84..edb4039 100644
--- a/Test/Unit/SimpleNode.php
+++ b/Test/Unit/SimpleNode.php
@@ -8,7 +8,7 @@
*
* New BSD License
*
- * Copyright © 2007-2016, Hoa community. All rights reserved.
+ * Copyright © 2007-2017, 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,7 +45,7 @@ use Hoa\Test;
*
* Test suite of a simple node.
*
- * @copyright Copyright © 2007-2016 Hoa community
+ * @copyright Copyright © 2007-2017 Hoa community
* @license New BSD License
*/
class SimpleNode extends Test\Unit\Suite