@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | Event::on( |
| 55 | 55 | Fields::class, |
| 56 | 56 | Fields::EVENT_REGISTER_FIELD_TYPES, |
| 57 | - function (RegisterComponentTypesEvent $event) { |
|
| 57 | + function(RegisterComponentTypesEvent $event) { |
|
| 58 | 58 | $event->types[] = RecipeField::class; |
| 59 | 59 | } |
| 60 | 60 | ); |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | Event::on( |
| 64 | 64 | Plugins::class, |
| 65 | 65 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
| 66 | - function (PluginEvent $event) { |
|
| 66 | + function(PluginEvent $event) { |
|
| 67 | 67 | if (!Craft::$app->getRequest()->getIsConsoleRequest() |
| 68 | 68 | && ($event->plugin === $this)) { |
| 69 | 69 | Craft::$app->getResponse()->redirect(UrlHelper::cpUrl('recipe/welcome'))->send(); |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $review = [ |
| 252 | 252 | 'type' => 'Review', |
| 253 | 253 | 'author' => $rating['author'], |
| 254 | - 'name' => $this->name . ' ' . Craft::t('recipe', 'Review'), |
|
| 254 | + 'name' => $this->name.' '.Craft::t('recipe', 'Review'), |
|
| 255 | 255 | 'description' => $rating['review'], |
| 256 | 256 | 'reviewRating' => [ |
| 257 | 257 | 'type' => 'Rating', |
@@ -267,13 +267,13 @@ discard block |
||
| 267 | 267 | } |
| 268 | 268 | |
| 269 | 269 | if ($this->prepTime) { |
| 270 | - $recipeJSONLD['prepTime'] = 'PT' . $this->prepTime . 'M'; |
|
| 270 | + $recipeJSONLD['prepTime'] = 'PT'.$this->prepTime.'M'; |
|
| 271 | 271 | } |
| 272 | 272 | if ($this->cookTime) { |
| 273 | - $recipeJSONLD['cookTime'] = 'PT' . $this->cookTime . 'M'; |
|
| 273 | + $recipeJSONLD['cookTime'] = 'PT'.$this->cookTime.'M'; |
|
| 274 | 274 | } |
| 275 | 275 | if ($this->totalTime) { |
| 276 | - $recipeJSONLD['totalTime'] = 'PT' . $this->totalTime . 'M'; |
|
| 276 | + $recipeJSONLD['totalTime'] = 'PT'.$this->totalTime.'M'; |
|
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | return $this->renderJsonLd($recipeJSONLD, $raw); |
@@ -411,11 +411,11 @@ discard block |
||
| 411 | 411 | $units = rtrim($units); |
| 412 | 412 | $units = rtrim($units, 's'); |
| 413 | 413 | } |
| 414 | - $ingredient .= ' ' . $units; |
|
| 414 | + $ingredient .= ' '.$units; |
|
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | if ($row['ingredient']) { |
| 418 | - $ingredient .= ' ' . $row['ingredient']; |
|
| 418 | + $ingredient .= ' '.$row['ingredient']; |
|
| 419 | 419 | } |
| 420 | 420 | if ($raw) { |
| 421 | 421 | $ingredient = Template::raw($ingredient); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | } |
| 69 | 69 | // Render the template with our vars passed in |
| 70 | 70 | try { |
| 71 | - $htmlText = Craft::$app->view->renderTemplate('recipe/' .$templatePath, $params); |
|
| 71 | + $htmlText = Craft::$app->view->renderTemplate('recipe/'.$templatePath, $params); |
|
| 72 | 72 | $templateRendered = true; |
| 73 | 73 | } catch (\Exception $e) { |
| 74 | 74 | $templateRendered = false; |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | // Render the template with our vars passed in |
| 85 | 85 | try { |
| 86 | - $htmlText = Craft::$app->view->renderTemplate('recipe/' . $templatePath, $params); |
|
| 86 | + $htmlText = Craft::$app->view->renderTemplate('recipe/'.$templatePath, $params); |
|
| 87 | 87 | $templateRendered = true; |
| 88 | 88 | } catch (\Exception $e) { |
| 89 | 89 | $templateRendered = false; |