Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ public function setDefaultTimeReminderIsSentAttribute($value)
/**
* Check if the account can be downgraded, based on a set of rules.
*
* @return this
* @return $this
*/
public function canDowngrade()
{
Expand Down
1 change: 0 additions & 1 deletion app/ApiUsage.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ApiUsage extends Model

/**
* Log a request made through the API.
* @param Request $request
*/
public function log(\Illuminate\Http\Request $request)
{
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/ImportCSV.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function handle()
$contact->setAvatarColor();

if (! empty($data[14])) {
$birthdate = date('Y-m-d', strtotime($data[14]));
$birthdate = new \DateTime(strtotime($data[14]));

$specialDate = $contact->setSpecialDate('birthdate', $birthdate->format('Y'), $birthdate->format('m'), $birthdate->format('d'));
$newReminder = $specialDate->setReminder('year', 1, trans('people.people_add_birthday_reminder', ['name' => $contact->first_name]));
Expand Down
8 changes: 5 additions & 3 deletions app/Console/Commands/PingVersionServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ public function handle()
'contacts' => Contact::count(),
];

$data['uuid'] = $instance->uuid;
$data['version'] = $instance->current_version;
$data['contacts'] = Contact::all()->count();
$data = [
'uuid' => $instance->uuid,
'version' => $instance->current_version,
'contacts' => Contact::all()->count(),
];

// Send the JSON
try {
Expand Down
4 changes: 3 additions & 1 deletion app/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
use Illuminate\Support\Facades\Storage;
use Illuminate\Database\Eloquent\Builder;
use App\Http\Resources\Tag\Tag as TagResource;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use App\Http\Resources\Address\AddressShort as AddressShortResource;
use App\Http\Resources\Contact\PartnerShort as PartnerShortResource;
use App\Http\Resources\Contact\OffspringShort as OffspringShortResource;
Expand Down Expand Up @@ -518,7 +520,7 @@ public function getInitials()
/**
* Get the date of the last activity done by this contact.
*
* @return DateTime
* @return \DateTime
*/
public function getLastActivityDate()
{
Expand Down
1 change: 1 addition & 0 deletions app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Exceptions;

use Exception;
use Illuminate\Session\TokenMismatchException;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
Expand Down
2 changes: 1 addition & 1 deletion app/Gift.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* @property Account $account
* @property Contact $contact
* @property Contact|Kid|SignificantOther $recipient
* @property Contact $recipient
* @method static Builder offered()
* @method static Builder isIdea()
*/
Expand Down
4 changes: 2 additions & 2 deletions app/Helpers/VCardHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ public static function prepareVCard(Contact $contact)
*
* @param Contact $contact
* @param string $fieldType
* @return Collection|string
* @return \Illuminate\Database\Eloquent\Collection|null
*/
public static function getAllEntriesOfASpecificContactFieldType(Contact $contact, String $fieldType)
public static function getAllEntriesOfASpecificContactFieldType(Contact $contact, string $fieldType)
{
$contactFieldType = $contact->account->contactFieldTypes()
->where('type', $fieldType)
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Api/ApiActivityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

namespace App\Http\Controllers\Api;

use App\Note;
use Validator;
use App\Contact;
use App\Activity;
use App\ActivityType;
use App\JournalEntry;
use Illuminate\Http\Request;
use Illuminate\Database\QueryException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Api/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct()

/**
* Default request to the API.
* @return json
* @return \Illuminate\Http\JsonResponse
*/
public function success()
{
Expand Down Expand Up @@ -203,7 +203,7 @@ public function setSQLOrderByQuery($criteria)
* Sends a JSON to the consumer.
* @param array $data
* @param array $headers [description]
* @return Response
* @return \Illuminate\Http\JsonResponse
*/
public function respond($data, $headers = [])
{
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/Auth/PasswordChangeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Http\Controllers\Auth;

use Auth;
use App\User;
use Illuminate\Support\Str;
use UnexpectedValueException;
use App\Http\Requests\Request;
Expand Down
1 change: 0 additions & 1 deletion app/Http/Controllers/Contacts/AddressesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public function get(Contact $contact)
'googleMapAddress' => $address->getGoogleMapAddress(),
'address' => $address->getFullAddress(),
'country_id' => $address->country_id,
'name' => $address->name,
'street' => $address->street,
'city' => $address->city,
'province' => $address->province,
Expand Down
2 changes: 2 additions & 0 deletions app/Http/Controllers/Contacts/IntroductionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

namespace App\Http\Controllers\Contacts;

use App\Gift;
use App\Contact;
use App\Http\Controllers\Controller;
use App\Http\Requests\People\IntroductionsRequest;
use Illuminate\Database\Eloquent\ModelNotFoundException;

class IntroductionsController extends Controller
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Contacts/KidsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public function edit(Contact $contact, Contact $kid)
*
* @param KidsRequest $request
* @param Contact $contact
* @param Kid $kid
* @param Contact $kid
* @return \Illuminate\Http\Response
*/
public function update(KidsRequest $request, Contact $contact, Contact $kid)
Expand Down Expand Up @@ -174,7 +174,7 @@ public function update(KidsRequest $request, Contact $contact, Contact $kid)
* Remove the specified resource from storage.
*
* @param Contact $contact
* @param Kid $kid
* @param Contact $kid
* @return \Illuminate\Http\Response
*/
public function destroy(Contact $contact, Contact $kid)
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Contacts/TagsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ class TagsController extends Controller
/**
* Update the specified resource in storage.
*
* @param GiftsRequest $request
* @param TagsRequest $request
* @param Contact $contact
* @param Gift $gift
*
* @return \Illuminate\Http\Response
*/
public function update(TagsRequest $request, Contact $contact)
Expand Down
3 changes: 2 additions & 1 deletion app/Http/Controllers/ContactsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function index(Request $request)
}

$date_flag = false;
$date_sort = null;

if (str_contains($sort, 'lastactivitydate')) {
$date_sort = str_after($sort, 'lastactivitydate');
Expand Down Expand Up @@ -463,7 +464,7 @@ public function search(Request $request)
public function vCard(Contact $contact)
{
if (config('app.debug')) {
\Debugbar::disable();
\Barryvdh\Debugbar\Facade::disable();
}

$vcard = VCardHelper::prepareVCard($contact);
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use App\Debt;
use App\Contact;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;

class DashboardController extends Controller
{
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/JournalController.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function create()
* Saves the journal entry.
*
* @param Request $request
* @return Response
* @return \Illuminate\Http\RedirectResponse
*/
public function save(Request $request)
{
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/Settings/MultiFAController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace App\Http\Controllers\Settings;

use Google2FA;
use Illuminate\Http\Request;
use PragmaRX\Google2FA\Google2FA;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RedirectsUsers;
use PragmaRX\Google2FALaravel\Support\Authenticator;
Expand Down Expand Up @@ -41,7 +41,7 @@ public function enableTwoFactor(Request $request)
$user = $request->user();

//generate image for QR barcode
$imageDataUri = Google2FA::getQRCodeInline(
$imageDataUri = app('pragmarx.google2fa')->getQRCodeInline(
$request->getHttpHost(),
$user->email,
$secret,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use App\ContactFieldType;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Database\Eloquent\ModelNotFoundException;

class PersonalizationController extends Controller
{
Expand Down
1 change: 1 addition & 0 deletions app/ImportJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Jobs/AddContactFromVCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public function handle()
$this->importJob->contacts_imported = $this->importedContacts;
$this->importJob->ended_at = \Carbon\Carbon::now();
$this->importJob->save();
} catch (Exception $e) {
} catch (\Exception $e) {
$this->importJob->contacts_found = $numberOfContactsInTheFile;
$this->importJob->failed = 1;
$this->importJob->failed_reason = $e->getMessage();
Expand Down
1 change: 1 addition & 0 deletions app/Jobs/ResizeAvatars.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Intervention\Image\Facades\Image as Image;
use Illuminate\Contracts\Filesystem\FileNotFoundException;

class ResizeAvatars implements ShouldQueue
{
Expand Down
1 change: 1 addition & 0 deletions app/Traits/Journalable.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace App\Traits;

use App\JournalEntry;
use Illuminate\Database\Eloquent\ModelNotFoundException;

trait Journalable
{
Expand Down
2 changes: 1 addition & 1 deletion app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function setGoogle2faSecretAttribute($value)
* Decrypt the user's google_2fa secret.
*
* @param string $value
* @return string
* @return string|null
*/
public function getGoogle2faSecretAttribute($value)
{
Expand Down