Completed
Push — master ( 3e963f...fbd0cf )
by Yann
02:04
created
Command/ArchiveTokenCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         $this
25 25
             ->setName('yokai:security-token:archive')
26 26
             ->addOption('purpose', null, InputOption::VALUE_OPTIONAL, 'Filter tokens to archive on purpose.')
27
-            ->addOption('before',  null, InputOption::VALUE_OPTIONAL, 'Filter tokens to archive on created date.')
27
+            ->addOption('before', null, InputOption::VALUE_OPTIONAL, 'Filter tokens to archive on created date.')
28 28
         ;
29 29
     }
30 30
 
Please login to merge, or discard this patch.
Tests/Manager/UserManagerTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -38,6 +38,9 @@
 block discarded – undo
38 38
         return new UserManager($this->entityManager->reveal());
39 39
     }
40 40
 
41
+    /**
42
+     * @param string $id
43
+     */
41 44
     protected function user($id)
42 45
     {
43 46
         return new class($id) {
Please login to merge, or discard this patch.
Tests/Manager/TokenManagerTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,8 @@
 block discarded – undo
86 86
         $token2 = new Token('string', 'jdoe','unique-token-2', 'reset-password',  '+1 day', []);
87 87
 
88 88
         $this->factory->expects($this->exactly(2))
89
-                      ->method('create')
90
-                      ->will($this->onConsecutiveCalls($token1, $token2));
89
+                        ->method('create')
90
+                        ->will($this->onConsecutiveCalls($token1, $token2));
91 91
 
92 92
         $this->repository->exists('unique-token-1', 'forgot_password')
93 93
             ->shouldBeCalledTimes(1)
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function it_create_unique_token()
84 84
     {
85
-        $token1 = new Token('string', 'jdoe','unique-token-1', 'reset-password',  '+1 day', []);
86
-        $token2 = new Token('string', 'jdoe','unique-token-2', 'reset-password',  '+1 day', []);
85
+        $token1 = new Token('string', 'jdoe', 'unique-token-1', 'reset-password', '+1 day', []);
86
+        $token2 = new Token('string', 'jdoe', 'unique-token-2', 'reset-password', '+1 day', []);
87 87
 
88 88
         $this->factory->expects($this->exactly(2))
89 89
                       ->method('create')
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function it_consume_token()
113 113
     {
114
-        $token = new Token('string', 'jdoe','unique-token', 'reset-password',  '+1 day', []);
114
+        $token = new Token('string', 'jdoe', 'unique-token', 'reset-password', '+1 day', []);
115 115
 
116 116
         $this->informationGuesser->get()
117 117
             ->shouldBeCalledTimes(1)
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
      */
132 132
     public function it_extract_user_from_token()
133 133
     {
134
-        $token = new Token('string', 'jdoe','unique-token', 'reset-password',  '+1 day', []);
134
+        $token = new Token('string', 'jdoe', 'unique-token', 'reset-password', '+1 day', []);
135 135
 
136 136
         $this->userManager->get('string', 'jdoe')
137 137
             ->shouldBeCalledTimes(1)
Please login to merge, or discard this patch.
Tests/DependencyInjection/DependencyInjectionTest.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             //todo nice to have : support more configuration format
135 135
 
136 136
             default:
137
-                throw new \InvalidArgumentException('File ' . $path . ' is not supported.');
137
+                throw new \InvalidArgumentException('File '.$path.' is not supported.');
138 138
                 break;
139 139
         }
140 140
 
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
         foreach ($this->formatProvider() as $format) {
156 156
             $format = $format[0];
157 157
 
158
-            yield $format . ' - none' => [
159
-                'none.' . $format,
158
+            yield $format.' - none' => [
159
+                'none.'.$format,
160 160
                 [],
161 161
                 $defaultAliases,
162 162
             ];
163 163
 
164
-            yield $format . ' - names only' => [
165
-                'names.' . $format,
164
+            yield $format.' - names only' => [
165
+                'names.'.$format,
166 166
                 [
167 167
                     'security_password_init' => [
168 168
                         'generator' => OpenSslTokenGenerator::class,
@@ -176,8 +176,8 @@  discard block
 block discarded – undo
176 176
                 $defaultAliases,
177 177
             ];
178 178
 
179
-            yield $format . ' - fully configured' => [
180
-                'full.' . $format,
179
+            yield $format.' - fully configured' => [
180
+                'full.'.$format,
181 181
                 [
182 182
                     'security_password_init' => [
183 183
                         'generator' => ProphecySubjectInterface::class,
Please login to merge, or discard this patch.
Tests/Command/ArchiveTokenCommandTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 
122 122
         $dateAssertions = Argument::allOf(
123 123
             Argument::type(\DateTime::class),
124
-            Argument::that(function (\DateTime $date) {
124
+            Argument::that(function(\DateTime $date) {
125 125
                 return $date->format('Y') === (string) (date('Y') - 1);
126 126
             })
127 127
         );
Please login to merge, or discard this patch.
Tests/Repository/DoctrineORMTokenRepositoryTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function it_throw_exception_if_token_expired()
64 64
     {
65
-        $token = new Token('string', 'jdoe','unique', 'init_password',  '-1 day', []);
65
+        $token = new Token('string', 'jdoe', 'unique', 'init_password', '-1 day', []);
66 66
 
67 67
         $this->repository->findOneBy(['value' => 'unique', 'purpose' => 'init_password'])
68 68
             ->shouldBeCalledTimes(1)
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function it_throw_exception_if_token_used()
79 79
     {
80
-        $token = new Token('string', 'jdoe','unique', 'init_password',  '+1 day', []);
80
+        $token = new Token('string', 'jdoe', 'unique', 'init_password', '+1 day', []);
81 81
         $token->setUsedAt(new \DateTime());
82 82
         $token->setUsedInformation(['info']);
83 83
 
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function it_get_valid_token()
95 95
     {
96
-        $token = new Token('string', 'jdoe','unique', 'init_password',  '+1 day', []);
96
+        $token = new Token('string', 'jdoe', 'unique', 'init_password', '+1 day', []);
97 97
 
98 98
         $this->repository->findOneBy(['value' => 'unique', 'purpose' => 'init_password'])
99 99
             ->shouldBeCalledTimes(1)
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function it_create_token()
111 111
     {
112
-        $token = new Token('string', 'jdoe','unique', 'init_password',  '+1 day', []);
112
+        $token = new Token('string', 'jdoe', 'unique', 'init_password', '+1 day', []);
113 113
 
114 114
         $this->manager->persist($token)
115 115
             ->shouldBeCalledTimes(1);
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function it_update_token()
126 126
     {
127
-        $token = new Token('string', 'jdoe','unique', 'init_password',  '+1 day', []);
127
+        $token = new Token('string', 'jdoe', 'unique', 'init_password', '+1 day', []);
128 128
 
129 129
         $this->manager->persist($token)
130 130
             ->shouldBeCalledTimes(1);
Please login to merge, or discard this patch.