@@ -47,7 +47,9 @@ |
||
47 | 47 | // code for creating a new post goes here |
48 | 48 | // we simple use our DataProvider for now |
49 | 49 | $post = DataProvider::getPost(10); |
50 | - if (!empty($args['post']['title'])) $post['title'] = $args['post']['title']; |
|
50 | + if (!empty($args['post']['title'])) { |
|
51 | + $post['title'] = $args['post']['title']; |
|
52 | + } |
|
51 | 53 | return $post; |
52 | 54 | } |
53 | 55 | ] |
@@ -81,7 +81,9 @@ discard block |
||
81 | 81 | |
82 | 82 | public function processRequest($payload, $variables = []) |
83 | 83 | { |
84 | - if ($this->hasErrors()) return $this; |
|
84 | + if ($this->hasErrors()) { |
|
85 | + return $this; |
|
86 | + } |
|
85 | 87 | |
86 | 88 | $this->data = []; |
87 | 89 | |
@@ -157,7 +159,9 @@ discard block |
||
157 | 159 | */ |
158 | 160 | protected function executeMutation(Mutation $mutation, $currentLevelSchema) |
159 | 161 | { |
160 | - if (!$currentLevelSchema) throw new ConfigurationException('There is no mutation ' . $mutation->getName()); |
|
162 | + if (!$currentLevelSchema) { |
|
163 | + throw new ConfigurationException('There is no mutation ' . $mutation->getName()); |
|
164 | + } |
|
161 | 165 | |
162 | 166 | if (!$this->resolveValidator->checkFieldExist($currentLevelSchema, $mutation)) { |
163 | 167 | return null; |
@@ -21,7 +21,9 @@ |
||
21 | 21 | |
22 | 22 | public function buildArguments() |
23 | 23 | { |
24 | - if ($this->_isArgumentBuilt) return true; |
|
24 | + if ($this->_isArgumentBuilt) { |
|
25 | + return true; |
|
26 | + } |
|
25 | 27 | $sourceArguments = empty($this->data['args']) ? [] : $this->data['args']; |
26 | 28 | foreach ($sourceArguments as $argumentName => $argumentInfo) { |
27 | 29 | if ($argumentInfo instanceof InputField) { |