Completed
Pull Request — master (#20)
by Karl
05:01
created
app/Repositories/Contracts/UserRepositoryInterface.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 {
5 5
     public function confirm($token = null);
6 6
 
7
-    public function create($data = []);
7
+    public function create($data = [ ]);
8 8
 
9
-    public function firstOrCreate($data = []);
9
+    public function firstOrCreate($data = [ ]);
10 10
 
11
-    public function getById($id = null, $options = []);
11
+    public function getById($id = null, $options = [ ]);
12 12
 
13
-    public function update($id = null, $data = []);
13
+    public function update($id = null, $data = [ ]);
14 14
 }
Please login to merge, or discard this patch.
app/Repositories/Contracts/SearchRepositoryInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 interface SearchRepositoryInterface
4 4
 {
5
-    public function create($userId = null, $data = []);
5
+    public function create($userId = null, $data = [ ]);
6 6
 
7 7
     public function getActive($userEmail = null);
8 8
 }
Please login to merge, or discard this patch.
app/Repositories/SearchRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@
 block discarded – undo
27 27
      *
28 28
      * @return Search
29 29
      */
30
-    public function create($userId = null, $data = [])
30
+    public function create($userId = null, $data = [ ])
31 31
     {
32 32
         return $this->searches->create(
33
-            array_merge(['user_id' => $userId], $data)
33
+            array_merge([ 'user_id' => $userId ], $data)
34 34
         );
35 35
     }
36 36
 
Please login to merge, or discard this patch.
app/Repositories/UserRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         $tokenObject = $this->getUnexpiredConfirmationToken($token);
41 41
         if ($tokenObject) {
42
-            if ($this->update($tokenObject->user_id, ['confirmed_at' => Carbon::now()])) {
42
+            if ($this->update($tokenObject->user_id, [ 'confirmed_at' => Carbon::now() ])) {
43 43
                 return true;
44 44
             }
45 45
         }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      *
54 54
      * @return \JobApis\JobsToMail\Models\User
55 55
      */
56
-    public function create($data = [])
56
+    public function create($data = [ ])
57 57
     {
58 58
         $user = $this->users->create($data);
59 59
 
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return \JobApis\JobsToMail\Models\User
71 71
      */
72
-    public function firstOrCreate($data = [])
72
+    public function firstOrCreate($data = [ ])
73 73
     {
74
-        if ($user = $this->users->where('email', $data['email'])->first()) {
74
+        if ($user = $this->users->where('email', $data[ 'email' ])->first()) {
75 75
             // Resend the user a confirmation token if they haven't confirmed
76 76
             if (!$user->confirmed_at) {
77 77
                 $this->sendConfirmationToken($user);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      *
91 91
      * @return \JobApis\JobsToMail\Models\User
92 92
      */
93
-    public function getById($id = null, $options = [])
93
+    public function getById($id = null, $options = [ ])
94 94
     {
95 95
         return $this->users->where('id', $id)->first();
96 96
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *
104 104
      * @return boolean
105 105
      */
106
-    public function update($id = null, $data = [])
106
+    public function update($id = null, $data = [ ])
107 107
     {
108 108
         return $this->users->where('id', $id)->update($data);
109 109
     }
Please login to merge, or discard this patch.
database/factories/SearchFactory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,13 +6,13 @@
 block discarded – undo
6 6
 |--------------------------------------------------------------------------
7 7
 */
8 8
 
9
-$factory->define(\JobApis\JobsToMail\Models\Search::class, function (Faker\Generator $faker) {
9
+$factory->define(\JobApis\JobsToMail\Models\Search::class, function(Faker\Generator $faker) {
10 10
     return [
11 11
         'keyword' => $faker->word(),
12 12
         'location' => $faker->word().', '.$this->faker->word(),
13 13
     ];
14 14
 });
15
-$factory->state(\JobApis\JobsToMail\Models\Search::class, 'deleted', function (Faker\Generator $faker) {
15
+$factory->state(\JobApis\JobsToMail\Models\Search::class, 'deleted', function(Faker\Generator $faker) {
16 16
     return [
17 17
         'deleted_at' => $faker->dateTimeThisYear(),
18 18
     ];
Please login to merge, or discard this patch.
database/migrations/2016_10_14_215937_create_searches_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('searches', function (Blueprint $table) {
16
+        Schema::create('searches', function(Blueprint $table) {
17 17
             $table->uuid('id');
18 18
             $table->primary('id');
19 19
             $table->uuid('user_id')->unsigned();
Please login to merge, or discard this patch.
database/migrations/2016_10_16_214801_create_notifications_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('notifications', function (Blueprint $table) {
15
+        Schema::create('notifications', function(Blueprint $table) {
16 16
             $table->uuid('id')->primary();
17 17
             $table->string('type');
18 18
             $table->uuid('notifiable_id');
Please login to merge, or discard this patch.
app/Notifications/JobsCollected.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function via($notifiable)
45 45
     {
46
-        return ['mail', 'database'];
46
+        return [ 'mail', 'database' ];
47 47
     }
48 48
 
49 49
     /**
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
         $count = count($this->jobs);
69 69
         $message = new JobMailMessage();
70 70
         // Add user and search ID to view data
71
-        $message->viewData['user_id'] = $notifiable->id;
72
-        $message->viewData['search_id'] = $this->search->id;
71
+        $message->viewData[ 'user_id' ] = $notifiable->id;
72
+        $message->viewData[ 'search_id' ] = $this->search->id;
73 73
         // Update the message and subject
74 74
         $message->subject($count.' job listings found especially for you')
75 75
             ->greeting('Hello,')
Please login to merge, or discard this patch.
app/Http/Controllers/UsersController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
         $results = $this->dispatchNow(new GetUserSearches($userId));
69 69
 
70 70
         if (!$results->isEmpty()) {
71
-            return view('searches.index', ['searches' => $results]);
71
+            return view('searches.index', [ 'searches' => $results ]);
72 72
         }
73 73
 
74 74
         return redirect('/');
Please login to merge, or discard this patch.