Skip to content

Commit 871668d

Browse files
Replace tabs with spaces
1 parent 730b521 commit 871668d

File tree

10 files changed

+335
-335
lines changed

10 files changed

+335
-335
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Require the package from your `composer.json` file
1818

1919
```php
2020
"require": {
21-
"lecturize/laravel-followers": "dev-master"
21+
"lecturize/laravel-followers": "dev-master"
2222
}
2323
```
2424

database/migrations/create_followers_table.php.stub

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ class CreateFollowersTable extends Migration
3131
public function up()
3232
{
3333
Schema::create($this->table, function(Blueprint $table)
34-
{
35-
$table->increments('id');
34+
{
35+
$table->increments('id');
3636

37-
$table->nullableMorphs('follower');
38-
$table->nullableMorphs('followable');
37+
$table->nullableMorphs('follower');
38+
$table->nullableMorphs('followable');
3939

4040
$table->timestamps();
4141
$table->softDeletes();
42-
});
42+
});
4343
}
4444

4545
/**

src/Exceptions/AlreadyFollowingException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
class AlreadyFollowingException extends \Exception
44
{
5-
//
5+
//
66
}

src/Exceptions/CannotBeFollowedException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
class CannotBeFollowedException extends \Exception
44
{
5-
//
5+
//
66
}

src/Exceptions/FollowerNotFoundException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
class FollowerNotFoundException extends \Exception
44
{
5-
//
5+
//
66
}

src/Facades/Follower.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
class Follower extends Facade
66
{
7-
/**
7+
/**
88
* @inheritdoc
9-
*/
10-
protected static function getFacadeAccessor()
11-
{
12-
return 'followers';
13-
}
9+
*/
10+
protected static function getFacadeAccessor()
11+
{
12+
return 'followers';
13+
}
1414
}

src/FollowersServiceProvider.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,30 +8,30 @@ class FollowersServiceProvider extends ServiceProvider
88
'CreateFollowersTable' => 'create_followers_table'
99
];
1010

11-
/**
11+
/**
1212
* @inheritdoc
13-
*/
14-
public function boot()
15-
{
13+
*/
14+
public function boot()
15+
{
1616
$this->handleConfig();
1717
$this->handleMigrations();
18-
}
18+
}
1919

20-
/**
20+
/**
2121
* @inheritdoc
22-
*/
23-
public function register()
24-
{
25-
//
26-
}
22+
*/
23+
public function register()
24+
{
25+
//
26+
}
2727

28-
/**
28+
/**
2929
* @inheritdoc
30-
*/
31-
public function provides()
32-
{
33-
return [];
34-
}
30+
*/
31+
public function provides()
32+
{
33+
return [];
34+
}
3535

3636
/**
3737
* Publish and merge the config file.

src/Models/Follower.php

Lines changed: 48 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ class Follower extends Model
1111
/**
1212
* @inheritdoc
1313
*/
14-
protected $fillable = [
15-
'follower_id',
16-
'follower_type',
17-
'followable_id',
18-
'followable_type',
19-
];
14+
protected $fillable = [
15+
'follower_id',
16+
'follower_type',
17+
'followable_id',
18+
'followable_type',
19+
];
2020

2121
/**
2222
* @inheritdoc
2323
*/
24-
protected $dates = ['deleted_at'];
24+
protected $dates = ['deleted_at'];
2525

2626
/**
2727
* @inheritdoc
2828
*/
29-
protected $with = ['followable', 'follower'];
29+
protected $with = ['followable', 'follower'];
3030

3131
/**
3232
* @inheritdoc
@@ -38,47 +38,47 @@ public function __construct()
3838
$this->table = config('lecturize.followers.table', 'followers');
3939
}
4040

41-
/**
42-
* Morph followables
43-
*
44-
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
45-
*/
46-
public function followable()
47-
{
48-
return $this->morphTo();
49-
}
41+
/**
42+
* Morph followables
43+
*
44+
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
45+
*/
46+
public function followable()
47+
{
48+
return $this->morphTo();
49+
}
5050

51-
/**
52-
* Morph followers
53-
*
54-
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
55-
*/
56-
public function follower()
57-
{
58-
return $this->morphTo();
59-
}
51+
/**
52+
* Morph followers
53+
*
54+
* @return \Illuminate\Database\Eloquent\Relations\MorphTo
55+
*/
56+
public function follower()
57+
{
58+
return $this->morphTo();
59+
}
6060

61-
/**
62-
* @param object $query
63-
* @param Model $followable
64-
* @return mixed
65-
*/
66-
public function scopeFollowing( $query, Model $followable )
67-
{
68-
return $query
69-
->where( 'followable_id', $followable->id )
70-
->where( 'followable_type', get_class($followable) );
71-
}
61+
/**
62+
* @param object $query
63+
* @param Model $followable
64+
* @return mixed
65+
*/
66+
public function scopeFollowing( $query, Model $followable )
67+
{
68+
return $query
69+
->where( 'followable_id', $followable->id )
70+
->where( 'followable_type', get_class($followable) );
71+
}
7272

73-
/**
74-
* @param object $query
75-
* @param Model $follower
76-
* @return mixed
77-
*/
78-
public function scopeFollowedBy( $query, Model $follower )
79-
{
80-
return $query
81-
->where( 'follower_id', $follower->id )
82-
->where( 'follower_type', get_class($follower) );
83-
}
73+
/**
74+
* @param object $query
75+
* @param Model $follower
76+
* @return mixed
77+
*/
78+
public function scopeFollowedBy( $query, Model $follower )
79+
{
80+
return $query
81+
->where( 'follower_id', $follower->id )
82+
->where( 'follower_type', get_class($follower) );
83+
}
8484
}

0 commit comments

Comments
 (0)