@@ -74,7 +74,7 @@ |
||
| 74 | 74 | /** |
| 75 | 75 | * Execute the script and log the output |
| 76 | 76 | * |
| 77 | - * @return boolean |
|
| 77 | + * @return boolean|null |
|
| 78 | 78 | */ |
| 79 | 79 | public function queueScript() |
| 80 | 80 | { |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | /** |
| 23 | 23 | * @var array Guarded fields |
| 24 | 24 | */ |
| 25 | - protected $guarded = ['*']; |
|
| 25 | + protected $guarded = [ '*' ]; |
|
| 26 | 26 | |
| 27 | 27 | /** |
| 28 | 28 | * @var array Fillable fields |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | |
| 97 | 97 | // Run the script and log the output |
| 98 | 98 | $output = shell_exec($this->script); |
| 99 | - Log::create(['hook_id' => $this->id, 'output' => $output]); |
|
| 99 | + Log::create([ 'hook_id' => $this->id, 'output' => $output ]); |
|
| 100 | 100 | |
| 101 | 101 | // Update our executed_at timestamp |
| 102 | 102 | $this->executed_at = Carbon::now(); |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | public function getHttpMethodAttribute() |
| 192 | 192 | { |
| 193 | 193 | return array_key_exists('http_method', $this->attributes) |
| 194 | - ? $this->attributes['http_method'] |
|
| 194 | + ? $this->attributes[ 'http_method' ] |
|
| 195 | 195 | : 'post'; |
| 196 | 196 | } |
| 197 | 197 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | public function getLogsCountAttribute($logs) |
| 204 | 204 | { |
| 205 | 205 | return array_key_exists('logs_count', $this->attributes) |
| 206 | - ? (int) $this->attributes['logs_count'] |
|
| 206 | + ? (int) $this->attributes[ 'logs_count' ] |
|
| 207 | 207 | : 0; |
| 208 | 208 | } |
| 209 | 209 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | 'category' => 'bedard.webhooks::lang.plugin.name', |
| 40 | 40 | 'icon' => 'icon-code', |
| 41 | 41 | 'url' => Backend::url('bedard/webhooks/hooks'), |
| 42 | - 'permissions' => ['bedard.webhooks.manage_hooks'], |
|
| 42 | + 'permissions' => [ 'bedard.webhooks.manage_hooks' ], |
|
| 43 | 43 | ], |
| 44 | 44 | ]; |
| 45 | 45 | } |
@@ -16,12 +16,12 @@ |
||
| 16 | 16 | /** |
| 17 | 17 | * @var array Guarded fields |
| 18 | 18 | */ |
| 19 | - protected $guarded = ['*']; |
|
| 19 | + protected $guarded = [ '*' ]; |
|
| 20 | 20 | |
| 21 | 21 | /** |
| 22 | 22 | * @var array Fillable fields |
| 23 | 23 | */ |
| 24 | - protected $fillable = ['hook_id', 'output']; |
|
| 24 | + protected $fillable = [ 'hook_id', 'output' ]; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * @var array Relations |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | 'Backend.Behaviors.RelationController', |
| 22 | 22 | ]; |
| 23 | 23 | |
| 24 | - public $requiredPermissions = ['bedard.webhooks.manage_hooks']; |
|
| 24 | + public $requiredPermissions = [ 'bedard.webhooks.manage_hooks' ]; |
|
| 25 | 25 | |
| 26 | 26 | public $bodyClass = 'compact-container'; |
| 27 | 27 | public $formConfig = 'config_form.yaml'; |