Code Duplication    Length = 5-5 lines in 2 locations

Core/Executor/ObjectStateManager.php 1 location

@@ 43-47 (lines=5) @@
40
     */
41
    protected function create()
42
    {
43
        foreach (array('object_state_group', 'names', 'identifier') as $key) {
44
            if (!isset($this->dsl[$key])) {
45
                throw new \Exception("The '$key' key is missing in a object state creation definition");
46
            }
47
        }
48
49
        if (!count($this->dsl['names'])) {
50
            throw new \Exception('No object state names have been defined. Need to specify at least one to create the state.');

Core/Executor/ObjectStateGroupManager.php 1 location

@@ 37-41 (lines=5) @@
34
     */
35
    protected function create()
36
    {
37
        foreach (array('names', 'identifier') as $key) {
38
            if (!isset($this->dsl[$key])) {
39
                throw new \Exception("The '$key' key is missing in a object state group creation definition");
40
            }
41
        }
42
43
        $objectStateService = $this->repository->getObjectStateService();
44