src/Trace/Trace.php
public function addEntry(ObservedInterface $observed, array $enabledStatesList): TraceInterface
    {
        $lastEntry = null;
        if (false === $this->isEmpty()) {
            $lastEntry = $this->getLastEntry();
        }

        $entry = new Entry($observed, $enabledStatesList, $lastEntry);

        if ($lastEntry instanceof EntryInterface) {
            $lastEntry->setNext($entry);
        }

        $this->stack->push($entry);

        return $this;
    }
public function addEntry(ObservedInterface $observed, array $enabledStatesList): TraceInterface
    {
        $lastEntry = null;
        if (false === $this->isEmpty()) {
            $lastEntry = $this->getLastEntry();
        }

        $entry = new Entry($observed, $enabledStatesList, $lastEntry);

        if ($lastEntry instanceof EntryInterface) {
            $lastEntry->setNext($entry);
        }

        $this->stack->push($entry);

        return $this;
    }
{@inheritdoc}