private function buildStates(): array
    {
        $states = [];
        foreach ($this->getOffsetFromArray($this->schema, 'states', []) as $state) {
            $states[] = new State(
                $this->getOffsetFromArray($state, 'name'),
                $this->buildEvents($state),
                $this->getAdditionalFromArray($state, ['events', 'name'])
            );
        }

        return $states;
    }
private function buildStates(): array
    {
        $states = [];
        foreach ($this->getOffsetFromArray($this->schema, 'states', []) as $state) {
            $states[] = new State(
                $this->getOffsetFromArray($state, 'name'),
                $this->buildEvents($state),
                $this->getAdditionalFromArray($state, ['events', 'name'])
            );
        }

        return $states;
    }
private function buildStates ( ) : array { $ states = [ ] ; foreach ( $ this -> getOffsetFromArray ( $ this -> schema , 'states' , [ ] ) as $ state ) { $ states [ ] = new State ( $ this -> getOffsetFromArray ( $ state , 'name' ) , $ this -> buildEvents ( $ state ) , $ this -> getAdditionalFromArray ( $ state , [ 'events' , 'name' ] ) ) ; } return $ states ; }
Build states for process

@return array
Build states for process