close Warning: AdminModule failed with TracError: Unable to instantiate component <class 'trac.admin.web_ui.BasicsAdminPanel'> (super(type, obj): obj (type BasicsAdminPanel) is not an instance or subtype of type (Markup).)

source: externals/php/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php@ 8c356c1

Last change on this file since 8c356c1 was 01a620f, checked in by Joachim Langenbach <joachim.langenbach@…>, 11 years ago

Removed submodules for php externals and use composer to provide them and versioned them afterwards

  • Property mode set to 100644
File size: 961 bytes
Line 
1<?php
2namespace GuzzleHttp\Promise\Tests;
3
4use GuzzleHttp\Promise\Promise;
5use GuzzleHttp\Promise\PromiseInterface;
6
7class NotPromiseInstance extends Thennable implements PromiseInterface
8{
9 private $nextPromise = null;
10
11 public function __construct()
12 {
13 $this->nextPromise = new Promise();
14 }
15
16 public function then(callable $res = null, callable $rej = null)
17 {
18 return $this->nextPromise->then($res, $rej);
19 }
20
21 public function otherwise(callable $onRejected)
22 {
23 return $this->then($onRejected);
24 }
25
26 public function resolve($value)
27 {
28 $this->nextPromise->resolve($value);
29 }
30
31 public function reject($reason)
32 {
33 $this->nextPromise->reject($reason);
34 }
35
36 public function wait($unwrap = true, $defaultResolution = null)
37 {
38
39 }
40
41 public function cancel()
42 {
43
44 }
45
46 public function getState()
47 {
48 return $this->nextPromise->getState();
49 }
50}
Note: See TracBrowser for help on using the repository browser.