Skip to content

Commit c95ed00

Browse files
authored
Merge pull request #11 from krlv/plural_to_singular_namespaces
Migrate from plural to singular names in namespaces
2 parents 623a75c + 424f770 commit c95ed00

25 files changed

+92
-42
lines changed

src/Algorithm/Search/BidirectionalSearch.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -28,7 +30,7 @@
2830

2931

3032
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
33+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3234

3335
/**
3436
* TODO implement AbstractGraphSearch

src/Algorithm/Sorting/TopologicalSort.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* MIT License
55
*
6-
* Copyright (c) 2018 Dogan Ucar
6+
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
7+
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
79
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
@@ -31,7 +33,7 @@
3133
use doganoo\PHPAlgorithms\Common\Interfaces\IGraphSortable;
3234
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\DirectedGraph;
3335
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
34-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
36+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3537
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Stack;
3638

3739
/**

src/Algorithm/Various/Converter.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -26,7 +28,7 @@
2628

2729
namespace doganoo\PHPAlgorithms\Algorithm\Various;
2830

29-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3032
use doganoo\PHPAlgorithms\Datastructure\Table\HashTable;
3133

3234
/**

src/Algorithm/Various/Misc.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -28,7 +30,7 @@
2830

2931
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
3032
use doganoo\PHPAlgorithms\Common\Util\Comparator;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
33+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3234

3335

3436
/**

src/Common/Abstracts/AbstractGraph.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -34,7 +36,7 @@
3436
use doganoo\PHPAlgorithms\Common\Interfaces\IComparable;
3537
use doganoo\PHPAlgorithms\Common\Util\Comparator;
3638
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
37-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
39+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3840
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Queue;
3941
use doganoo\PHPAlgorithms\Datastructure\Table\HashTable;
4042
use JsonSerializable;

src/Common/Abstracts/AbstractGraphSearch.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* MIT License
55
*
6-
* Copyright (c) 2018 Dogan Ucar
6+
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
7+
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
79
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +29,7 @@
2729
namespace doganoo\PHPAlgorithms\Common\Abstracts;
2830

2931
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
30-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
32+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3133
use function is_callable;
3234

3335
/**

src/Datastructure/Graph/Graph/DirectedGraph.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* MIT License
55
*
6-
* Copyright (c) 2018 Dogan Ucar
6+
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
7+
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
79
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +29,7 @@
2729
namespace doganoo\PHPAlgorithms\Datastructure\Graph\Graph;
2830

2931
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractGraph;
30-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
32+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3133

3234
/**
3335
* Class Graph

src/Datastructure/Graph/Graph/Node.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* MIT License
55
*
6-
* Copyright (c) 2018 Dogan Ucar
6+
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
7+
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
79
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +30,7 @@
2830

2931
use doganoo\PHPAlgorithms\Common\Interfaces\INode;
3032
use doganoo\PHPAlgorithms\Common\Util\Comparator;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
33+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3234

3335
/**
3436
* Class Node

src/Datastructure/Graph/Tree/Tree/Node.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* MIT License
55
*
6-
* Copyright (c) 2018 Dogan Ucar
6+
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
7+
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
79
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
@@ -28,7 +30,7 @@
2830

2931
use doganoo\PHPAlgorithms\Common\Interfaces\INode;
3032
use doganoo\PHPAlgorithms\Common\Util\Comparator;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
33+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3234

3335
/**
3436
* Class Node

src/Datastructure/Lists/ArrayLists/ArrayList.php renamed to src/Datastructure/Lists/ArrayList/ArrayList.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -24,7 +26,7 @@
2426
* SOFTWARE.
2527
*/
2628

27-
namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists;
29+
namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList;
2830

