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