code: public function isPromise($value, $strict = false)
      {
          $isStrictPromise = $value instanceof PromiseInterface;
  
          if ($strict) {
              return $isStrictPromise;
          }
  
          return $isStrictPromise || is_callable([$value, 'then']);
      }
docs: {@inheritdoc}