2931
use ArrayIterator;
3032
use doganoo\PHPAlgorithms\Algorithm\Sorting\TimSort;
@@ -56,7 +58,7 @@
5658
*
5759
* see here: https://gist.github.com/wwsun/71ebbaded68930884746
5860
*
59-
* @package doganoo\PHPAlgorithms\Lists\ArrayLists
61+
* @package doganoo\PHPAlgorithms\Lists\ArrayList
6062
*/
6163
class ArrayList implements IteratorAggregate, JsonSerializable, IComparable {
6264

src/Datastructure/Lists/ArrayLists/StringBuilder.php renamed to src/Datastructure/Lists/ArrayList/StringBuilder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -24,7 +26,7 @@
2426
* SOFTWARE.
2527
*/
2628

27-
namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists;
29+
namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList;
2830

2931
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
3032
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Queue;
@@ -36,7 +38,7 @@
3638
/**
3739
* Class StringBuilder
3840
*
39-
* @package doganoo\PHPAlgorithms\Lists\ArrayLists
41+
* @package doganoo\PHPAlgorithms\Lists\ArrayList
4042
*/
4143
class StringBuilder {
4244
/** @var ArrayList $arrayList */

src/Datastructure/Lists/LinkedLists/DoublyLinkedList.php renamed to src/Datastructure/Lists/LinkedList/DoublyLinkedList.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -24,15 +26,15 @@
2426
* SOFTWARE.
2527
*/
2628

27-
namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists;
29+
namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList;
2830

2931
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractLinkedList;
3032
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3133

3234
/**
3335
* Class DoublyLinkedList
3436
*
35-
* @package doganoo\PHPAlgorithms\LinkedLists
37+
* @package doganoo\PHPAlgorithms\LinkedList
3638
*/
3739
class DoublyLinkedList extends AbstractLinkedList {
3840

src/Datastructure/Lists/LinkedLists/SinglyLinkedList.php renamed to src/Datastructure/Lists/LinkedList/SinglyLinkedList.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -24,15 +26,15 @@
2426
* SOFTWARE.
2527
*/
2628

27-
namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists;
29+
namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList;
2830

2931
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractLinkedList;
3032
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3133

3234
/**
3335
* Class SinglyLinkedList
3436
*
35-
* @package doganoo\PHPAlgorithms\LinkedLists
37+
* @package doganoo\PHPAlgorithms\LinkedList
3638
*/
3739
class SinglyLinkedList extends AbstractLinkedList {
3840

src/Datastructure/Maps/Map.php renamed to src/Datastructure/Map/Map.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -24,7 +26,7 @@
2426
* SOFTWARE.
2527
*/
2628

27-
namespace doganoo\PHPAlgorithms\Datastructure\Maps;
29+
namespace doganoo\PHPAlgorithms\Datastructure\Map;
2830

2931
use doganoo\PHPAlgorithms\Common\Util\Comparator;
3032
use function array_fill;
@@ -35,7 +37,7 @@
3537
/**
3638
* Class Map
3739
*
38-
* @package doganoo\PHPAlgorithms\Datastructure\maps
40+
* @package doganoo\PHPAlgorithms\Datastructure\Map
3941
*/
4042
class Map {
4143

src/Datastructure/Sets/HashSet.php renamed to src/Datastructure/Set/HashSet.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -24,7 +26,7 @@
2426
* SOFTWARE.
2527
*/
2628

27-
namespace doganoo\PHPAlgorithms\Datastructure\Sets;
29+
namespace doganoo\PHPAlgorithms\Datastructure\Set;
2830

2931
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractSet;
3032
use doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException;
@@ -37,7 +39,7 @@
3739
/**
3840
* Class HashSet
3941
*
40-
* @package doganoo\PHPAlgorithms\Datastructure\Sets
42+
* @package doganoo\PHPAlgorithms\Datastructure\Set
4143
*/
4244
class HashSet extends AbstractSet implements ISet {
4345

src/Datastructure/Stackqueue/StackSet.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
/**
44
* MIT License
55
*
6-
* Copyright (c) 2018 Dogan Ucar
6+
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
7+
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
79
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
@@ -29,7 +31,7 @@
2931
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
3032
use doganoo\PHPAlgorithms\Common\Interfaces\IComparable;
3133
use doganoo\PHPAlgorithms\Common\Util\Comparator;
32-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
34+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3335
use JsonSerializable;
3436

3537
/**

src/Datastructure/Table/HashTable.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -31,7 +33,7 @@
3133
use doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException;
3234
use doganoo\PHPAlgorithms\Common\Exception\UnsupportedKeyTypeException;
3335
use doganoo\PHPAlgorithms\Common\Util\MapUtil;
34-
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists\SinglyLinkedList;
36+
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList\SinglyLinkedList;
3537
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3638
use JsonSerializable;
3739

tests/Comparator/ComparatorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*
66
* Copyright (c) 2018 Dogan Ucar, <dogan@dogan-ucar.de>
77
*
8+
* @author Eugene Kirillov <eug.krlv@gmail.com>
9+
*
810
* Permission is hereby granted, free of charge, to any person obtaining a copy
911
* of this software and associated documentation files (the "Software"), to deal
1012
* in the Software without restriction, including without limitation the rights
@@ -28,7 +30,7 @@
2830

2931
use doganoo\PHPAlgorithms\Common\Util\Comparator;
3032
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
33+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3234
use PHPUnit\Framework\TestCase;
3335

3436
class ComparatorTest extends TestCase {

0 commit comments

Comments
 (0)