Passed
Push — dev5 ( b5930c...096006 )
by Ron
08:23
created
app/Http/Controllers/FileLinks/FileLinksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public function find($id)
43 43
     {
44 44
         //  If the user is trying to access the links of another user, they must have the proper permissions permissions
45
-        if ($id != 0)
45
+        if($id != 0)
46 46
         {
47 47
             $this->authorize('hasAccess', 'manage_users');
48 48
         }
Please login to merge, or discard this patch.
app/Domains/FileLinks/GetFileLinks.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
                     ->orderBy('expire', 'desc')->get();
27 27
 
28 28
         Log::debug('Retrieved all File Links for User ID '.$this->id.'.  Data Gathered - ', array($links));
29
-        if ($this->collection) {
29
+        if($this->collection) {
30 30
             return new FileLinksCollection($links);
31 31
         }
32 32
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@
 block discarded – undo
26 26
                     ->orderBy('expire', 'desc')->get();
27 27
 
28 28
         Log::debug('Retrieved all File Links for User ID '.$this->id.'.  Data Gathered - ', array($links));
29
-        if ($this->collection) {
29
+        if ($this->collection)
30
+        {
30 31
             return new FileLinksCollection($links);
31 32
         }
32 33
 
Please login to merge, or discard this patch.
app/Domains/TechTips/GetTechTipStats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
 {
13 13
     public function getTipsInLastDays($numDays = 30)
14 14
     {
15
-        $tips  = TechTips::where('created_at', '>', Carbon::now()->subDays($numDays))->count();
15
+        $tips = TechTips::where('created_at', '>', Carbon::now()->subDays($numDays))->count();
16 16
         Log::debug('Retrieved new Tech Tip count for last '.$numDays.' days.  Count - $tips');
17 17
         return $tips;
18 18
     }
19 19
 
20 20
     public function getTotalTechTipCount()
21 21
     {
22
-        $tipsTotal   = TechTips::all()->count();
22
+        $tipsTotal = TechTips::all()->count();
23 23
         Log::debug('Retrieved total Tech Tip count.  Count - $tips');
24 24
         return $tipsTotal;
25 25
     }
Please login to merge, or discard this patch.
app/Domains/FilesDomain.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,13 +74,13 @@  discard block
 block discarded – undo
74 74
     protected function isFileDup($fileName)
75 75
     {
76 76
         //  Determine if the filename already exists
77
-        if (Storage::exists($this->path . DIRECTORY_SEPARATOR . $fileName))
77
+        if(Storage::exists($this->path.DIRECTORY_SEPARATOR.$fileName))
78 78
         {
79 79
             $fileParts = pathinfo($fileName);
80
-            $extension = isset($fileParts['extension']) ? ('.' . $fileParts['extension']) : '';
80
+            $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : '';
81 81
 
82 82
             //  Look to see if a number is already appended to a file.  (example - file(1).pdf)
83
-            if (preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match))
83
+            if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match))
84 84
             {
85 85
                 // Has a number, increment it
86 86
                 $base = $match[1];
@@ -96,8 +96,8 @@  discard block
 block discarded – undo
96 96
             //  Increase the number until one that is not in use is found
97 97
             do
98 98
             {
99
-                $fileName = $base . '(' . ++$number . ')' . $extension;
100
-            } while (Storage::exists($this->path.DIRECTORY_SEPARATOR.$fileName));
99
+                $fileName = $base.'('.++$number.')'.$extension;
100
+            } while(Storage::exists($this->path.DIRECTORY_SEPARATOR.$fileName));
101 101
         }
102 102
 
103 103
         return $fileName;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $data = Files::find($fileID);
110 110
         //  Move the file to the proper folder
111
-        try{
111
+        try {
112 112
             Log::debug('Attempting to moving file '.$fileID.' to '.$newPath);
113 113
             Storage::move($data->file_link.$data->file_name, $newPath.DIRECTORY_SEPARATOR.$data->file_name);
114 114
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,8 @@
 block discarded – undo
108 108
     {
109 109
         $data = Files::find($fileID);
110 110
         //  Move the file to the proper folder
111
-        try{
111
+        try
112
+        {
112 113
             Log::debug('Attempting to moving file '.$fileID.' to '.$newPath);
113 114
             Storage::move($data->file_link.$data->file_name, $newPath.DIRECTORY_SEPARATOR.$data->file_name);
114 115
         }
Please login to merge, or discard this patch.
app/Domains/Users/SetUserDetails.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,8 +81,7 @@
 block discarded – undo
81 81
 
82 82
         //  Determine if there is a new password expire's date
83 83
         $newExpire = config('auth.passwords.settings.expire') != null ?
84
-            Carbon::now()->addDays(config('auth.passwords.settings.expire')) :
85
-            null;
84
+            Carbon::now()->addDays(config('auth.passwords.settings.expire')) : null;
86 85
 
87 86
         User::find($userID)->update([
88 87
             'password' => bcrypt($request->newPass),
Please login to merge, or discard this patch.
app/Domains/Customers/CustomerSearch.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
             $searchResults = new CustomersCollection(
48 48
                 Customers::orderBy($request->sortField, $request->sortType)
49 49
                     //  Search the name, dba name, and cust id columns
50
-                    ->where(function($query) use ($request)
51
-                    {
50
+                    ->where(function($query) use ($request) {
52 51
                         $query->where('name', 'like', '%'.$request->name.'%')
53 52
                             ->orWhere('cust_id', 'like', '%'.$request->name.'%')
54 53
                             ->orWhere('dba_name', 'like', '%'.$request->name.'%');
@@ -58,10 +57,8 @@  discard block
 block discarded – undo
58 57
                     //  Include the customers systems
59 58
                     ->with('CustomerSystems.SystemTypes')
60 59
                     //  If the system field is present - search for system type
61
-                    ->when($request->system, function($query) use ($request)
62
-                    {
63
-                        $query->whereHas('CustomerSystems.SystemTypes', function($query) use ($request)
64
-                        {
60
+                    ->when($request->system, function($query) use ($request) {
61
+                        $query->whereHas('CustomerSystems.SystemTypes', function($query) use ($request) {
65 62
                             $query->where('sys_id', $request->system);
66 63
                         });
67 64
                     })
Please login to merge, or discard this patch.
app/Domains/Customers/GetCustomerContacts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $contact        = CustomerContacts::where('cont_id', $contID)->with('CustomerContactPhones')->first();
39 39
         $contactName    = explode(' ', $contact->name);
40
-        $contactDetails = collect( (object) [
40
+        $contactDetails = collect((object) [
41 41
             'firstName'   => $contactName[0],
42 42
             'lastName'    => isset($contactName[1]) ? $contactName[1] : '',
43 43
             'email'       => $contact->eamil,
Please login to merge, or discard this patch.
app/Domains/TechTips/SetTechTips.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -143,8 +143,7 @@
 block discarded – undo
143 143
         {
144 144
             if(isset($equip['laravel_through_key']))
145 145
             {
146
-                $current = $current->filter(function($item) use ($equip)
147
-                {
146
+                $current = $current->filter(function($item) use ($equip) {
148 147
                     return $item->sys_id != $equip['sys_id'];
149 148
                 });
150 149
             }
Please login to merge, or discard this patch.
app/Http/Controllers/TechTips/TechTipsController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
         return view('tips.details', [
100 100
             'details' => $tipData->toJson(),
101
-            'isFav'   => (new GetUserStats)->checkForTechTipFav($id) ? 'true' : 'false',   // empty($isFav) ? 'false' : 'true',
101
+            'isFav'   => (new GetUserStats)->checkForTechTipFav($id) ? 'true' : 'false', // empty($isFav) ? 'false' : 'true',
102 102
         ]);
103 103
 
104 104
     }
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
         return view('tips.details', [
112 112
             'details' => $tipData['data'],
113
-            'isFav'   => (new GetUserStats)->checkForTechTipFav($id) ? 'true' : 'false',   // empty($isFav) ? 'false' : 'true',
113
+            'isFav'   => (new GetUserStats)->checkForTechTipFav($id) ? 'true' : 'false', // empty($isFav) ? 'false' : 'true',
114 114
             'files'   => $tipData['files'],
115 115
         ]);
116 116
     }
Please login to merge, or discard this patch.