Skip to content

Commit

Permalink
Merge pull request #11 from krlv/plural_to_singular_namespaces
Browse files Browse the repository at this point in the history
Migrate from plural to singular names in namespaces
  • Loading branch information
doganoo authored Oct 9, 2019
2 parents 623a75c + 424f770 commit c95ed00
Show file tree
Hide file tree
Showing 25 changed files with 92 additions and 42 deletions.
4 changes: 3 additions & 1 deletion src/Algorithm/Search/BidirectionalSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -28,7 +30,7 @@


use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;

/**
* TODO implement AbstractGraphSearch
Expand Down
6 changes: 4 additions & 2 deletions src/Algorithm/Sorting/TopologicalSort.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* MIT License
*
* Copyright (c) 2018 Dogan Ucar
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -31,7 +33,7 @@
use doganoo\PHPAlgorithms\Common\Interfaces\IGraphSortable;
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\DirectedGraph;
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Stack;

/**
Expand Down
4 changes: 3 additions & 1 deletion src/Algorithm/Various/Converter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -26,7 +28,7 @@

namespace doganoo\PHPAlgorithms\Algorithm\Various;

use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Table\HashTable;

/**
Expand Down
4 changes: 3 additions & 1 deletion src/Algorithm/Various/Misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -28,7 +30,7 @@

use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
use doganoo\PHPAlgorithms\Common\Util\Comparator;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;


/**
Expand Down
4 changes: 3 additions & 1 deletion src/Common/Abstracts/AbstractGraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand Down Expand Up @@ -34,7 +36,7 @@
use doganoo\PHPAlgorithms\Common\Interfaces\IComparable;
use doganoo\PHPAlgorithms\Common\Util\Comparator;
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Queue;
use doganoo\PHPAlgorithms\Datastructure\Table\HashTable;
use JsonSerializable;
Expand Down
6 changes: 4 additions & 2 deletions src/Common/Abstracts/AbstractGraphSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* MIT License
*
* Copyright (c) 2018 Dogan Ucar
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -27,7 +29,7 @@
namespace doganoo\PHPAlgorithms\Common\Abstracts;

use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
use function is_callable;

/**
Expand Down
6 changes: 4 additions & 2 deletions src/Datastructure/Graph/Graph/DirectedGraph.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* MIT License
*
* Copyright (c) 2018 Dogan Ucar
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -27,7 +29,7 @@
namespace doganoo\PHPAlgorithms\Datastructure\Graph\Graph;

use doganoo\PHPAlgorithms\Common\Abstracts\AbstractGraph;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;

/**
* Class Graph
Expand Down
6 changes: 4 additions & 2 deletions src/Datastructure/Graph/Graph/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* MIT License
*
* Copyright (c) 2018 Dogan Ucar
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,7 +30,7 @@

use doganoo\PHPAlgorithms\Common\Interfaces\INode;
use doganoo\PHPAlgorithms\Common\Util\Comparator;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;

/**
* Class Node
Expand Down
6 changes: 4 additions & 2 deletions src/Datastructure/Graph/Tree/Tree/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* MIT License
*
* Copyright (c) 2018 Dogan Ucar
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,7 +30,7 @@

use doganoo\PHPAlgorithms\Common\Interfaces\INode;
use doganoo\PHPAlgorithms\Common\Util\Comparator;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;

/**
* Class Node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -24,7 +26,7 @@
* SOFTWARE.
*/

namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists;
namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList;

use ArrayIterator;
use doganoo\PHPAlgorithms\Algorithm\Sorting\TimSort;
Expand Down Expand Up @@ -56,7 +58,7 @@
*
* see here: https://gist.github.com/wwsun/71ebbaded68930884746
*
* @package doganoo\PHPAlgorithms\Lists\ArrayLists
* @package doganoo\PHPAlgorithms\Lists\ArrayList
*/
class ArrayList implements IteratorAggregate, JsonSerializable, IComparable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -24,7 +26,7 @@
* SOFTWARE.
*/

namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists;
namespace doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList;

