Completed
Push — master ( 96f5c0...6ce451 )
by Dmitry
03:33
created
docs/en/examples/tests/IncomeCalculatorTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
         $I = $this->tester;
27 27
         $I->describe('income tax calculations');
28 28
 
29
-        $I->verifyThat('income calculator honors tax rules for different ranges of income', function (TestGuy $I) use ($service) {
29
+        $I->verifyThat('income calculator honors tax rules for different ranges of income', function(TestGuy $I) use ($service) {
30 30
             $I->lookAt('income tax');
31 31
 
32 32
             $I->expectThat('for income less that 50 000 calculator use 10% tax rule');
Please login to merge, or discard this patch.
src/Expectation/Internal/Step.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     public function toString() {
36 36
         $stepResult = $this->isChecked() ? "\u{2713} " : '- ';
37
-        return $stepResult . $this->name;
37
+        return $stepResult.$this->name;
38 38
     }
39 39
 
40 40
     protected function isChecked() {
Please login to merge, or discard this patch.
src/Mixin/TestGuyMethods.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @return $this
47 47
      */
48 48
     public function describe(string $scenario): TestGuy {
49
-        $this->steps->add('I describe ' . $scenario);
49
+        $this->steps->add('I describe '.$scenario);
50 50
         return $this;
51 51
     }
52 52
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      * @return $this
61 61
      */
62 62
     public function expectThat(string $expectation): TestGuy {
63
-        $this->steps->add('I expect that ' . $expectation);
63
+        $this->steps->add('I expect that '.$expectation);
64 64
 
65 65
         return $this;
66 66
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @return $this
79 79
      */
80 80
     public function verifyThat(string $expectation, callable $verificationSteps = null): TestGuy {
81
-        $this->steps->add('I verify that ' . $expectation);
81
+        $this->steps->add('I verify that '.$expectation);
82 82
         if ($verificationSteps) {
83 83
             $verificationSteps($this);
84 84
         }
Please login to merge, or discard this patch.
src/Specification/Tester.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      * @return $this
37 37
      */
38 38
     public function expectTo(string $expectation): TestGuy {
39
-        $this->steps->add('I expect to ' . $expectation);
39
+        $this->steps->add('I expect to '.$expectation);
40 40
         return $this;
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/Expectation/Internal/ObjectExceptionMatcher.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
 class ObjectExceptionMatcher extends Matcher {
18 18
     public $exceptionClassOrObject;
19 19
     public function withMessage($message) {
20
-        $this->startStep('has message "' . $message . '"')
20
+        $this->startStep('has message "'.$message.'"')
21 21
              ->expectExceptionMessage($message);
22 22
 
23 23
         return $this;
24 24
     }
25 25
 
26 26
     public function withMessageMatchesPattern($messagePattern) {
27
-        $this->startStep('has message matching pattern "' . $messagePattern . '"')
27
+        $this->startStep('has message matching pattern "'.$messagePattern.'"')
28 28
              ->expectExceptionMessageRegExp($messagePattern);
29 29
 
30 30
         return $this;
31 31
     }
32 32
 
33 33
     public function withCode($code) {
34
-        $this->startStep('has code "' . $code . '"')
34
+        $this->startStep('has code "'.$code.'"')
35 35
              ->expectExceptionCode($code);
36 36
 
37 37
         return $this;
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
     public function when(callable $callback) {
52 52
         $exceptionClassOrObject = $this->exceptionClassOrObject;
53 53
         if (is_string($exceptionClassOrObject)) {
54
-            $this->startStep('throws exception "' . $exceptionClassOrObject . '"')
54
+            $this->startStep('throws exception "'.$exceptionClassOrObject.'"')
55 55
                  ->expectException($this->exceptionClassOrObject);
56 56
         } else {
57
-            $this->startStep('throws exception "' . get_class($exceptionClassOrObject) . '"')
57
+            $this->startStep('throws exception "'.get_class($exceptionClassOrObject).'"')
58 58
                  ->expectExceptionObject($this->exceptionClassOrObject);
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/Expectation/Internal/StepsList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
 
34 34
     public function convertToString(): string {
35 35
         $message = implode(PHP_EOL, $this->steps);
36
-        $message = $message ? $message . PHP_EOL : $message;
36
+        $message = $message ? $message.PHP_EOL : $message;
37 37
 
38
-        return (string)$message;
38
+        return (string) $message;
39 39
     }
40 40
 
41 41
     public function clear() {
Please login to merge, or discard this patch.
src/Expectation/Matcher/ObjectMatcher.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      * @return $this
17 17
      */
18 18
     public function isInstanceOf($class): self {
19
-        $this->startStep('is instance of "' . $class . '"')
19
+        $this->startStep('is instance of "'.$class.'"')
20 20
              ->assertInstanceOf($class);
21 21
 
22 22
         return $this;
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
      * @return $this
27 27
      */
28 28
     public function isNotInstanceOf($class): self {
29
-        $this->startStep('is not instance of "' . $class . '"')
29
+        $this->startStep('is not instance of "'.$class.'"')
30 30
              ->assertNotInstanceOf($class);
31 31
 
32 32
         return $this;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @return $this
69 69
      */
70 70
     public function hasAttribute($attribute): self {
71
-        $this->startStep('has attribute "' . $attribute . '"')
71
+        $this->startStep('has attribute "'.$attribute.'"')
72 72
              ->assertObjectHasAttribute($attribute);
73 73
 
74 74
         return $this;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @return $this
79 79
      */
80 80
     public function doesNotHaveAttribute($attribute): self {
81
-        $this->startStep('does not have attribute "' . $attribute . '"')
81
+        $this->startStep('does not have attribute "'.$attribute.'"')
82 82
              ->assertObjectNotHasAttribute($attribute);
83 83
 
84 84
         return $this;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public function throwsException($exceptionClassOrObject): ObjectExceptionMatcher {
95 95
         $class = is_string($exceptionClassOrObject) ? $exceptionClassOrObject : get_class($exceptionClassOrObject);
96
-        $matcher = $this->createInternalMatcherWithDescription(ObjectExceptionMatcher::class, 'I see that exception "' . $class . '"');
96
+        $matcher = $this->createInternalMatcherWithDescription(ObjectExceptionMatcher::class, 'I see that exception "'.$class.'"');
97 97
 
98 98
         $matcher->exceptionClassOrObject = $exceptionClassOrObject;
99 99
 
Please login to merge, or discard this patch.
src/Expectation/Matcher/FileMatcher.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @return $this
39 39
      */
40 40
     public function isEqualTo($file): self {
41
-        $this->startStep('is equal to file "' . $file . '"')
41
+        $this->startStep('is equal to file "'.$file.'"')
42 42
              ->assertFileEquals($file);
43 43
 
44 44
         return $this;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @return $this
49 49
      */
50 50
     public function isNotEqualTo($file): self {
51
-        $this->startStep('is not equal to file "' . $file . '"')
51
+        $this->startStep('is not equal to file "'.$file.'"')
52 52
              ->assertFileNotEquals($file);
53 53
 
54 54
         return $this;
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      * @return $this
59 59
      */
60 60
     public function isEqualToJsonFile($file): self {
61
-        $this->startStep('is equal to json file "' . $file . '"')
61
+        $this->startStep('is equal to json file "'.$file.'"')
62 62
              ->assertJsonFileEqualsJsonFile($file);
63 63
 
64 64
         return $this;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @return $this
69 69
      */
70 70
     public function isNotEqualToJsonFile($file): self {
71
-        $this->startStep('is not equal to json file "' . $file . '"')
71
+        $this->startStep('is not equal to json file "'.$file.'"')
72 72
              ->assertJsonFileNotEqualsJsonFile($file);
73 73
 
74 74
         return $this;
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @return $this
79 79
      */
80 80
     public function isEqualToXmlFile($file): self {
81
-        $this->startStep('is equal to xml file "' . $file . '"')
81
+        $this->startStep('is equal to xml file "'.$file.'"')
82 82
              ->assertXmlFileEqualsXmlFile($file);
83 83
 
84 84
         return $this;
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @return $this
89 89
      */
90 90
     public function isNotEqualToXmlFile($file): self {
91
-        $this->startStep('is not equal to xml file "' . $file . '"')
91
+        $this->startStep('is not equal to xml file "'.$file.'"')
92 92
              ->assertXmlFileNotEqualsXmlFile($file);
93 93
 
94 94
         return $this;
Please login to merge, or discard this patch.
src/Expectation/Matcher/StringMatcher.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
      * @return $this
24 24
      */
25 25
     public function isEqualToJsonFile($file): self {
26
-        $this->startStep('is equal to JSON file "' . $file . '"')
26
+        $this->startStep('is equal to JSON file "'.$file.'"')
27 27
              ->assertJsonStringEqualsJsonFile($file);
28 28
 
29 29
         return $this;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * @return $this
34 34
      */
35 35
     public function isNotEqualToJsonFile($file): self {
36
-        $this->startStep('is not equal to JSON file "' . $file . '"')
36
+        $this->startStep('is not equal to JSON file "'.$file.'"')
37 37
              ->assertJsonStringNotEqualsJsonFile($file);
38 38
 
39 39
         return $this;
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      * @return $this
44 44
      */
45 45
     public function isEqualToJsonString($string): self {
46
-        $this->startStep('is equal to JSON string "' . $string . '"')
46
+        $this->startStep('is equal to JSON string "'.$string.'"')
47 47
              ->assertJsonStringEqualsJsonString($string);
48 48
 
49 49
         return $this;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @return $this
54 54
      */
55 55
     public function isNotEqualToJsonString($string): self {
56
-        $this->startStep('is not equal to JSON string "' . $string . '"')
56
+        $this->startStep('is not equal to JSON string "'.$string.'"')
57 57
              ->assertJsonStringNotEqualsJsonString($string);
58 58
 
59 59
         return $this;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @return $this
64 64
      */
65 65
     public function isEqualToFile($file): self {
66
-        $this->startStep('is equal to file "' . $file . '"')
66
+        $this->startStep('is equal to file "'.$file.'"')
67 67
              ->assertStringEqualsFile($file);
68 68
 
69 69
         return $this;
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      * @return $this
74 74
      */
75 75
     public function isNotEqualToFile($file): self {
76
-        $this->startStep('is not equal to file "' . $file . '"')
76
+        $this->startStep('is not equal to file "'.$file.'"')
77 77
              ->assertStringNotEqualsFile($file);
78 78
 
79 79
         return $this;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @return $this
84 84
      */
85 85
     public function isEqualToXmlFile($file): self {
86
-        $this->startStep('is equal to XML file "' . $file . '"')
86
+        $this->startStep('is equal to XML file "'.$file.'"')
87 87
              ->assertXmlStringEqualsXmlFile($file);
88 88
 
89 89
         return $this;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      * @return $this
94 94
      */
95 95
     public function isNotEqualToXmlFile($file): self {
96
-        $this->startStep('is not equal to XML file "' . $file . '"')
96
+        $this->startStep('is not equal to XML file "'.$file.'"')
97 97
              ->assertXmlStringNotEqualsXmlFile($file);
98 98
 
99 99
         return $this;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @return $this
104 104
      */
105 105
     public function isEqualToXmlString($xmlString): self {
106
-        $this->startStep('is equal to XML string "' . $xmlString . '"')
106
+        $this->startStep('is equal to XML string "'.$xmlString.'"')
107 107
              ->assertXmlStringEqualsXmlString($xmlString);
108 108
 
109 109
         return $this;
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      * @return $this
114 114
      */
115 115
     public function isNotEqualToXmlString($xmlString): self {
116
-        $this->startStep('is not equal to XML string "' . $xmlString . '"')
116
+        $this->startStep('is not equal to XML string "'.$xmlString.'"')
117 117
              ->assertXmlStringNotEqualsXmlString($xmlString);
118 118
 
119 119
         return $this;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @return $this
124 124
      */
125 125
     public function startsWith($prefix): self {
126
-        $this->startStep('starts with "' . $prefix . '"')
126
+        $this->startStep('starts with "'.$prefix.'"')
127 127
              ->assertStringStartsWith($prefix);
128 128
 
129 129
         return $this;
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      * @return $this
134 134
      */
135 135
     public function doesNotStartWith($prefix): self {
136
-        $this->startStep('does not start with "' . $prefix . '"')
136
+        $this->startStep('does not start with "'.$prefix.'"')
137 137
              ->assertStringStartsNotWith($prefix);
138 138
 
139 139
         return $this;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      * @return $this
144 144
      */
145 145
     public function endsWith($suffix): self {
146
-        $this->startStep('ends with "' . $suffix . '"')
146
+        $this->startStep('ends with "'.$suffix.'"')
147 147
              ->assertStringEndsWith($suffix);
148 148
 
149 149
         return $this;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
      * @return $this
154 154
      */
155 155
     public function doesNotEndWith($suffix): self {
156
-        $this->startStep('does not end with "' . $suffix . '"')
156
+        $this->startStep('does not end with "'.$suffix.'"')
157 157
              ->assertStringEndsNotWith($suffix);
158 158
 
159 159
         return $this;
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @return $this
164 164
      */
165 165
     public function matchesRegExp($expression): self {
166
-        $this->startStep('matches regular expression "' . $expression . '"')
166
+        $this->startStep('matches regular expression "'.$expression.'"')
167 167
              ->assertRegExp($expression);
168 168
 
169 169
         return $this;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      * @return $this
174 174
      */
175 175
     public function matchesFormat($format): self {
176
-        $this->startStep('matches format "' . $format . '"')
176
+        $this->startStep('matches format "'.$format.'"')
177 177
              ->assertStringMatchesFormat($format);
178 178
 
179 179
         return $this;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      * @return $this
184 184
      */
185 185
     public function doesNotMatchFormat($format): self {
186
-        $this->startStep('does not match format "' . $format . '"')
186
+        $this->startStep('does not match format "'.$format.'"')
187 187
              ->assertStringNotMatchesFormat($format);
188 188
 
189 189
         return $this;
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      * @return $this
194 194
      */
195 195
     public function matchesFormatFromFile($formatFile): self {
196
-        $this->startStep('matches format from file "' . $formatFile . '"')
196
+        $this->startStep('matches format from file "'.$formatFile.'"')
197 197
              ->assertStringMatchesFormatFile($formatFile);
198 198
 
199 199
         return $this;
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      * @return $this
204 204
      */
205 205
     public function doesNotMatchFormatFromFile($formatFile): self {
206
-        $this->startStep('does not match format from file "' . $formatFile . '"')
206
+        $this->startStep('does not match format from file "'.$formatFile.'"')
207 207
              ->assertStringNotMatchesFormatFile($formatFile);
208 208
 
209 209
         return $this;
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
      * @return $this
214 214
      */
215 215
     public function contains($needle): self {
216
-        $this->startStep('contains "' . $needle . '"')
216
+        $this->startStep('contains "'.$needle.'"')
217 217
              ->assertContains($needle);
218 218
 
219 219
         return $this;
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      * @return $this
224 224
      */
225 225
     public function doesNotContain($needle): self {
226
-        $this->startStep('does not contain "' . $needle . '"')
226
+        $this->startStep('does not contain "'.$needle.'"')
227 227
              ->assertNotContains($needle);
228 228
 
229 229
         return $this;
Please login to merge, or discard this patch.