Passed
Branch master (f7707e)
by Vasyl
05:24
created
src/ServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function register()
34 34
     {
35
-        $this->mergeConfigFrom(__DIR__.'/../config/url-aliases.php', 'url-aliases');
35
+        $this->mergeConfigFrom(__DIR__ . '/../config/url-aliases.php', 'url-aliases');
36 36
     }
37 37
 
38 38
     protected function publishedConfig()
@@ -50,10 +50,10 @@  discard block
 block discarded – undo
50 50
 
51 51
     protected function makeMigrations()
52 52
     {
53
-        if (! class_exists('CreateUrlAliasesTable')) {
53
+        if (!class_exists('CreateUrlAliasesTable')) {
54 54
             $timestamp = date('Y_m_d_His', time());
55 55
 
56
-            $migrationPath = __DIR__.'/../database/migrations/create_url_aliases_table.php';
56
+            $migrationPath = __DIR__ . '/../database/migrations/create_url_aliases_table.php';
57 57
             $this->publishes([$migrationPath => database_path('/migrations/' . $timestamp . '_create_url_aliases_table.php'),
58 58
                 ], 'url-aliases-migrations');
59 59
         }
Please login to merge, or discard this patch.
src/Middleware/UrlAliasMiddleware.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 
79 79
     public function customize($request, Closure $next)
80 80
     {
81
-       //...
81
+        //...
82 82
         return $next($request);
83 83
     }
84 84
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@
 block discarded – undo
26 26
 
27 27
                 // redirect in alias
28 28
                 if (in_array($redirectStatus, ['301', '302'])) {
29
-                    $params = count($request->all()) ? '?'.http_build_query($request->all()) : '';
30
-                    return redirect(url($urlModel->aliased_path).$params, $redirectStatus);
29
+                    $params = count($request->all()) ? '?' . http_build_query($request->all()) : '';
30
+                    return redirect(url($urlModel->aliased_path) . $params, $redirectStatus);
31 31
                 }
32 32
 
33 33
             // is aliased_path
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
     {
15 15
         $parameters = array_wrap($parameters);
16 16
 
17
-        if (! empty($parameters[0]) && ($parameters[0] instanceof \Illuminate\Database\Eloquent\Model)) {
17
+        if (!empty($parameters[0]) && ($parameters[0] instanceof \Illuminate\Database\Eloquent\Model)) {
18 18
             $entity = $parameters[0];
19 19
             if ($alias = optional($entity->urlAlias)->aliased_path) {
20 20
                 unset($parameters[0]);
Please login to merge, or discard this patch.
config/url-aliases.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
 
9 9
     'available_mathods' => ['GET'], // if empty - available all methods
10 10
 
11
-    'ignore_paths' => [ // do not apply aliases for paths
11
+    'ignore_paths' => [// do not apply aliases for paths
12 12
         'admin/',
13 13
         '*download*',
14 14
     ]
Please login to merge, or discard this patch.
database/migrations/create_url_aliases_table.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('url_aliases', function (Blueprint $table) {
16
+        Schema::create('url_aliases', function(Blueprint $table) {
17 17
             $table->increments('id');
18
-            $table->string('system_path')->nullable();          // system/article/1
19
-            $table->string('aliased_path')->unique();           // article/some-slug-article
20
-            $table->string('type', 25)->nullable();      // null (is alias) | 301 | 302
18
+            $table->string('system_path')->nullable(); // system/article/1
19
+            $table->string('aliased_path')->unique(); // article/some-slug-article
20
+            $table->string('type', 25)->nullable(); // null (is alias) | 301 | 302
21 21
             $table->string('model_type')->nullable();
22 22
             $table->integer('model_id')->nullable();
23 23
 
Please login to merge, or discard this patch.