@@ -36,7 +36,7 @@ How to run tests?
3636-----------------
3737
3838```
39-
39+
4040 php bin/phpunit
4141
4242```
@@ -50,25 +50,25 @@ Smart codes have to be bound to a payload this can be done by implementing the P
5050```
5151 use Intracto\SmartCodeBundle\Entity\PayloadInterface;
5252 use Intracto\SmartCodeBundle\Entity\SmartCodeInterface;
53-
53+
5454 class Payload implements PayloadInterface
5555 {
5656
5757 ...
58-
58+
5959 /**
6060 * @ORM\OneToMany(targetEntity="Intracto\SmartCodeBundle\Entity\SmartCodeInterface", mappedBy="payload")
6161 *
6262 * @var SmartCodes[]|ArrayCollection
6363 */
6464 protected $smartCodes;
65-
65+
6666 ...
6767 }
6868```
6969
7070Now you can get started with the generation. To generate Smart codes you can use the SmartCodeGenerator
71- or create your own by implementing the SmartCodeGeneratorInterface.
71+ or create your own by implementing the SmartCodeGeneratorInterface.
7272
7373This service will allow you to call the function:
7474
@@ -77,7 +77,7 @@ This service will allow you to call the function:
7777```
7878
7979As you can see this has 2 parameters, the first is your payload that you created in step 1 and the 2nd is a model
80- containing all your options.
80+ containing all your options.
8181
8282```
8383 class SmartCodeOptions
@@ -87,7 +87,7 @@ containing all your options.
8787 protected $expiresAt;
8888 protected $startsAt;
8989 protected $batch;
90-
90+
9191 ...
9292 }
9393```
@@ -100,16 +100,16 @@ containing all your options.
100100
101101The last thing you would probably want to do is to be able to use these smart codes you just generated.
102102This is possible via the SmartCodeAction service, which you can also overwrite by implementing the SmartCodeActionInterface.
103-
103+
104104This class has 2 required functions:
105105
106106```
107107 public function register(SubjectInterface $subject, SmartCodeInterface $smartCode);
108-
108+
109109 public function unregister(SubjectInterface $subject, SmartCodeInterface $smartCode);
110110```
111111
112- To register or unregister a certain smart code you would need a subject that is going to be using this code.
112+ To register or unregister a certain smart code you would need a subject that is going to be using this code.
113113To make such a subject you can implement the SubjectInterface.
114114
115115```
@@ -118,9 +118,9 @@ To make such a subject you can implement the SubjectInterface.
118118
119119 class User implements SubjectInterface
120120 {
121-
121+
122122 ...
123-
123+
124124 /**
125125 * @ORM\ManyToMany(targetEntity="Intracto\SmartCodeBundle\Entity\SmartCodeInterface", inversedBy="subjects")
126126 * @ORM\JoinTable(name="user_smartcode",
@@ -131,9 +131,9 @@ To make such a subject you can implement the SubjectInterface.
131131 * @var SmartCode[]|ArrayCollection
132132 */
133133 protected $smartCodes;
134-
134+
135135 ...
136-
136+
137137 }
138138
139139```
0 commit comments