Skip to content

Commit 5ef71b0

Browse files
committed
migrate from plural to singular names in namespaces
1 parent 5ab104d commit 5ef71b0

File tree

24 files changed

+32
-32
lines changed

24 files changed

+32
-32
lines changed

src/Algorithm/Search/BidirectionalSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929

3030
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3232

3333
/**
3434
* TODO implement AbstractGraphSearch

src/Algorithm/Sorting/TopologicalSort.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
use doganoo\PHPAlgorithms\Common\Interfaces\IGraphSortable;
3232
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\DirectedGraph;
3333
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
34-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
34+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3535
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Stack;
3636

3737
/**

src/Algorithm/Various/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace doganoo\PHPAlgorithms\Algorithm\Various;
2828

29-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
29+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3030
use doganoo\PHPAlgorithms\Datastructure\Table\HashTable;
3131

3232
/**

src/Algorithm/Various/Misc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
3030
use doganoo\PHPAlgorithms\Common\Util\Comparator;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3232

3333

3434
/**

src/Common/Abstracts/AbstractGraph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
use doganoo\PHPAlgorithms\Common\Interfaces\IComparable;
3535
use doganoo\PHPAlgorithms\Common\Util\Comparator;
3636
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
37-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
37+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3838
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Queue;
3939
use doganoo\PHPAlgorithms\Datastructure\Table\HashTable;
4040
use JsonSerializable;

src/Common/Abstracts/AbstractGraphSearch.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
namespace doganoo\PHPAlgorithms\Common\Abstracts;
2828

2929
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
30-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
30+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3131
use function is_callable;
3232

3333
/**

src/Datastructure/Graph/Graph/DirectedGraph.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
namespace doganoo\PHPAlgorithms\Datastructure\Graph\Graph;
2828

2929
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractGraph;
30-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
30+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3131

3232
/**
3333
* Class Graph

src/Datastructure/Graph/Graph/Node.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
use doganoo\PHPAlgorithms\Common\Interfaces\INode;
3030
use doganoo\PHPAlgorithms\Common\Util\Comparator;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3232

3333
/**
3434
* Class Node

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
use doganoo\PHPAlgorithms\Common\Interfaces\INode;
3030
use doganoo\PHPAlgorithms\Common\Util\Comparator;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3232

3333
/**
3434
* Class Node

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* SOFTWARE.
2525
*/
2626

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

