22
33namespace Fhaculty \Graph \Edge ;
44
5- use Fhaculty \Graph \Vertex ;
6- use Fhaculty \Graph \Set \Edges ;
7- use Fhaculty \Graph \Set \Vertices ;
8- use Fhaculty \Graph \Set \VerticesAggregate ;
9- use Fhaculty \Graph \Graph ;
10- use Fhaculty \Graph \Exception \LogicException ;
11- use Fhaculty \Graph \Exception \RangeException ;
12- use Fhaculty \Graph \Exception \UnderflowException ;
13- use Fhaculty \Graph \Exception \InvalidArgumentException ;
14- use Fhaculty \Graph \Exception \BadMethodCallException ;
155use Fhaculty \Graph \Attribute \AttributeAware ;
166use Fhaculty \Graph \Attribute \AttributeBagReference ;
7+ use Fhaculty \Graph \Exception \BadMethodCallException ;
8+ use Fhaculty \Graph \Exception \InvalidArgumentException ;
9+ use Fhaculty \Graph \Exception \LogicException ;
10+ use Fhaculty \Graph \Exception \RangeException ;
11+ use Fhaculty \Graph \Graph ;
12+ use Fhaculty \Graph \Set \Vertices ;
13+ use Fhaculty \Graph \Set \VerticesAggregate ;
14+ use Fhaculty \Graph \Vertex ;
1715
1816abstract class Base implements VerticesAggregate, AttributeAware
1917{
2018 /**
2119 * weight of this edge
2220 *
2321 * @var float|int|NULL
24- * @see Edge ::getWeight()
22+ * @see self ::getWeight()
2523 */
2624 protected $ weight = NULL ;
2725
2826 /**
2927 * maximum capacity (maximum flow)
3028 *
3129 * @var float|int|NULL
32- * @see Edge ::getCapacity()
30+ * @see self ::getCapacity()
3331 */
3432 protected $ capacity = NULL ;
3533
3634 /**
3735 * flow (capacity currently in use)
3836 *
3937 * @var float|int|NULL
40- * @see Edge ::getFlow()
38+ * @see self ::getFlow()
4139 */
4240 protected $ flow = NULL ;
4341
@@ -90,17 +88,17 @@ abstract public function isLoop();
9088 * @param Vertex $startVertex
9189 * @return Vertex
9290 * @throws InvalidArgumentException if given $startVertex is not a valid start
93- * @see Edge ::hasEdgeFrom() to check if given start is valid
91+ * @see self ::hasEdgeFrom() to check if given start is valid
9492 */
9593 abstract public function getVertexToFrom (Vertex $ startVertex );
9694
9795 /**
9896 * get start vertex which can reach us(the given end vertex) with this edge
9997 *
100- * @param Vertex $startVertex
98+ * @param Vertex $endVertex
10199 * @return Vertex
102100 * @throws InvalidArgumentException if given $startVertex is not a valid end
103- * @see Edge ::hasEdgeFrom() to check if given start is valid
101+ * @see self ::hasEdgeFrom() to check if given start is valid
104102 */
105103 abstract public function getVertexFromTo (Vertex $ endVertex );
106104
@@ -117,9 +115,9 @@ public function getWeight()
117115 /**
118116 * set new weight for edge
119117 *
120- * @param float|int|NULL $weight new numeric weight of edge or NULL=unset weight
121- * @return Edge $this (chainable)
122- * @throws DomainException if given weight is not numeric
118+ * @param float|int|NULL $weight new numeric weight of edge or NULL=unset weight
119+ * @return self $this (chainable)
120+ * @throws InvalidArgumentException if given weight is not numeric
123121 */
124122 public function setWeight ($ weight )
125123 {
@@ -159,7 +157,7 @@ public function getCapacityRemaining()
159157 * set new total capacity of this edge
160158 *
161159 * @param float|int|NULL $capacity
162- * @return Edge $this (chainable)
160+ * @return self $this (chainable)
163161 * @throws InvalidArgumentException if $capacity is invalid (not numeric or negative)
164162 * @throws RangeException if current flow exceeds new capacity
165163 */
@@ -195,7 +193,7 @@ public function getFlow()
195193 * set new total flow (capacity currently in use)
196194 *
197195 * @param float|int|NULL $flow
198- * @return Edge $this (chainable)
196+ * @return self $this (chainable)
199197 * @throws InvalidArgumentException if $flow is invalid (not numeric or negative)
200198 * @throws RangeException if flow exceeds current maximum capacity
201199 */
@@ -262,7 +260,7 @@ public function destroy()
262260 /**
263261 * create new clone of this edge between adjacent vertices
264262 *
265- * @return Edge new edge
263+ * @return self new edge
266264 * @uses Graph::createEdgeClone()
267265 */
268266 public function createEdgeClone ()
@@ -273,7 +271,7 @@ public function createEdgeClone()
273271 /**
274272 * create new clone of this edge inverted (in opposite direction) between adjacent vertices
275273 *
276- * @return Edge new edge
274+ * @return self new edge
277275 * @uses Graph::createEdgeCloneInverted()
278276 */
279277 public function createEdgeCloneInverted ()
@@ -284,7 +282,7 @@ public function createEdgeCloneInverted()
284282 /**
285283 * do NOT allow cloning of objects
286284 *
287- * @throws Exception
285+ * @throws BadMethodCallException
288286 */
289287 private function __clone ()
290288 {
0 commit comments