Completed
Push — master ( 77c28b...f86acd )
by Jake
03:02
created
src/SEOGenerator.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public $defaults;
13 13
     
14
-    public function __construct () {
14
+    public function __construct() {
15 15
         $this->defaults = [
16 16
             'title' => 'Home',
17 17
             'title-spacer' => ' – ',
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         ];
31 31
     }
32 32
     
33
-    public function generateSEO (array $page)
33
+    public function generateSEO(array $page)
34 34
     {
35 35
         SEOTools::metatags()
36 36
             ->setTitleDefault($page['title-description'])
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
     }
67 67
     
68
-    public function make (array $details, $view = null)
68
+    public function make(array $details, $view = null)
69 69
     {
70 70
         $this->defaults = array_replace($this->defaults, $details);
71 71
         
@@ -76,64 +76,64 @@  discard block
 block discarded – undo
76 76
         }
77 77
     }
78 78
     
79
-    public function get ()
79
+    public function get()
80 80
     {
81
-        return (Site::first()->is_public_site) ? str_replace(PHP_EOL, '', SEOTools::generate()) . $this->getFavicons() : '<meta name="robots" content="noindex,nofollow">'.$this->getFavicons();
81
+        return (Site::first()->is_public_site) ? str_replace(PHP_EOL, '', SEOTools::generate()).$this->getFavicons() : '<meta name="robots" content="noindex,nofollow">'.$this->getFavicons();
82 82
     }
83 83
     