2929
use ArrayIterator;
3030
use doganoo\PHPAlgorithms\Algorithm\Sorting\TimSort;
@@ -56,7 +56,7 @@
5656
*
5757
* see here: https://gist.github.com/wwsun/71ebbaded68930884746
5858
*
59-
* @package doganoo\PHPAlgorithms\Lists\ArrayLists
59+
* @package doganoo\PHPAlgorithms\Lists\ArrayList
6060
*/
6161
class ArrayList implements IteratorAggregate, JsonSerializable, IComparable {
6262

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* SOFTWARE.
2525
*/
2626

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

2929
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
3030
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Queue;
@@ -36,7 +36,7 @@
3636
/**
3737
* Class StringBuilder
3838
*
39-
* @package doganoo\PHPAlgorithms\Lists\ArrayLists
39+
* @package doganoo\PHPAlgorithms\Lists\ArrayList
4040
*/
4141
class StringBuilder {
4242
/** @var ArrayList $arrayList */

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
* SOFTWARE.
2525
*/
2626

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

2929
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractLinkedList;
3030
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3131

3232
/**
3333
* Class DoublyLinkedList
3434
*
35-
* @package doganoo\PHPAlgorithms\LinkedLists
35+
* @package doganoo\PHPAlgorithms\LinkedList
3636
*/
3737
class DoublyLinkedList extends AbstractLinkedList {
3838

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424
* SOFTWARE.
2525
*/
2626

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

2929
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractLinkedList;
3030
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3131

3232
/**
3333
* Class SinglyLinkedList
3434
*
35-
* @package doganoo\PHPAlgorithms\LinkedLists
35+
* @package doganoo\PHPAlgorithms\LinkedList
3636
*/
3737
class SinglyLinkedList extends AbstractLinkedList {
3838

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* SOFTWARE.
2525
*/
2626

27-
namespace doganoo\PHPAlgorithms\Datastructure\Maps;
27+
namespace doganoo\PHPAlgorithms\Datastructure\Map;
2828

2929
use doganoo\PHPAlgorithms\Common\Util\Comparator;
3030
use function array_fill;
@@ -35,7 +35,7 @@
3535
/**
3636
* Class Map
3737
*
38-
* @package doganoo\PHPAlgorithms\Datastructure\maps
38+
* @package doganoo\PHPAlgorithms\Datastructure\Map
3939
*/
4040
class Map {
4141

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* SOFTWARE.
2525
*/
2626

27-
namespace doganoo\PHPAlgorithms\Datastructure\Sets;
27+
namespace doganoo\PHPAlgorithms\Datastructure\Set;
2828

2929
use doganoo\PHPAlgorithms\Common\Abstracts\AbstractSet;
3030
use doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException;
@@ -37,7 +37,7 @@
3737
/**
3838
* Class HashSet
3939
*
40-
* @package doganoo\PHPAlgorithms\Datastructure\Sets
40+
* @package doganoo\PHPAlgorithms\Datastructure\Set
4141
*/
4242
class HashSet extends AbstractSet implements ISet {
4343

src/Datastructure/Stackqueue/StackSet.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
3030
use doganoo\PHPAlgorithms\Common\Interfaces\IComparable;
3131
use doganoo\PHPAlgorithms\Common\Util\Comparator;
32-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
32+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3333
use JsonSerializable;
3434

3535
/**

src/Datastructure/Table/HashTable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
use doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException;
3232
use doganoo\PHPAlgorithms\Common\Exception\UnsupportedKeyTypeException;
3333
use doganoo\PHPAlgorithms\Common\Util\MapUtil;
34-
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists\SinglyLinkedList;
34+
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList\SinglyLinkedList;
3535
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3636
use JsonSerializable;
3737

tests/Comparator/ComparatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
use doganoo\PHPAlgorithms\Common\Util\Comparator;
3030
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
31-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3232
use PHPUnit\Framework\TestCase;
3333

3434
class ComparatorTest extends TestCase {

tests/Lists/ArrayLists/ArrayListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace doganoo\PHPAlgorithmsTest\Lists\ArrayLists;
2828

29-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
29+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
3030
use PHPUnit\Framework\TestCase;
3131
use stdClass;
3232

tests/Lists/ArrayLists/StringBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace doganoo\PHPAlgorithmsTest\Lists\ArrayLists;
2828

29-
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\StringBuilder;
29+
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\StringBuilder;
3030
use PHPUnit\Framework\TestCase;
3131

3232
class StringBuilderTest extends TestCase {

tests/Lists/LinkedLists/SinglyLinkedListTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace doganoo\PHPAlgorithmsTest\Lists\LinkedLists;
2828

29-
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists\SinglyLinkedList;
29+
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList\SinglyLinkedList;
3030
use doganoo\PHPAlgorithmsTest\Util\LinkedListUtil;
3131
use PHPUnit\Framework\TestCase;
3232

tests/Maps/NodeTest.php renamed to tests/Map/NodeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* SOFTWARE.
2525
*/
2626

27-
namespace doganoo\PHPAlgorithmsTest\Maps;
27+
namespace doganoo\PHPAlgorithmsTest\Map;
2828

2929
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3030
use PHPUnit\Framework\TestCase;

tests/Sets/HashSetTest.php renamed to tests/Set/HashSetTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@
2424
* SOFTWARE.
2525
*/
2626

27-
namespace doganoo\PHPAlgorithmsTest\Sets;
27+
namespace doganoo\PHPAlgorithmsTest\Set;
2828

2929
use doganoo\PHPAlgorithms\common\Exception\InvalidKeyTypeException;
3030
use doganoo\PHPAlgorithms\Common\Exception\UnsupportedKeyTypeException;
31-
use doganoo\PHPAlgorithms\Datastructure\Sets\HashSet;
31+
use doganoo\PHPAlgorithms\Datastructure\Set\HashSet;
3232
use PHPUnit\Framework\TestCase;
3333

3434
/**

tests/Util/LinkedListUtil.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626

2727
namespace doganoo\PHPAlgorithmsTest\Util;
2828

29-
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists\DoublyLinkedList;
30-
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists\SinglyLinkedList;
29+
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList\DoublyLinkedList;
30+
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList\SinglyLinkedList;
3131
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
3232
use stdClass;
3333

0 commit comments

Comments
 (0)