Permalink
Browse files

Fixed namespace

  • Loading branch information...
1 parent 1c08cab commit 4810c8adfd5bd2545f6dd701b885cb67dc605da5 @jeremyFreeAgent committed Nov 23, 2012
View
@@ -1,2 +1,3 @@
vendor
bin
+composer.lock
View
@@ -50,7 +50,7 @@ Create a Bitter with a Redis client (Predis as example):
.. code-block:: php
$redisClient = new \Predis\Client();
- $bitter = new \Bitter($redisClient);
+ $bitter = new FreeAgent\Bitter($redisClient);
Mark user 404 as active and has been kicked by Chuck Norris:
@@ -73,7 +73,7 @@ Test if user 404 as been kicked by Chuck Norris this week:
.. code-block:: php
- $currentWeek = new \Bitter\Event\Week('kicked_by_chuck_norris');
+ $currentWeek = new FreeAgent\Bitter\Event\Week('kicked_by_chuck_norris');
if ($bitter->in(404, $currentWeek) {
echo 'User with id 404 has been kicked by Chuck Norris this week.';
@@ -85,7 +85,7 @@ How many users have been active yesterday:
.. code-block:: php
- $yesterday = new \Bitter\Event\Day('active', new \DateTime('yesterday'));
+ $yesterday = new FreeAgent\Bitter\Event\Day('active', new \DateTime('yesterday'));
echo 'Yesterday: ' . $bitter->count($yesterday) . ' users has been active.';
@@ -95,8 +95,8 @@ How many users that were active yesterday are active today:
.. code-block:: php
- $today = new \Bitter\Event\Day('active', new \DateTime());
- $yesterday = new \Bitter\Event\Day('active', new \DateTime('yesterday'));
+ $today = new FreeAgent\Bitter\Event\Day('active', new \DateTime());
+ $yesterday = new FreeAgent\Bitter\Event\Day('active', new \DateTime('yesterday'));
$count = $bitter
->bitOpAnd('bit_op_example', $today, $yesterday)
@@ -111,8 +111,8 @@ Test if user 13 was active yesterday and is active today:
.. code-block:: php
- $today = new \Bitter\Event\Day('active', new \DateTime());
- $yesterday = new \Bitter\Event\Day('active', new \DateTime('yesterday'));
+ $today = new FreeAgent\Bitter\Event\Day('active', new \DateTime());
+ $yesterday = new FreeAgent\Bitter\Event\Day('active', new \DateTime('yesterday'));
$active = $bitter
->bitOpAnd('bit_op_example', $today, $yesterday)
View
@@ -25,8 +25,12 @@
"predis/predis": "0.8.*"
},
"autoload": {
- "psr-0": { "Bitter": "src/" }
+ "psr-0": {
+ "FreeAgent\\Bitter": "src/"
+ },
+ "classmap": ["src/"]
@stephpy

stephpy Nov 24, 2012

Contributor

Why this ?

},
+ "target-dir": "FreeAgent/Bitter",
"config": {
"bin-dir": "bin"
}
@@ -1,13 +1,13 @@
<?php
-namespace Bitter;
+namespace FreeAgent\Bitter;
use \DateTime;
-use Bitter\Event\Month;
-use Bitter\Event\Week;
-use Bitter\Event\Day;
-use Bitter\Event\Hour;
-use Bitter\Event\EventInterface;
+use FreeAgent\Bitter\Event\Month;
+use FreeAgent\Bitter\Event\Week;
+use FreeAgent\Bitter\Event\Day;
+use FreeAgent\Bitter\Event\Hour;
+use FreeAgent\Bitter\Event\EventInterface;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -1,6 +1,6 @@
<?php
-namespace Bitter\Event;
+namespace FreeAgent\Bitter\Event;
use \DateTime;
use \Exception;
@@ -1,6 +1,6 @@
<?php
-namespace Bitter\Event;
+namespace FreeAgent\Bitter\Event;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -1,6 +1,6 @@
<?php
-namespace Bitter\Event;
+namespace FreeAgent\Bitter\Event;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -1,6 +1,6 @@
<?php
-namespace Bitter\Event;
+namespace FreeAgent\Bitter\Event;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -1,6 +1,6 @@
<?php
-namespace Bitter\Event;
+namespace FreeAgent\Bitter\Event;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -1,6 +1,6 @@
<?php
-namespace Bitter\Event;
+namespace FreeAgent\Bitter\Event;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
View
@@ -1,13 +1,13 @@
<?php
-namespace Bitter\tests\units;
+namespace FreeAgent\Bitter\tests\units;
require_once __DIR__ . '/../../vendor/autoload.php';
use \mageekguy\atoum;
use \DateTime;
-use Bitter\Bitter as TestedBitter;
-use Bitter\Event\Day;
+use FreeAgent\Bitter\Bitter as TestedBitter;
+use FreeAgent\Bitter\Event\Day;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -1,13 +1,12 @@
<?php
-namespace Bitter\tests\units\Event;
+namespace FreeAgent\Bitter\tests\units\Event;
require_once __DIR__ . '/../../../vendor/autoload.php';
use \mageekguy\atoum;
use \DateTime;
-use Bitter\Event\Day;
-use Bitter\Event\AbstractEvent as TestedAbstractEvent;
+use FreeAgent\Bitter\Event\AbstractEvent as TestedAbstractEvent;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -18,7 +17,7 @@ public function testConstruct()
{
$dateTime = DateTime::createFromFormat('Y-m-d H:i:s', '2012-11-06 15:30:45');
- $event = new \mock\Bitter\Event\AbstractEvent('drink_a_bitter_beer', $dateTime);
+ $event = new \mock\FreeAgent\Bitter\Event\AbstractEvent('drink_a_bitter_beer', $dateTime);
$this
->variable($event->getDateTime())
@@ -34,7 +33,7 @@ public function testGetKey()
{
$dateTime = DateTime::createFromFormat('Y-m-d H:i:s', '2012-11-06 15:30:45');
- $event = new \mock\Bitter\Event\AbstractEvent('drink_a_bitter_beer', $dateTime);
+ $event = new \mock\FreeAgent\Bitter\Event\AbstractEvent('drink_a_bitter_beer', $dateTime);
$event->getMockController()->getDateTimeFormated = '2012-11-06';
@@ -1,12 +1,12 @@
<?php
-namespace Bitter\tests\units\Event;
+namespace FreeAgent\Bitter\tests\units\Event;
require_once __DIR__ . '/../../../vendor/autoload.php';
use \mageekguy\atoum;
use \DateTime;
-use Bitter\Event\Day as TestedDay;
+use FreeAgent\Bitter\Event\Day as TestedDay;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -19,8 +19,8 @@ public function testConstruct()
$this
->object($day)
- ->isInstanceOf('Bitter\Event\AbstractEvent')
- ->isInstanceOf('Bitter\Event\EventInterface')
+ ->isInstanceOf('FreeAgent\Bitter\Event\AbstractEvent')
+ ->isInstanceOf('FreeAgent\Bitter\Event\EventInterface')
;
}
@@ -1,12 +1,12 @@
<?php
-namespace Bitter\tests\units\Event;
+namespace FreeAgent\Bitter\tests\units\Event;
require_once __DIR__ . '/../../../vendor/autoload.php';
use \mageekguy\atoum;
use \DateTime;
-use Bitter\Event\Hour as TestedHour;
+use FreeAgent\Bitter\Event\Hour as TestedHour;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -19,8 +19,8 @@ public function testConstruct()
$this
->object($hour)
- ->isInstanceOf('Bitter\Event\AbstractEvent')
- ->isInstanceOf('Bitter\Event\EventInterface')
+ ->isInstanceOf('FreeAgent\Bitter\Event\AbstractEvent')
+ ->isInstanceOf('FreeAgent\Bitter\Event\EventInterface')
;
}
@@ -1,12 +1,12 @@
<?php
-namespace Bitter\tests\units\Event;
+namespace FreeAgent\Bitter\tests\units\Event;
require_once __DIR__ . '/../../../vendor/autoload.php';
use \mageekguy\atoum;
use \DateTime;
-use Bitter\Event\Month as TestedMonth;
+use FreeAgent\Bitter\Event\Month as TestedMonth;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -19,8 +19,8 @@ public function testConstruct()
$this
->object($month)
- ->isInstanceOf('Bitter\Event\AbstractEvent')
- ->isInstanceOf('Bitter\Event\EventInterface')
+ ->isInstanceOf('FreeAgent\Bitter\Event\AbstractEvent')
+ ->isInstanceOf('FreeAgent\Bitter\Event\EventInterface')
;
}
@@ -1,12 +1,12 @@
<?php
-namespace Bitter\tests\units\Event;
+namespace FreeAgent\Bitter\tests\units\Event;
require_once __DIR__ . '/../../../vendor/autoload.php';
use \mageekguy\atoum;
use \DateTime;
-use Bitter\Event\Week as TestedWeek;
+use FreeAgent\Bitter\Event\Week as TestedWeek;
/**
* @author Jérémy Romey <jeremy@free-agent.fr>
@@ -19,8 +19,8 @@ public function testConstruct()
$this
->object($week)
- ->isInstanceOf('Bitter\Event\AbstractEvent')
- ->isInstanceOf('Bitter\Event\EventInterface')
+ ->isInstanceOf('FreeAgent\Bitter\Event\AbstractEvent')
+ ->isInstanceOf('FreeAgent\Bitter\Event\EventInterface')
;
}

0 comments on commit 4810c8a

Please sign in to comment.