use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
use doganoo\PHPAlgorithms\Datastructure\Stackqueue\Queue;
Expand All @@ -36,7 +38,7 @@
/**
* Class StringBuilder
*
* @package doganoo\PHPAlgorithms\Lists\ArrayLists
* @package doganoo\PHPAlgorithms\Lists\ArrayList
*/
class StringBuilder {
/** @var ArrayList $arrayList */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -24,15 +26,15 @@
* SOFTWARE.
*/

namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists;
namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList;

use doganoo\PHPAlgorithms\Common\Abstracts\AbstractLinkedList;
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;

/**
* Class DoublyLinkedList
*
* @package doganoo\PHPAlgorithms\LinkedLists
* @package doganoo\PHPAlgorithms\LinkedList
*/
class DoublyLinkedList extends AbstractLinkedList {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -24,15 +26,15 @@
* SOFTWARE.
*/

namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists;
namespace doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList;

use doganoo\PHPAlgorithms\Common\Abstracts\AbstractLinkedList;
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;

/**
* Class SinglyLinkedList
*
* @package doganoo\PHPAlgorithms\LinkedLists
* @package doganoo\PHPAlgorithms\LinkedList
*/
class SinglyLinkedList extends AbstractLinkedList {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -24,7 +26,7 @@
* SOFTWARE.
*/

namespace doganoo\PHPAlgorithms\Datastructure\Maps;
namespace doganoo\PHPAlgorithms\Datastructure\Map;

use doganoo\PHPAlgorithms\Common\Util\Comparator;
use function array_fill;
Expand All @@ -35,7 +37,7 @@
/**
* Class Map
*
* @package doganoo\PHPAlgorithms\Datastructure\maps
* @package doganoo\PHPAlgorithms\Datastructure\Map
*/
class Map {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -24,7 +26,7 @@
* SOFTWARE.
*/

namespace doganoo\PHPAlgorithms\Datastructure\Sets;
namespace doganoo\PHPAlgorithms\Datastructure\Set;

use doganoo\PHPAlgorithms\Common\Abstracts\AbstractSet;
use doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException;
Expand All @@ -37,7 +39,7 @@
/**
* Class HashSet
*
* @package doganoo\PHPAlgorithms\Datastructure\Sets
* @package doganoo\PHPAlgorithms\Datastructure\Set
*/
class HashSet extends AbstractSet implements ISet {

Expand Down
6 changes: 4 additions & 2 deletions src/Datastructure/Stackqueue/StackSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
/**
* MIT License
*
* Copyright (c) 2018 Dogan Ucar
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -29,7 +31,7 @@
use doganoo\PHPAlgorithms\Common\Exception\IndexOutOfBoundsException;
use doganoo\PHPAlgorithms\Common\Interfaces\IComparable;
use doganoo\PHPAlgorithms\Common\Util\Comparator;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
use JsonSerializable;

/**
Expand Down
4 changes: 3 additions & 1 deletion src/Datastructure/Table/HashTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -31,7 +33,7 @@
use doganoo\PHPAlgorithms\Common\Exception\InvalidKeyTypeException;
use doganoo\PHPAlgorithms\Common\Exception\UnsupportedKeyTypeException;
use doganoo\PHPAlgorithms\Common\Util\MapUtil;
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedLists\SinglyLinkedList;
use doganoo\PHPAlgorithms\Datastructure\Lists\LinkedList\SinglyLinkedList;
use doganoo\PHPAlgorithms\Datastructure\Lists\Node;
use JsonSerializable;

Expand Down
4 changes: 3 additions & 1 deletion tests/Comparator/ComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
*
* Copyright (c) 2018 Dogan Ucar, <[email protected]>
*
* @author Eugene Kirillov <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
Expand All @@ -28,7 +30,7 @@

use doganoo\PHPAlgorithms\Common\Util\Comparator;
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayList\ArrayList;
use PHPUnit\Framework\TestCase;

class ComparatorTest extends TestCase {
Expand Down
Loading

0 comments on commit c95ed00

Please sign in to comment.