84
-    public function generateFavicons ($dir = '') 
84
+    public function generateFavicons($dir = '') 
85 85
     {
86 86
         $colors = $this->defaults['colors'];
87 87
         return
88
-                insert_if_exists (['60x60', '72x72', '114x114', '120x120', '152x152', '180x180'], function ($insert) use ($dir) {
89
-                        return '<link rel="apple-touch-icon" sizes="' . $insert . '" href="' . asset($dir . '/apple-touch-icon-' . $insert . '.png').'">';
90
-                    }, function ($insert) use ($dir) {
88
+                insert_if_exists(['60x60', '72x72', '114x114', '120x120', '152x152', '180x180'], function($insert) use ($dir) {
89
+                        return '<link rel="apple-touch-icon" sizes="'.$insert.'" href="'.asset($dir.'/apple-touch-icon-'.$insert.'.png').'">';
90
+                    }, function($insert) use ($dir) {
91 91
                         return File::exists(public_path($dir.'/apple-touch-icon-'.$insert.'.png'));
92
-                    }) . 
93
-                insert_if_exists (['16x16', '32x32', '96x96', '194x194'], function ($insert) use ($dir) {
94
-                        return '<link rel="icon" type="image/png" href="' . asset($dir . '/favicon-' . $insert . '.png').'" sizes="'.$insert.'">';
95
-                    }, function ($insert) use ($dir) {
92
+                    }). 
93
+                insert_if_exists(['16x16', '32x32', '96x96', '194x194'], function($insert) use ($dir) {
94
+                        return '<link rel="icon" type="image/png" href="'.asset($dir.'/favicon-'.$insert.'.png').'" sizes="'.$insert.'">';
95
+                    }, function($insert) use ($dir) {
96 96
                         return File::exists(public_path($dir.'/favicon-'.$insert.'.png'));
97
-                    }) . 
98
-                insert_if_exists (['192x192'], function ($insert) use ($dir) {
99
-                        return '<link rel="icon" type="image/png" href="' . asset($dir . '/android-chrome-' . $insert . '.png').'" sizes="'.$insert.'">';
100
-                    }, function ($insert) use ($dir) {
97
+                    }). 
98
+                insert_if_exists(['192x192'], function($insert) use ($dir) {
99
+                        return '<link rel="icon" type="image/png" href="'.asset($dir.'/android-chrome-'.$insert.'.png').'" sizes="'.$insert.'">';
100
+                    }, function($insert) use ($dir) {
101 101
                         return File::exists(public_path($dir.'/android-chrome-'.$insert.'.png'));
102
-                    }) . 
103
-                insert_if_exists ($dir.'/manifest.json', function ($insert) {
104
-                        return '<link rel="manifest" href="' . asset($insert) . '">';
105
-                    }, function ($insert) {
102
+                    }). 
103
+                insert_if_exists($dir.'/manifest.json', function($insert) {
104
+                        return '<link rel="manifest" href="'.asset($insert).'">';
105
+                    }, function($insert) {
106 106
                         return File::exists(public_path($insert));
107
-                    }) . 
108
-                insert_if_exists ($dir.'/safari-pinned-tab.svg', function ($insert) use ($colors) {
109
-                        return '<link rel="mask-icon" href="'.asset($insert).'" color="' . insert_if_exists($colors['safari_pinned']) . '">';
110
-                    }, function ($insert) {
107
+                    }). 
108
+                insert_if_exists($dir.'/safari-pinned-tab.svg', function($insert) use ($colors) {
109
+                        return '<link rel="mask-icon" href="'.asset($insert).'" color="'.insert_if_exists($colors['safari_pinned']).'">';
110
+                    }, function($insert) {
111 111
                         return File::exists(public_path($insert));
112
-                    }) . 
113
-                insert_if_exists ($dir.'/favicon.ico', function ($insert) {
112
+                    }). 
113
+                insert_if_exists($dir.'/favicon.ico', function($insert) {
114 114
                         return '<link rel="shortcut icon" href="'.asset($insert).'">';
115
-                    }, function ($insert) {
115
+                    }, function($insert) {
116 116
                         return File::exists(public_path($insert));
117
-                    }) . 
118
-                insert_if_exists ($dir.'/mstile-144x144.png', function ($insert) {
117
+                    }). 
118
+                insert_if_exists($dir.'/mstile-144x144.png', function($insert) {
119 119
                         return '<meta name="msapplication-TileImage" content="'.asset($insert).'">';
120
-                    }, function ($insert) {
120
+                    }, function($insert) {
121 121
                         return File::exists(public_path($insert));
122
-                    }) . 
123
-                insert_if_exists ($dir.'/browserconfig.xml', function ($insert) {
122
+                    }). 
123
+                insert_if_exists($dir.'/browserconfig.xml', function($insert) {
124 124
                         return '<meta name="msapplication-config" content="'.asset($insert).'">';
125
-                    }, function ($insert) {
125
+                    }, function($insert) {
126 126
                         return File::exists(public_path($insert));
127
-                    }) . 
128
-                insert_if_exists ($colors['ms_tile'], function ($insert) {
127
+                    }). 
128
+                insert_if_exists($colors['ms_tile'], function($insert) {
129 129
                         return '<meta name="msapplication-TileColor" content="'.$insert.'">';
130
-                    }) . 
131
-                insert_if_exists ($colors['theme'], function ($insert) {
130
+                    }). 
131
+                insert_if_exists($colors['theme'], function($insert) {
132 132
                         return '<meta name="theme-color" content="'.$insert.'">';
133 133
                     });
134 134
     }
135 135
     
136
-    public function getFavicons () 
136
+    public function getFavicons() 
137 137
     {
138 138
         $site = Site::first();
139 139
         if (is_null($site)) {
Please login to merge, or discard this patch.
src/Http/Controllers/SiteController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 
10 10
 class SiteController extends Controller
11 11
 {
12
-    public function showCreateForm () 
12
+    public function showCreateForm() 
13 13
     {
14 14
         return SEO::make([
15 15
             'title' => 'Create Site',
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
         ], 'Blue::auth.new-site');
18 18
     }
19 19
     
20
-    public function createSite (Request $request)
20
+    public function createSite(Request $request)
21 21
     {
22 22
         $this->validate($request, [
23 23
             'siteName' => 'required|unique:sites,title|max:100',
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         return redirect()->route('create.admin');
56 56
     }
57 57
     
58
-    public function showAdminForm ()
58
+    public function showAdminForm()
59 59
     {
60 60
         return SEO::make([
61 61
             'title' => 'Create Admin',
Please login to merge, or discard this patch.
src/Migrations/2014_10_12_000000_create_users_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('users', function (Blueprint $table) {
15
+        Schema::create('users', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->string('first_name');
18 18
             $table->string('last_name');
Please login to merge, or discard this patch.