Passed
Branch master (5ffa65)
by Daniel
04:40
created
Category
src/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(!function_exists('JavaScript')){
3
+if (!function_exists('JavaScript')) {
4 4
     /**
5 5
      * @return \Blok\JavaScript\JavaScript
6 6
      */
7
-    function javascript($key = null, $value = null){
7
+    function javascript($key = null, $value = null) {
8 8
 
9 9
         /**
10 10
          * @var $javascript \Blok\JavaScript\JavaScript
Please login to merge, or discard this patch.
src/JavaScriptServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
     public function register()
11 11
     {
12
-        $this->app->singleton('JavaScript', function ($app) {
12
+        $this->app->singleton('JavaScript', function($app) {
13 13
             return new JavaScript(config('javascript.namespace'));
14 14
         });
15 15
     }
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
          * @example
27 27
          * @javascript($namespace, (optional) $array)
28 28
          */
29
-        Blade::directive('javascript', function ($expression) {
29
+        Blade::directive('javascript', function($expression) {
30 30
             return "<?php echo JavaScript::render({$expression}); ?>";
31 31
         });
32 32
     }
Please login to merge, or discard this patch.
src/JavaScript.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
      * @param $value
176 176
      * @return JavaScript
177 177
      */
178
-    public function add($key, $value = null){
178
+    public function add($key, $value = null) {
179 179
         return $this->set($key, $value);
180 180
     }
181 181
 
@@ -308,10 +308,10 @@  discard block
 block discarded – undo
308 308
 
309 309
         $this->merge($variables);
310 310
 
311
-        return ($scriptTag?'<script>':'').'window.' . $varName . ' = ' . $this->toJson() . ';'.($scriptTag?'</script>':'');
311
+        return ($scriptTag ? '<script>' : '') . 'window.' . $varName . ' = ' . $this->toJson() . ';' . ($scriptTag ? '</script>' : '');
312 312
     }
313 313
 
314
-    public function renderVar($namespace = null, $variables = []){
314
+    public function renderVar($namespace = null, $variables = []) {
315 315
         return $this->render($namespace, $variables, false);
316 316
     }
317 317
 
Please login to merge, or discard this patch.