Skip to content

Commit 5bb6790

Browse files
committed
Fix typo on class name :b
1 parent 87bd869 commit 5bb6790

File tree

6 files changed

+30
-30
lines changed

6 files changed

+30
-30
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Shoperti Ciud
1+
# Shoperti Cuid

composer.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "shoperti/ciud",
2+
"name": "shoperti/cuid",
33
"description": "Collision-resistant ids optimized for horizontal scaling and performance.",
44
"license": "MIT",
55
"keywords": [
6-
"ciud",
6+
"cuid",
77
"shoperti",
88
"php"
99
],
@@ -15,12 +15,12 @@
1515
},
1616
"autoload": {
1717
"psr-4": {
18-
"Shoperti\\Ciud\\": "src/"
18+
"Shoperti\\Cuid\\": "src/"
1919
}
2020
},
2121
"autoload-dev": {
2222
"psr-4": {
23-
"Shoperti\\Tests\\Ciud\\": "tests/"
23+
"Shoperti\\Tests\\Cuid\\": "tests/"
2424
}
2525
},
2626
"extra": {

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
verbose="true"
1515
>
1616
<testsuites>
17-
<testsuite name="Shoperti Ciud Test Suite">
17+
<testsuite name="Shoperti Cuid Test Suite">
1818
<directory suffix="Test.php">./tests</directory>
1919
</testsuite>
2020
</testsuites>

src/Ciud.php src/Cuid.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,46 +9,46 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Shoperti\Ciud;
12+
namespace Shoperti\Cuid;
1313

1414
/**
15-
* This is the Ciud class.
15+
* This is the Cuid class.
1616
*
1717
* @author Joseph Cohen <[email protected]>
1818
*/
19-
class Ciud
19+
class Cuid
2020
{
2121
/**
2222
* The factory to use when creating UUIDs.
2323
*
24-
* @var \Shoperti\Ciud\CiudFactory
24+
* @var \Shoperti\Cuid\CuidFactory
2525
*/
2626
private static $factory = null;
2727

2828
/**
29-
* Returns the currently set factory used to create Ciuds.
29+
* Returns the currently set factory used to create Cuids.
3030
*
31-
* @return \Shoperti\Ciud\CiudFactory
31+
* @return \Shoperti\Cuid\CuidFactory
3232
*/
3333
public static function getFactory()
3434
{
3535
if (!self::$factory) {
36-
self::$factory = new CiudFactory();
36+
self::$factory = new CuidFactory();
3737
}
3838

3939
return self::$factory;
4040
}
4141

4242
/**
43-
* Generates a new ciud.
43+
* Generates a new Cuid.
4444
*
4545
* @param string|null $prefix
4646
*
4747
* @return string
4848
*/
49-
public static function ciud($prefix = null)
49+
public static function Cuid($prefix = null)
5050
{
51-
return static::getFactory()->ciud($prefix);
51+
return static::getFactory()->Cuid($prefix);
5252
}
5353

5454
/**

src/CiudFactory.php src/CuidFactory.php

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Shoperti\Ciud;
12+
namespace Shoperti\Cuid;
1313

1414
/**
15-
* This is the Ciud class.
15+
* This is the Cuid class.
1616
*
1717
* @author Joseph Cohen <[email protected]>
1818
*/
19-
class CiudFactory
19+
class CuidFactory
2020
{
2121
/**
2222
* The base string constant.
@@ -47,7 +47,7 @@ class CiudFactory
4747
private $discreteValues;
4848

4949
/**
50-
* Creates a new ciud factory instance.
50+
* Creates a new Cuid factory instance.
5151
*
5252
* @return void
5353
*/
@@ -145,13 +145,13 @@ protected function fingerprint()
145145
}
146146

147147
/**
148-
* Generates a new ciud.
148+
* Generates a new Cuid.
149149
*
150150
* @param string|null $prefix
151151
*
152152
* @return string
153153
*/
154-
public function ciud($prefix = null)
154+
public function Cuid($prefix = null)
155155
{
156156
// Starting with a lowercase letter makes
157157
// it HTML element ID friendly.

tests/CiudTest.php tests/CuidTest.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Shoperti\Tests\Ciud;
12+
namespace Shoperti\Tests\Cuid;
1313

14-
use Shoperti\Ciud\Ciud;
14+
use Shoperti\Cuid\Cuid;
1515

1616
/**
17-
* This is the Ciud test class.
17+
* This is the Cuid test class.
1818
*
1919
* @author Joseph Cohen <[email protected]>
2020
*/
21-
class CiudTest extends \PHPUnit_Framework_TestCase
21+
class CuidTest extends \PHPUnit_Framework_TestCase
2222
{
2323
const MAX = 100000;
2424

2525
/** @test */
2626
function it_shoud_return_string()
2727
{
28-
$ciud = Ciud::ciud();
28+
$Cuid = Cuid::Cuid();
2929

30-
$this->assertInternalType('string', $ciud);
30+
$this->assertInternalType('string', $Cuid);
3131
}
3232

3333
/** @test */
@@ -38,7 +38,7 @@ function it_should_not_collide()
3838
$pass = true;
3939

4040
while ($i < self::MAX) {
41-
$id = Ciud::ciud();
41+
$id = Cuid::Cuid();
4242

4343
if (!isset($ids[$id])) {
4444
$ids[$id] = $id;
@@ -61,7 +61,7 @@ function it_should_not_collide_making_slug()
6161
$pass = true;
6262

6363
while ($i < self::MAX) {
64-
$id = Ciud::slug();
64+
$id = Cuid::slug();
6565

6666
if (!isset($ids[$id])) {
6767
$ids[$id] = $id;

0 commit comments

Comments
 (0)