Skip to content

Commit da7c9c0

Browse files
committed
Fix method names and constants
1 parent 3d9b507 commit da7c9c0

7 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/React/Promise/Deferred.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function then($fulfilledHandler = null, $errorHandler = null, $progressHa
2828
};
2929
} else {
3030
if (null !== $progressHandler) {
31-
trigger_error('Invalid $progressHandler argument passed to then(), must be null or callable.', \E_USER_NOTICE);
31+
trigger_error('Invalid $progressHandler argument passed to then(), must be null or callable.', E_USER_NOTICE);
3232
}
3333

3434
$progHandler = array($deferred, 'progress');

src/React/Promise/FulfilledPromise.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function then($fulfilledHandler = null, $errorHandler = null, $progressHa
1919
if (is_callable($fulfilledHandler)) {
2020
$result = call_user_func($fulfilledHandler, $result);
2121
} elseif (null !== $fulfilledHandler) {
22-
trigger_error('Invalid $fulfilledHandler argument passed to then(), must be null or callable.', \E_USER_NOTICE);
22+
trigger_error('Invalid $fulfilledHandler argument passed to then(), must be null or callable.', E_USER_NOTICE);
2323
}
2424

2525
return Util::promiseFor($result);

src/React/Promise/RejectedPromise.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function then($fulfilledHandler = null, $errorHandler = null, $progressHa
1616
try {
1717
if (!is_callable($errorHandler)) {
1818
if (null !== $errorHandler) {
19-
trigger_error('Invalid $errorHandler argument passed to then(), must be null or callable.', \E_USER_NOTICE);
19+
trigger_error('Invalid $errorHandler argument passed to then(), must be null or callable.', E_USER_NOTICE);
2020
}
2121

2222
return new RejectedPromise($this->reason);

tests/React/Promise/DeferredProgressTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ public function shouldAllowRejectAfterProgress()
315315

316316
/**
317317
* @test
318-
* @dataProvider typesDataProvider
318+
* @dataProvider invalidCallbackDataProvider
319319
**/
320-
public function shouldIgnoreNonFunctionsAndTriggerPHPNotice($var)
320+
public function shouldIgnoreNonFunctionsAndTriggerPhpNotice($var)
321321
{
322322
$this->setErrorHandler();
323323

@@ -342,7 +342,7 @@ public function shouldIgnoreNonFunctionsAndTriggerPHPNotice($var)
342342

343343
$d->progress(1);
344344

345-
$this->assertError('Invalid $progressHandler argument passed to then(), must be null or callable.', \E_USER_NOTICE);
345+
$this->assertError('Invalid $progressHandler argument passed to then(), must be null or callable.', E_USER_NOTICE);
346346
$this->restoreErrorHandler();
347347
}
348348
}

tests/React/Promise/DeferredRejectTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ public function shouldForwardReasonWhenCallbackIsNull()
8888

8989
/**
9090
* @test
91-
* @dataProvider typesDataProvider
91+
* @dataProvider invalidCallbackDataProvider
9292
**/
93-
public function shouldIgnoreNonFunctionsAndTriggerPHPNotice($var)
93+
public function shouldIgnoreNonFunctionsAndTriggerPhpNotice($var)
9494
{
9595
$this->setErrorHandler();
9696

@@ -113,7 +113,7 @@ public function shouldIgnoreNonFunctionsAndTriggerPHPNotice($var)
113113

114114
$d->reject(1);
115115

116-
$this->assertError('Invalid $errorHandler argument passed to then(), must be null or callable.', \E_USER_NOTICE);
116+
$this->assertError('Invalid $errorHandler argument passed to then(), must be null or callable.', E_USER_NOTICE);
117117
$this->restoreErrorHandler();
118118
}
119119
}

tests/React/Promise/DeferredResolveTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ public function shouldForwardValueWhenCallbackIsNull()
165165

166166
/**
167167
* @test
168-
* @dataProvider typesDataProvider
168+
* @dataProvider invalidCallbackDataProvider
169169
**/
170-
public function shouldIgnoreNonFunctionsAndTriggerPHPNotice($var)
170+
public function shouldIgnoreNonFunctionsAndTriggerPhpNotice($var)
171171
{
172172
$this->setErrorHandler();
173173

@@ -189,7 +189,7 @@ public function shouldIgnoreNonFunctionsAndTriggerPHPNotice($var)
189189

190190
$d->resolve(1);
191191

192-
$this->assertError('Invalid $fulfilledHandler argument passed to then(), must be null or callable.', \E_USER_NOTICE);
192+
$this->assertError('Invalid $fulfilledHandler argument passed to then(), must be null or callable.', E_USER_NOTICE);
193193
$this->restoreErrorHandler();
194194
}
195195
}

tests/React/Promise/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function createCallableMock()
4141
return $this->getMock('React\\Promise\Stub\CallableStub');
4242
}
4343

44-
public function typesDataProvider()
44+
public function invalidCallbackDataProvider()
4545
{
4646
return array(
4747
'empty string' => array(''),

0 commit comments

Comments
 (0)