Completed
Branch dev (bc6e47)
by Raffael
02:23
created
src/app/Balloon.App.Notification/Hook/Subscription.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      *
95 95
      * @return AbstractHook
96 96
      */
97
-    public function setOptions(?Iterable $config = null): self
97
+    public function setOptions(?Iterable $config = null) : self
98 98
     {
99 99
         if (null === $config) {
100 100
             return $this;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             switch ($option) {
105 105
                 case 'body':
106 106
                 case 'subject':
107
-                    $this->{$option} = (string) $value;
107
+                    $this->{$option} = (string)$value;
108 108
 
109 109
                 break;
110 110
                 default:
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
     /**
135 135
      * {@inheritdoc}
136 136
      */
137
-    public function postDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first): void
137
+    public function postDeleteCollection(Collection $node, bool $force, ?string $recursion, bool $recursion_first) : void
138 138
     {
139 139
         $this->notify($node->getParent());
140 140
     }
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     /**
151 151
      * {@inheritdoc}
152 152
      */
153
-    public function postDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first): void
153
+    public function postDeleteFile(File $node, bool $force, ?string $recursion, bool $recursion_first) : void
154 154
     {
155 155
         $this->notify($node->getParent());
156 156
     }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     protected function notify(Collection $collection): void
172 172
     {
173 173
         $subs = $collection->getAppAttribute('Balloon\\App\\Notification', 'subscription');
174
-        if (isset($subs[(string) $this->user->getId()])) {
174
+        if (isset($subs[(string)$this->user->getId()])) {
175 175
             $this->logger->info('user ['.$this->user->getId().'] got a subscription for node ['.$collection->getId().']', [
176 176
                 'category' => get_class($this),
177 177
             ]);
@@ -184,14 +184,14 @@  discard block
 block discarded – undo
184 184
         }
185 185
 
186 186
         $throttle = $collection->getAppAttribute('Balloon\\App\\Notification', 'notification_throttle');
187
-        if (is_array($throttle) && isset($throttle[(string) $collection->getId()])) {
188
-            $last = $throttle[(string) $collection->getId()];
187
+        if (is_array($throttle) && isset($throttle[(string)$collection->getId()])) {
188
+            $last = $throttle[(string)$collection->getId()];
189 189
         }
190 190
 
191
-        $body = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function ($match) use ($collection) {
191
+        $body = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function($match) use ($collection) {
192 192
             return $collection->getAttribute($match[2]);
193 193
         }, $this->body);
194
-        $subject = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function ($match) use ($collection) {
194
+        $subject = preg_replace_callback('/(\{(([a-z]\.*)+)\})/', function($match) use ($collection) {
195 195
             return $collection->getAttribute($match[2]);
196 196
         }, $this->subject);
197 197
 
Please login to merge, or discard this patch.
src/app/Balloon.App.Sharelink/App/Http.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 /**
6 6
  * Balloon
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             }
69 69
         });
70 70
 
71
-        $decorator->addDecorator('sharelink', function ($node, $attributes) use ($sharelink) {
71
+        $decorator->addDecorator('sharelink', function($node, $attributes) use ($sharelink) {
72 72
             return $sharelink->isSharelink($node);
73 73
         });
74 74
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         if (isset($_GET['t']) && !empty($_GET['t'])) {
87 87
             $token = $_GET['t'];
88 88
             if (isset($_GET['download'])) {
89
-                $download = (bool) $_GET['download'];
89
+                $download = (bool)$_GET['download'];
90 90
             } else {
91 91
                 $download = false;
92 92
             }
Please login to merge, or discard this patch.