mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
parent
203584107f
commit
91e222f7a6
6 changed files with 21 additions and 18 deletions
|
|
@ -12,7 +12,7 @@ class ExpressionUtils
|
|||
*/
|
||||
public static function isAssociativeArray(array $array): bool
|
||||
{
|
||||
if (empty($array)) {
|
||||
if ($array === []) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -81,8 +81,10 @@ class ExpressionUtils
|
|||
self::evaluateCondition($condition['right'], $variable, $object);
|
||||
|
||||
case 'or':
|
||||
return self::evaluateCondition($condition['left'], $variable, $object) ||
|
||||
self::evaluateCondition($condition['right'], $variable, $object);
|
||||
if (self::evaluateCondition($condition['left'], $variable, $object)) {
|
||||
return true;
|
||||
}
|
||||
return self::evaluateCondition($condition['right'], $variable, $object);
|
||||
|
||||
case 'comparison':
|
||||
$leftValue = self::resolveValue($condition['left'], $variable, $object);
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class BatteryLow extends Notification
|
|||
return (new MailMessage)->markdown('mail.battery-low', ['device' => $this->device]);
|
||||
}
|
||||
|
||||
public function toWebhook(object $notifiable)
|
||||
public function toWebhook(object $notifiable): \App\Notifications\Messages\WebhookMessage
|
||||
{
|
||||
return WebhookMessage::create()
|
||||
->data([
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class PluginExportService
|
|||
// Generate shared.liquid if needed (for liquid templates)
|
||||
if ($plugin->markup_language === 'liquid') {
|
||||
$sharedTemplate = $this->generateSharedTemplate();
|
||||
/** @phpstan-ignore-next-line */
|
||||
if ($sharedTemplate) {
|
||||
File::put($tempDir.'/shared.liquid', $sharedTemplate);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue