for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Flipbox\Relay\HubSpot\Segment\ContactLists;
use Flipbox\Relay\HubSpot\Middleware\Client;
use Flipbox\Relay\HubSpot\Middleware\ContactLists\GetById as ContactListByIdMiddleware;
use Flipbox\Relay\Middleware\Stash as CacheMiddleware;
use Flipbox\Relay\Segments\AbstractSegment;
use Psr\Cache\CacheItemPoolInterface;
class GetById extends AbstractSegment
{
/**
* @var int
*/
public $id;
* @var CacheItemPoolInterface
public $cache;
* @return array
protected function defaultSegments(): array
return [
'uri' => [
'class' => ContactListByIdMiddleware::class,
'id' => $this->id,
'logger' => $this->getLogger()
],
'cache' => [
'class' => CacheMiddleware::class,
'pool' => $this->cache,
'client' => [
'class' => Client::class,
]
];
}