@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | public function authorize() |
11 | 11 | { |
12 | - return (bool)!$this->route()->getParameter('social')->user; |
|
12 | + return (bool) !$this->route()->getParameter('social')->user; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | /** |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | // Here template names is hardcoded, but here is easy to edit them, then go to templates and change variables there |
31 | 31 | |
32 | - switch ($view->getName()){ |
|
32 | + switch ($view->getName()) { |
|
33 | 33 | case "partials.banners.small": |
34 | 34 | return $view->with('banners', $this->banners->getSmallAdBlocks(2)); |
35 | 35 | break; |
@@ -32,12 +32,12 @@ |
||
32 | 32 | { |
33 | 33 | $languages = $this->languages->getPublic(); |
34 | 34 | |
35 | - $active_langs = []; |
|
36 | - $languages->each(function ($language) use (&$active_langs) { |
|
35 | + $active_langs = [ ]; |
|
36 | + $languages->each(function($language) use (&$active_langs) { |
|
37 | 37 | if ($language->slug == Lang::slug()) { |
38 | - $active_langs['current'] = $language; |
|
38 | + $active_langs[ 'current' ] = $language; |
|
39 | 39 | } else { |
40 | - $active_langs['other'][] = $language; |
|
40 | + $active_langs[ 'other' ][ ] = $language; |
|
41 | 41 | } |
42 | 42 | }); |
43 | 43 |
@@ -14,6 +14,6 @@ |
||
14 | 14 | { |
15 | 15 | $currency = json_decode(File::get(storage_path('app/json_currency.json'))); |
16 | 16 | |
17 | - return $view->with(['euro'=>$currency->EUR,'usd'=>$currency->USD]); |
|
17 | + return $view->with([ 'euro'=>$currency->EUR, 'usd'=>$currency->USD ]); |
|
18 | 18 | } |
19 | 19 | } |
20 | 20 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
30 | 30 | */ |
31 | 31 | public function compose(View $view) |
32 | 32 | { |
33 | - $comision = \Auth::check() ? $this->lots->userLotsPendingComision(\Auth::user()) : 0; |
|
33 | + $comision = \Auth::check() ? $this->lots->userLotsPendingComision(\Auth::user()) : 0; |
|
34 | 34 | return $view |
35 | 35 | ->with('comision', $comision); |
36 | 36 | } |
@@ -20,8 +20,9 @@ |
||
20 | 20 | $this->product = $request->route()->getParameter('product'); |
21 | 21 | $times = config('product.times'); |
22 | 22 | |
23 | - if ((!empty($times)) && ($this->getUserInvolvesTimes() < 3)) |
|
24 | - return $next($request); |
|
23 | + if ((!empty($times)) && ($this->getUserInvolvesTimes() < 3)) { |
|
24 | + return $next($request); |
|
25 | + } |
|
25 | 26 | |
26 | 27 | return redirect()->back()->withStatus('Sorry! But you can\'t involve this product.'); |
27 | 28 | } |
@@ -37,13 +37,13 @@ |
||
37 | 37 | */ |
38 | 38 | public function handle($request, \Closure $next) |
39 | 39 | { |
40 | - if(Auth::check()) |
|
40 | + if (Auth::check()) |
|
41 | 41 | { |
42 | - if(Auth::user()->confirmed) |
|
42 | + if (Auth::user()->confirmed) |
|
43 | 43 | return $next($request); |
44 | 44 | |
45 | 45 | foreach ($this->excludeRoutes as $route) { |
46 | - if($request->route()->getName() == $route) { |
|
46 | + if ($request->route()->getName() == $route) { |
|
47 | 47 | return $next($request); |
48 | 48 | } |
49 | 49 | } |
@@ -39,8 +39,9 @@ |
||
39 | 39 | { |
40 | 40 | if(Auth::check()) |
41 | 41 | { |
42 | - if(Auth::user()->confirmed) |
|
43 | - return $next($request); |
|
42 | + if(Auth::user()->confirmed) { |
|
43 | + return $next($request); |
|
44 | + } |
|
44 | 45 | |
45 | 46 | foreach ($this->excludeRoutes as $route) { |
46 | 47 | if($request->route()->getName() == $route) { |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $posts = $this->getViewedPosts(); |
41 | 41 | |
42 | - if ( ! is_null($posts)) |
|
42 | + if (!is_null($posts)) |
|
43 | 43 | { |
44 | 44 | $posts = $this->cleanExpiredViews($posts); |
45 | 45 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | // Filter through the post array. The argument passed to the |
74 | 74 | // function will be the value from the array, which is the |
75 | 75 | // timestamp in our case. |
76 | - return array_filter($posts, function ($timestamp) use ($time) |
|
76 | + return array_filter($posts, function($timestamp) use ($time) |
|
77 | 77 | { |
78 | 78 | // If the view timestamp + the throttle time is |
79 | 79 | // still after the current timestamp the view |
@@ -17,7 +17,7 @@ |
||
17 | 17 | { |
18 | 18 | $subscribe = $request->route()->getParameter('unscribe'); |
19 | 19 | |
20 | - if($subscribe) |
|
20 | + if ($subscribe) |
|
21 | 21 | |
22 | 22 | return $next($request); |
23 | 23 |
@@ -17,9 +17,10 @@ |
||
17 | 17 | { |
18 | 18 | $subscribe = $request->route()->getParameter('unscribe'); |
19 | 19 | |
20 | - if($subscribe) |
|
21 | - |
|
20 | + if($subscribe) { |
|
21 | + |
|
22 | 22 | return $next($request); |
23 | + } |
|
23 | 24 | |
24 | 25 | abort('404', 'Invalid token'); |
25 | 26 | } |