Skip to content

Commit

Permalink
Merge pull request #26 from formapro/use-formapro-values
Browse files Browse the repository at this point in the history
Use formapro/values
  • Loading branch information
makasim authored Mar 5, 2019
2 parents 01eef1c + 667c821 commit f87a3e8
Show file tree
Hide file tree
Showing 21 changed files with 51 additions and 51 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"require": {
"php": "^7.1",
"makasim/values": "^0.5",
"formapro/values": "^0.5",
"ramsey/uuid": "^3",
"psr/log": "^1"
},
Expand All @@ -29,7 +29,7 @@
"enqueue/enqueue": "^0.9 Install the Enqueue library to be able to process tasks async (by using MQ).",
"graphp/graphviz": "^0.2 If you want to visualize graphs",
"alom/graphviz": "^1.1 If you want to visualize graphs",
"makasim/yadm": "^0.5 Install the Yadm library to be able to persist store in MongoDB"
"formapro/yadm": "^0.5 Install the Yadm library to be able to persist store in MongoDB"
},
"extra": {
"branch-alias": {
Expand Down
2 changes: 1 addition & 1 deletion src/Builder/NodeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
use Formapro\Pvm\Node;
use Formapro\Pvm\ProcessBuilder;
use Formapro\Pvm\Uuid;
use function Makasim\Values\get_value;
use function Formapro\Values\get_value;

class NodeBuilder
{
Expand Down
4 changes: 2 additions & 2 deletions src/Builder/TransitionBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use Formapro\Pvm\ProcessBuilder;
use Formapro\Pvm\Transition;
use Formapro\Pvm\Uuid;
use function Makasim\Values\get_value;
use function Makasim\Values\set_object;
use function Formapro\Values\get_value;
use function Formapro\Values\set_object;

class TransitionBuilder
{
Expand Down
2 changes: 1 addition & 1 deletion src/CreateTrait.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\build_object;
use function Formapro\Values\build_object;

trait CreateTrait
{
Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/DoctrineDAL.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Formapro\Pvm\Process;
use Formapro\Pvm\Token;
use Formapro\Pvm\Uuid;
use function Makasim\Values\get_values;
use function Formapro\Values\get_values;

class DoctrineDAL implements DAL
{
Expand Down
2 changes: 1 addition & 1 deletion src/FileDAL.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\get_values;
use function Formapro\Values\get_values;

class FileDAL extends InMemoryDAL
{
Expand Down
6 changes: 3 additions & 3 deletions src/InMemoryDAL.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\get_object;
use function Makasim\Values\get_objects;
use function Makasim\Values\set_object;
use function Formapro\Values\get_object;
use function Formapro\Values\get_objects;
use function Formapro\Values\set_object;

class InMemoryDAL implements DAL
{
Expand Down
4 changes: 2 additions & 2 deletions src/Node.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\get_value;
use function Makasim\Values\set_value;
use function Formapro\Values\get_value;
use function Formapro\Values\set_value;

class Node
{
Expand Down
14 changes: 7 additions & 7 deletions src/Process.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\add_value;
use function Makasim\Values\get_object;
use function Makasim\Values\get_objects;
use function Makasim\Values\get_value;
use function Makasim\Values\set_object;
use function Makasim\Values\set_value;
use Makasim\Values\ValuesTrait;
use function Formapro\Values\add_value;
use function Formapro\Values\get_object;
use function Formapro\Values\get_objects;
use function Formapro\Values\get_value;
use function Formapro\Values\set_object;
use function Formapro\Values\set_value;
use Formapro\Values\ValuesTrait;

class Process
{
Expand Down
6 changes: 3 additions & 3 deletions src/ProcessBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use Formapro\Pvm\Builder\NodeBuilder;
use Formapro\Pvm\Builder\TransitionBuilder;
use function Makasim\Values\add_value;
use function Makasim\Values\get_value;
use function Makasim\Values\set_object;
use function Formapro\Values\add_value;
use function Formapro\Values\get_value;
use function Formapro\Values\set_object;

class ProcessBuilder
{
Expand Down
2 changes: 1 addition & 1 deletion src/ProcessEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use Formapro\Pvm\Exception\InterruptExecutionException;
use Formapro\Pvm\Exception\WaitExecutionException;
use function Makasim\Values\set_value;
use function Formapro\Values\set_value;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;

Expand Down
10 changes: 5 additions & 5 deletions src/Token.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\add_object;
use function Makasim\Values\get_objects;
use function Makasim\Values\get_value;
use function Makasim\Values\set_value;
use Makasim\Values\ValuesTrait;
use function Formapro\Values\add_object;
use function Formapro\Values\get_objects;
use function Formapro\Values\get_value;
use function Formapro\Values\set_value;
use Formapro\Values\ValuesTrait;

class Token
{
Expand Down
6 changes: 3 additions & 3 deletions src/TokenTransition.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\get_value;
use function Makasim\Values\set_value;
use Makasim\Values\ValuesTrait;
use function Formapro\Values\get_value;
use function Formapro\Values\set_value;
use Formapro\Values\ValuesTrait;

class TokenTransition
{
Expand Down
6 changes: 3 additions & 3 deletions src/Transition.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
namespace Formapro\Pvm;

use function Makasim\Values\get_value;
use function Makasim\Values\set_value;
use Makasim\Values\ValuesTrait;
use function Formapro\Values\get_value;
use function Formapro\Values\set_value;
use Formapro\Values\ValuesTrait;

class Transition
{
Expand Down
4 changes: 2 additions & 2 deletions src/Visual/Options.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
namespace Formapro\Pvm\Visual;

use function Makasim\Values\get_value;
use function Makasim\Values\set_value;
use function Formapro\Values\get_value;
use function Formapro\Values\set_value;

class Options
{
Expand Down
4 changes: 2 additions & 2 deletions src/Visual/VisualizeFlow.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use Formapro\Pvm\TokenTransition;
use Formapro\Pvm\Transition;
use Graphp\GraphViz\GraphViz;
use function Makasim\Values\get_object;
use function Makasim\Values\get_value;
use function Formapro\Values\get_object;
use function Formapro\Values\get_value;

class VisualizeFlow
{
Expand Down
2 changes: 1 addition & 1 deletion src/Visual/VisualizeStateMachine.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Formapro\Pvm\Process;
use Formapro\Pvm\Transition;
use Graphp\GraphViz\GraphViz;
use function Makasim\Values\get_object;
use function Formapro\Values\get_object;

class VisualizeStateMachine
{
Expand Down
6 changes: 3 additions & 3 deletions src/Yadm/Behaviors/SimpleSynchronizeBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Formapro\Pvm\Exception\InterruptExecutionException;
use Formapro\Pvm\Process;
use Formapro\Pvm\Token;
use function Makasim\Values\get_value;
use Makasim\Yadm\Storage;
use function Formapro\Values\get_value;
use Formapro\Yadm\Storage;
use MongoDB\Operation\FindOneAndUpdate;

class SimpleSynchronizeBehavior implements Behavior
Expand Down Expand Up @@ -35,7 +35,7 @@ public function execute(Token $token)
$collection = $this->processStorage->getCollection();

$rawRefreshedProcess = $collection->findOneAndUpdate(
['id' => new \Makasim\Yadm\Uuid($process->getId())],
['id' => new \Formapro\Yadm\Uuid($process->getId())],
['$inc' => ['nodes.'.$node->getId().'.currentWeight' => $token->getCurrentTransition()->getWeight()]],
[
'typeMap' => ['root' => 'array', 'document' => 'array', 'array' => 'array'],
Expand Down
4 changes: 2 additions & 2 deletions src/Yadm/InProcessDAL.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
use Formapro\Pvm\Process;
use Formapro\Pvm\Token;
use Formapro\Pvm\TokenException;
use function Makasim\Yadm\get_object_id;
use Makasim\Yadm\Storage;
use function Formapro\Yadm\get_object_id;
use Formapro\Yadm\Storage;

class InProcessDAL extends InMemoryDAL
{
Expand Down
8 changes: 4 additions & 4 deletions src/Yadm/StandaloneTokenDAL.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
use Formapro\Pvm\DAL;
use Formapro\Pvm\TokenException;
use Formapro\Pvm\Uuid;
use function Makasim\Values\get_value;
use function Makasim\Values\set_value;
use function Makasim\Yadm\get_object_id;
use Makasim\Yadm\Storage;
use function Formapro\Values\get_value;
use function Formapro\Values\set_value;
use function Formapro\Yadm\get_object_id;
use Formapro\Yadm\Storage;

class StandaloneTokenDAL implements DAL
{
Expand Down
4 changes: 2 additions & 2 deletions src/Yadm/TokenLocker.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

use Formapro\Pvm\PessimisticLockException;
use Formapro\Pvm\TokenLockerInterface;
use Makasim\Yadm\PessimisticLock;
use Makasim\Yadm\PessimisticLockException as YadmPessimisticLockException;
use Formapro\Yadm\PessimisticLock;
use Formapro\Yadm\PessimisticLockException as YadmPessimisticLockException;

class TokenLocker implements TokenLockerInterface
{
Expand Down

0 comments on commit f87a3e8

Please sign in to comment.