@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | // Mark the slug as deleted to avoid any conflict with newly created modules with the same slug. |
36 | 36 | if ($model instanceof Module) { |
37 | 37 | $model->update([ |
38 | - 'slug' => $model->slug . $this->deletionAppendix(), |
|
38 | + 'slug' => $model->slug.$this->deletionAppendix(), |
|
39 | 39 | ]); |
40 | 40 | } |
41 | 41 | |
@@ -70,6 +70,6 @@ discard block |
||
70 | 70 | |
71 | 71 | private function deletionAppendix(): string |
72 | 72 | { |
73 | - return '_DELETED_' . time(); |
|
73 | + return '_DELETED_'.time(); |
|
74 | 74 | } |
75 | 75 | } |
@@ -27,12 +27,12 @@ discard block |
||
27 | 27 | */ |
28 | 28 | public function saveFields(Fields $fields, array $input, array $files): void |
29 | 29 | { |
30 | - foreach($fields as $field){ |
|
31 | - if($this->detectCustomSaveMethod($field)) { |
|
30 | + foreach ($fields as $field) { |
|
31 | + if ($this->detectCustomSaveMethod($field)) { |
|
32 | 32 | continue; |
33 | 33 | } |
34 | 34 | |
35 | - if(!$field->isLocalized()) |
|
35 | + if (!$field->isLocalized()) |
|
36 | 36 | { |
37 | 37 | // Set standard non-localized attribute on the model |
38 | 38 | ($customSetMethod = $this->detectCustomSetMethod($field)) |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | // Dynamic localized values or standard translated |
46 | 46 | // For standard translations we set value with the colon notation, e.g. title:en |
47 | 47 | $this->foreachTranslationEntry(data_get($input, 'trans', []), function($locale, $key, $value) use($field){ |
48 | - if($key !== $field->getColumn()) return; |
|
48 | + if ($key !== $field->getColumn()) return; |
|
49 | 49 | |
50 | - if($this->isFieldForDynamicValue($field)) { |
|
50 | + if ($this->isFieldForDynamicValue($field)) { |
|
51 | 51 | $this->setDynamic($key, $value, $locale); |
52 | - } else { |
|
52 | + }else { |
|
53 | 53 | $this->{$field->getColumn().':'.$locale} = $value; |
54 | 54 | } |
55 | 55 | }); |
@@ -58,8 +58,8 @@ discard block |
||
58 | 58 | $this->save(); |
59 | 59 | |
60 | 60 | // Custom save methods |
61 | - foreach($fields as $field){ |
|
62 | - if($customSaveMethod = $this->detectCustomSaveMethod($field)) { |
|
61 | + foreach ($fields as $field) { |
|
62 | + if ($customSaveMethod = $this->detectCustomSaveMethod($field)) { |
|
63 | 63 | $this->$customSaveMethod($field, $input, $files); |
64 | 64 | } |
65 | 65 | } |
@@ -72,8 +72,8 @@ discard block |
||
72 | 72 | |
73 | 73 | private function detectCustomSaveMethod(Field $field): ?string |
74 | 74 | { |
75 | - $saveMethodByKey = 'save' . ucfirst(Str::camel($field->getKey())) . 'Field'; |
|
76 | - $saveMethodByType = 'save' . ucfirst(Str::camel($field->getType()->get())) . 'Fields'; |
|
75 | + $saveMethodByKey = 'save'.ucfirst(Str::camel($field->getKey())).'Field'; |
|
76 | + $saveMethodByType = 'save'.ucfirst(Str::camel($field->getType()->get())).'Fields'; |
|
77 | 77 | |
78 | 78 | foreach ([$saveMethodByKey, $saveMethodByType] as $saveMethod) { |
79 | 79 | if (method_exists($this, $saveMethod)) { |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | private function detectCustomSetMethod(Field $field): ?string |
88 | 88 | { |
89 | - $methodName = 'set' . ucfirst(Str::camel($field->getKey())) . 'Field'; |
|
89 | + $methodName = 'set'.ucfirst(Str::camel($field->getKey())).'Field'; |
|
90 | 90 | |
91 | 91 | return (method_exists($this, $methodName)) ? $methodName : null; |
92 | 92 | } |
@@ -108,13 +108,13 @@ discard block |
||
108 | 108 | |
109 | 109 | private function saveImageFields(ImageField $field, array $input) |
110 | 110 | { |
111 | - app(ImageFieldHandler::class)->handle($this, $field, data_get($input, 'images.' . $field->getName(), []), $input); |
|
111 | + app(ImageFieldHandler::class)->handle($this, $field, data_get($input, 'images.'.$field->getName(), []), $input); |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | private function foreachTranslationEntry(array $translations, \Closure $callback) |
115 | 115 | { |
116 | - foreach($translations as $locale => $trans){ |
|
117 | - foreach($trans as $key => $value){ |
|
116 | + foreach ($translations as $locale => $trans) { |
|
117 | + foreach ($trans as $key => $value) { |
|
118 | 118 | call_user_func($callback, $locale, $key, $value); |
119 | 119 | } |
120 | 120 | } |
@@ -45,7 +45,9 @@ |
||
45 | 45 | // Dynamic localized values or standard translated |
46 | 46 | // For standard translations we set value with the colon notation, e.g. title:en |
47 | 47 | $this->foreachTranslationEntry(data_get($input, 'trans', []), function($locale, $key, $value) use($field){ |
48 | - if($key !== $field->getColumn()) return; |
|
48 | + if($key !== $field->getColumn()) { |
|
49 | + return; |
|
50 | + } |
|
49 | 51 | |
50 | 52 | if($this->isFieldForDynamicValue($field)) { |
51 | 53 | $this->setDynamic($key, $value, $locale); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | return static::$managedModelKey; |
99 | 99 | } |
100 | 100 | |
101 | - throw new \Exception('Missing required static property \'managedModelKey\' on ' . static::class . '.'); |
|
101 | + throw new \Exception('Missing required static property \'managedModelKey\' on '.static::class.'.'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
@@ -138,9 +138,9 @@ discard block |
||
138 | 138 | public function modelReferenceLabel(): string |
139 | 139 | { |
140 | 140 | if ($this->exists) { |
141 | - $status = !$this->isPublished() ? ' [' . $this->statusAsPlainLabel() . ']' : null; |
|
141 | + $status = !$this->isPublished() ? ' ['.$this->statusAsPlainLabel().']' : null; |
|
142 | 142 | |
143 | - return $this->title ? $this->title . $status : ''; |
|
143 | + return $this->title ? $this->title.$status : ''; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return ''; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $classKey = get_class($this); |
152 | 152 | if (property_exists($this, 'labelSingular')) { |
153 | 153 | $labelSingular = $this->labelSingular; |
154 | - } else { |
|
154 | + }else { |
|
155 | 155 | $labelSingular = Str::singular($classKey); |
156 | 156 | } |
157 | 157 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $locale = app()->getLocale(); |
171 | 171 | } |
172 | 172 | try { |
173 | - $memoizedKey = $this->getMorphClass() . '-' . $this->id . '-' . $locale; |
|
173 | + $memoizedKey = $this->getMorphClass().'-'.$this->id.'-'.$locale; |
|
174 | 174 | |
175 | 175 | if (isset(static::$cachedUrls[$memoizedKey])) { |
176 | 176 | return static::$cachedUrls[$memoizedKey]; |
@@ -226,11 +226,11 @@ discard block |
||
226 | 226 | public function statusAsLabel() |
227 | 227 | { |
228 | 228 | if ($this->isPublished()) { |
229 | - return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>'; |
|
229 | + return '<a href="'.$this->url().'" target="_blank"><em>online</em></a>'; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | if ($this->isDraft()) { |
233 | - return '<a href="' . $this->url() . '" target="_blank" class="text-error"><em>offline</em></a>'; |
|
233 | + return '<a href="'.$this->url().'" target="_blank" class="text-error"><em>offline</em></a>'; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | if ($this->isArchived()) { |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | |
38 | 38 | // Set required paths |
39 | 39 | $this->dirs = ['base' => $this->settings['base_path'] ?? base_path()]; |
40 | - $this->dirs['model'] = $this->settings['model_path'] ?? $this->dirs['base'] . '/' . config('thinktomorrow.chief.domain.path', 'src'); |
|
41 | - $this->dirs['views'] = $this->settings['views_path'] ?? $this->dirs['base'] . '/resources/views'; |
|
42 | - $this->dirs['controller'] = $this->settings['controller_path'] ?? $this->dirs['base'] . '/app/Http/Controllers'; |
|
43 | - $this->files['routes'] = $this->settings['routes_file'] ?? $this->dirs['base'] . '/routes/web.php'; |
|
40 | + $this->dirs['model'] = $this->settings['model_path'] ?? $this->dirs['base'].'/'.config('thinktomorrow.chief.domain.path', 'src'); |
|
41 | + $this->dirs['views'] = $this->settings['views_path'] ?? $this->dirs['base'].'/resources/views'; |
|
42 | + $this->dirs['controller'] = $this->settings['controller_path'] ?? $this->dirs['base'].'/app/Http/Controllers'; |
|
43 | + $this->files['routes'] = $this->settings['routes_file'] ?? $this->dirs['base'].'/routes/web.php'; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public function handle() |
@@ -62,19 +62,19 @@ discard block |
||
62 | 62 | private function publishModel() |
63 | 63 | { |
64 | 64 | $this->publishFile( |
65 | - __DIR__ . '/stubs/model.php.stub', |
|
66 | - $to = $this->dirs['model'] . '/' . ucfirst($this->plural) . '/' . ucfirst($this->singular) . '.php', |
|
65 | + __DIR__.'/stubs/model.php.stub', |
|
66 | + $to = $this->dirs['model'].'/'.ucfirst($this->plural).'/'.ucfirst($this->singular).'.php', |
|
67 | 67 | 'model' |
68 | 68 | ); |
69 | 69 | |
70 | - $this->addToConfig('collections', [$this->plural => $this->guessNamespace() . '\\' . ucfirst($this->singular)]); |
|
70 | + $this->addToConfig('collections', [$this->plural => $this->guessNamespace().'\\'.ucfirst($this->singular)]); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | private function publishController() |
74 | 74 | { |
75 | 75 | $this->publishFile( |
76 | - __DIR__ . '/stubs/controller.php.stub', |
|
77 | - $to = $this->dirs['controller'] . '/' . ucfirst($this->plural) . '/' . ucfirst($this->singular) . '.php', |
|
76 | + __DIR__.'/stubs/controller.php.stub', |
|
77 | + $to = $this->dirs['controller'].'/'.ucfirst($this->plural).'/'.ucfirst($this->singular).'.php', |
|
78 | 78 | 'controller' |
79 | 79 | ); |
80 | 80 | } |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | private function modelTraits() |
114 | 114 | { |
115 | 115 | return [ |
116 | - '\\' . Publishable::class, |
|
117 | - '\\' . Sortable::class, |
|
116 | + '\\'.Publishable::class, |
|
117 | + '\\'.Sortable::class, |
|
118 | 118 | 'q' => 'Proceed.', |
119 | 119 | ]; |
120 | 120 | } |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | protected function publishFile($from, $to, $type) |
130 | 130 | { |
131 | 131 | if ($this->filesystem->exists($to) && !$this->option('force')) { |
132 | - if (!$this->confirm('File [' . $to . '] already exists? Overwrite this file?')) { |
|
132 | + if (!$this->confirm('File ['.$to.'] already exists? Overwrite this file?')) { |
|
133 | 133 | return; |
134 | 134 | } |
135 | 135 | } |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | |
169 | 169 | $to = str_replace($this->dirs['base'], '', realpath($to)); |
170 | 170 | |
171 | - $this->line('<info>Copied ' . $type . '</info> <comment>[' . $from . ']</comment> <info>To</info> <comment>[' . $to . ']</comment>'); |
|
171 | + $this->line('<info>Copied '.$type.'</info> <comment>['.$from.']</comment> <info>To</info> <comment>['.$to.']</comment>'); |
|
172 | 172 | } |
173 | 173 | |
174 | 174 | protected function replacePlaceholders($content) |
@@ -186,17 +186,17 @@ discard block |
||
186 | 186 | |
187 | 187 | private function generateImportStatements(): string |
188 | 188 | { |
189 | - return collect(['\\' . Page::class]) |
|
190 | - ->map(function ($statement) { |
|
191 | - return 'use ' . $statement . ";\n "; |
|
189 | + return collect(['\\'.Page::class]) |
|
190 | + ->map(function($statement) { |
|
191 | + return 'use '.$statement.";\n "; |
|
192 | 192 | })->implode(''); |
193 | 193 | } |
194 | 194 | |
195 | 195 | private function generateTraitStatements(): string |
196 | 196 | { |
197 | 197 | return collect($this->chosenTraits) |
198 | - ->map(function ($statement) { |
|
199 | - return 'use ' . $statement . ";\n "; |
|
198 | + ->map(function($statement) { |
|
199 | + return 'use '.$statement.";\n "; |
|
200 | 200 | })->implode(''); |
201 | 201 | } |
202 | 202 | |
@@ -215,12 +215,12 @@ discard block |
||
215 | 215 | |
216 | 216 | // We make an estimated guess based on the project name. At Think Tomorrow, we |
217 | 217 | // have a src folder which is PSR-4 namespaced by the project name itself. |
218 | - return str_replace('\\\\', '\\', ucfirst(config('thinktomorrow.chief.domain.namespace', 'App')) . '\\' . ucfirst($this->plural)); |
|
218 | + return str_replace('\\\\', '\\', ucfirst(config('thinktomorrow.chief.domain.namespace', 'App')).'\\'.ucfirst($this->plural)); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | private function addToConfig($configKey, $value) |
222 | 222 | { |
223 | - $current_values = config('thinktomorrow.chief.' . $configKey); |
|
223 | + $current_values = config('thinktomorrow.chief.'.$configKey); |
|
224 | 224 | |
225 | 225 | if (is_array($current_values)) { |
226 | 226 | $value = array_merge($current_values, $value); |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | |
236 | 236 | // Find value - note: this regex does not work for nested arrays! |
237 | 237 | // Also creates array with the non-short syntax. |
238 | - $content = preg_replace('/[\'|"]' . $key . '[\'|"] ?=> ?(\[[^\]]*\]|[\'|"].*[\'|"])/', var_export($value, true), $content); |
|
238 | + $content = preg_replace('/[\'|"]'.$key.'[\'|"] ?=> ?(\[[^\]]*\]|[\'|"].*[\'|"])/', var_export($value, true), $content); |
|
239 | 239 | |
240 | 240 | file_put_contents($file, $content); |
241 | 241 | } |
@@ -31,7 +31,9 @@ |
||
31 | 31 | |
32 | 32 | public function routeModuleCrudAssistant(string $action, $model = null, ...$parameters): ?string |
33 | 33 | { |
34 | - if(!in_array($action, ['create','store'])) return null; |
|
34 | + if(!in_array($action, ['create','store'])) { |
|
35 | + return null; |
|
36 | + } |
|
35 | 37 | |
36 | 38 | return $this->generateRoute($action, $model, ... $parameters); |
37 | 39 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | public function routeModuleCrudAssistant(string $action, $model = null, ...$parameters): ?string |
32 | 32 | { |
33 | - if(!in_array($action, ['create','store'])) return null; |
|
33 | + if (!in_array($action, ['create', 'store'])) return null; |
|
34 | 34 | |
35 | 35 | return $this->generateRoute($action, $model, ... $parameters); |
36 | 36 | } |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | $model->saveFields($model->fields()->tagged('create'), $request->all(), $request->allFiles()); |
60 | 60 | |
61 | 61 | return redirect()->to($this->route('edit', $model)) |
62 | - ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $model->adminLabel('title') . '" is toegevoegd'); |
|
62 | + ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$model->adminLabel('title').'" is toegevoegd'); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | public function edit($id) |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | return view('chief::back.managers.edit', [ |
75 | 75 | 'manager' => $this, |
76 | 76 | 'model' => $model, |
77 | - 'fields' => $model->fields()->map(function (Field $field) use ($model) { |
|
77 | + 'fields' => $model->fields()->map(function(Field $field) use ($model) { |
|
78 | 78 | // TODO refactor so render method of field takes model and managerViewModel as arguments. |
79 | 79 | return $field->model($model); |
80 | 80 | }), |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $model->saveFields($model->fields(), $request->all(), $request->allFiles()); |
94 | 94 | |
95 | 95 | return redirect()->to($this->route('edit', $model)) |
96 | - ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $model->adminLabel('title') . '" is aangepast'); |
|
96 | + ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$model->adminLabel('title').'" is aangepast'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | public function delete($id, Request $request) |
@@ -103,12 +103,12 @@ discard block |
||
103 | 103 | $model = $this->managedModelClass()::findOrFail($id); |
104 | 104 | |
105 | 105 | if ($request->get('deleteconfirmation') !== 'DELETE') { |
106 | - return redirect()->back()->with('messages.warning', $model->adminLabel('title') . ' is niet verwijderd.'); |
|
106 | + return redirect()->back()->with('messages.warning', $model->adminLabel('title').' is niet verwijderd.'); |
|
107 | 107 | } |
108 | 108 | |
109 | 109 | app(DeleteManagedModel::class)->handle($model); |
110 | 110 | |
111 | 111 | return redirect()->to($this->route('index')) |
112 | - ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "' . $model->adminLabel('title') . '" is verwijderd.'); |
|
112 | + ->with('messages.success', '<i class="fa fa-fw fa-check-circle"></i> "'.$model->adminLabel('title').'" is verwijderd.'); |
|
113 | 113 | } |
114 | 114 | } |
@@ -44,7 +44,9 @@ |
||
44 | 44 | |
45 | 45 | private function statusAsLabel(): string |
46 | 46 | { |
47 | - if(!$this instanceof ProvidesUrl) return ''; |
|
47 | + if(!$this instanceof ProvidesUrl) { |
|
48 | + return ''; |
|
49 | + } |
|
48 | 50 | |
49 | 51 | if ($this->current_status === PageState::PUBLISHED) { |
50 | 52 | return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>'; |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | public function adminLabel(string $key, $default = null, array $replace = []) |
22 | 22 | { |
23 | - if (! ($value = data_get($this->adminLabels(), $key)) ) { |
|
23 | + if (!($value = data_get($this->adminLabels(), $key))) { |
|
24 | 24 | return $default; |
25 | 25 | } |
26 | 26 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | */ |
36 | 36 | private function adminLabels(): array |
37 | 37 | { |
38 | - $singular = Str::of(static::managedModelKey())->singular()->replace('_',' ')->__toString(); |
|
38 | + $singular = Str::of(static::managedModelKey())->singular()->replace('_', ' ')->__toString(); |
|
39 | 39 | |
40 | 40 | return [ |
41 | 41 | /** |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | */ |
46 | 46 | 'label' => $singular, // Label used to refer to the generic model |
47 | 47 | 'nav_label' => $singular, // label used in the chief navigation |
48 | - 'page_title' => Str::of(static::managedModelKey())->plural()->replace('_',' ')->__toString(), // Generic collection title, for example used on index |
|
48 | + 'page_title' => Str::of(static::managedModelKey())->plural()->replace('_', ' ')->__toString(), // Generic collection title, for example used on index |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * Instance labels |
@@ -62,14 +62,14 @@ discard block |
||
62 | 62 | |
63 | 63 | private function statusAsLabel(): string |
64 | 64 | { |
65 | - if(!$this instanceof ProvidesUrl) return ''; |
|
65 | + if (!$this instanceof ProvidesUrl) return ''; |
|
66 | 66 | |
67 | 67 | if ($this->current_status === PageState::PUBLISHED) { |
68 | - return '<a href="' . $this->url() . '" target="_blank"><em>online</em></a>'; |
|
68 | + return '<a href="'.$this->url().'" target="_blank"><em>online</em></a>'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | if ($this->current_status === PageState::DRAFT) { |
72 | - return '<a href="' . $this->url() . '" target="_blank" class="text-error"><em>offline</em></a>'; |
|
72 | + return '<a href="'.$this->url().'" target="_blank" class="text-error"><em>offline</em></a>'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | if ($this->current_status === PageState::ARCHIVED) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | { |
28 | 28 | $class = $this->pageState->isOnline() ? 'text-success' : 'text-warning'; |
29 | 29 | |
30 | - return '<span class="inline-xs stack-s ' . $class . '">' . $this->stateAsLabel() . '</span>'; |
|
30 | + return '<span class="inline-xs stack-s '.$class.'">'.$this->stateAsLabel().'</span>'; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -6,26 +6,26 @@ |
||
6 | 6 | { |
7 | 7 | public static function invalidState($state, $currentState, $stateMachine) |
8 | 8 | { |
9 | - return new self('Transition to state [' . $state . '] is not allowed from state [' . $currentState . '] or state does not exist on ' . get_class($stateMachine)); |
|
9 | + return new self('Transition to state ['.$state.'] is not allowed from state ['.$currentState.'] or state does not exist on '.get_class($stateMachine)); |
|
10 | 10 | } |
11 | 11 | |
12 | 12 | public static function malformedTransition($transition, $stateMachine) |
13 | 13 | { |
14 | - return new self('Transition [' . $transition . '] is malformed on ' . get_class($stateMachine) . '. It should contain both a [from:array] and [to:string] value.'); |
|
14 | + return new self('Transition ['.$transition.'] is malformed on '.get_class($stateMachine).'. It should contain both a [from:array] and [to:string] value.'); |
|
15 | 15 | } |
16 | 16 | |
17 | 17 | public static function invalidTransitionKey($transition, $stateMachine) |
18 | 18 | { |
19 | - return new self('unknown transition [' . $transition . '] on ' . get_class($stateMachine)); |
|
19 | + return new self('unknown transition ['.$transition.'] on '.get_class($stateMachine)); |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | public static function invalidTransition($transition, $state, $stateMachine) |
23 | 23 | { |
24 | - return new self('Transition [' . $transition . '] cannot be applied from current state [' . $state . '] on ' . get_class($stateMachine)); |
|
24 | + return new self('Transition ['.$transition.'] cannot be applied from current state ['.$state.'] on '.get_class($stateMachine)); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | public static function invalidTransitionState($transition, $state, $stateMachine) |
28 | 28 | { |
29 | - return new self('Transition [' . $transition . '] contains a non existing [' . $state . '] on ' . get_class($stateMachine)); |
|
29 | + return new self('Transition ['.$transition.'] contains a non existing ['.$state.'] on '.get_class($stateMachine)); |
|
30 | 30 | } |
31 | 31 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | Session::now('note.default', 'U bekijkt een preview.'); |
13 | 13 | |
14 | 14 | return true; |
15 | - } else { |
|
15 | + }else { |
|
16 | 16 | return false; |
17 | 17 | } |
18 | 18 | } |