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