@@ 76-80 (lines=5) @@ | ||
73 | public function create($resource, array $constraints) |
|
74 | { |
|
75 | foreach ($constraints as $name => $value) { |
|
76 | if (!isset($this->resources['resources'][$resource]['constraints']['allowed'])) { |
|
77 | throw new RuntimeException( |
|
78 | 'Not allowed `' . $name . '` constraint with value `' . $value . '`' |
|
79 | ); |
|
80 | } |
|
81 | ||
82 | if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) { |
|
83 | throw new RuntimeException( |
|
@@ 82-86 (lines=5) @@ | ||
79 | ); |
|
80 | } |
|
81 | ||
82 | if (!in_array($name, $this->resources['resources'][$resource]['constraints']['allowed'])) { |
|
83 | throw new RuntimeException( |
|
84 | 'Not allowed `' . $name . '` constraint with value `' . $value . '`' |
|
85 | ); |
|
86 | } |
|
87 | } |
|
88 | } |
|
89 |