Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[codespell]
skip = ./phpmd.xml,./CONTRIBUTORS.md,./composer.lock,*.min.js,*.map,./resources/lang/*,./node_modules/*,./public/vendor/*,./sample_csvs/*,./database/migrations/*,./public/js/*
count =
quiet-level = 3
ignore-words-list = checkin,Checkin,currentY,userA
6 changes: 3 additions & 3 deletions ansible/freebsd/vagrant_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
become: true

#
# Install php and php dependancies
# Install php and php dependencies
#
- name: Install PHP dependancies
- name: Install PHP dependencies
pkgng:
name: "{{ item }}"
state: present
Expand Down Expand Up @@ -94,7 +94,7 @@
become: true

#
# Install the lastest version of composer
# Install the latest version of composer
#
- name: Composer check
stat:
Expand Down
2 changes: 1 addition & 1 deletion ansible/ubuntu/vagrant_playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
- unzip
- python-pymysql
#
# Install the lastest version of composer
# Install the latest version of composer
#
- name: Composer check
stat:
Expand Down
8 changes: 4 additions & 4 deletions app/Console/Commands/LdapTroubleshooter.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public function handle()
$this->line("Trying TLS first for port $port");
$ldap_url = "ldaps://".$parsed['host'].":$port";
if($this->test_anonymous_bind($ldap_url)) {
$this->info("Anonymous bind succesful to $ldap_url!");
$this->info("Anonymous bind successful to $ldap_url!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "no" ];
continue; // TODO - lots of copypasta in these if(test_anonymous_bind()) routines...
Expand All @@ -282,7 +282,7 @@ public function handle()
}

if($this->test_anonymous_bind($ldap_url, false)) {
$this->info("Anonymous bind succesful to $ldap_url with certifcate-checks disabled");
$this->info("Anonymous bind successful to $ldap_url with certificate-checks disabled");
$ldap_urls[] = [ $ldap_url, false, false ];
$pretty_ldap_urls[] = [ $ldap_url, "no", "no" ];
continue;
Expand All @@ -292,7 +292,7 @@ public function handle()

$ldap_url = "ldap://".$parsed['host'].":$port";
if($this->test_anonymous_bind($ldap_url, true, true)) {
$this->info("Plain connection to $ldap_url with STARTTLS succesful!");
$this->info("Plain connection to $ldap_url with STARTTLS successful!");
$ldap_urls[] = [ $ldap_url, true, true ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "YES" ];
continue;
Expand All @@ -301,7 +301,7 @@ public function handle()
}

if($this->test_anonymous_bind($ldap_url)) {
$this->info("Plain connection to $ldap_url succesful!");
$this->info("Plain connection to $ldap_url successful!");
$ldap_urls[] = [ $ldap_url, true, false ];
$pretty_ldap_urls[] = [ $ldap_url, "YES", "no" ];
continue;
Expand Down
4 changes: 2 additions & 2 deletions app/Console/Commands/RestoreFromBackup.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function guess_prefix($input):string
$parser->should_guess = true;
$parser->line_aware_piping(); // <----- THIS is doing the heavy lifting!

$check_tables = ['settings' => null, 'migrations' => null /* 'assets' => null */]; //TODO - move to statics?
$check_tables = ['settings' => null, 'migrations' => null /* 'assets' => null */]; //TODO - move to static?
//can't use 'users' because the 'accessories_checkout' table?
// can't use 'assets' because 'ver1_components_assets'
foreach($check_tables as $check_table => $_ignore) {
Expand Down Expand Up @@ -508,7 +508,7 @@ public function handle()
$bar->finish();
$this->line('');
} else {
$this->info(count($interesting_files).' files were succesfully transferred');
$this->info(count($interesting_files).' files were successfully transferred');
}
if (count($unsafe_files) > 0) {
foreach ($unsafe_files as $unsafe_file) {
Expand Down
2 changes: 1 addition & 1 deletion app/Events/CheckoutableCheckedIn.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CheckoutableCheckedIn
public $checkedOutTo;
public $checkedInBy;
public $note;
public $action_date; // Date setted in the hardware.checkin view at the checkin_at input, for the action log
public $action_date; // Date set in the hardware.checkin view at the checkin_at input, for the action log
public $originalValues;

/**
Expand Down
2 changes: 1 addition & 1 deletion app/Helpers/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ static public function getRedirectOption($request, $id, $table, $item_id = null)

/**
* Check for inconsistencies before activating scoped locations with FullMultipleCompanySupport
* If there are locations with different companies than related objects unforseen problems could arise
* If there are locations with different companies than related objects unforeseen problems could arise
*
* @author T. Regnery <[email protected]>
* @since 7.0
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/PredefinedKitsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function destroy($id) : JsonResponse
$this->authorize('delete', PredefinedKit::class);
$kit = PredefinedKit::findOrFail($id);

// Delete childs
// Delete children
$kit->models()->detach();
$kit->licenses()->detach();
$kit->consumables()->detach();
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/AssetModelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public function postBulkEdit(Request $request) : View | RedirectResponse


/**
* Returns a view that allows the user to bulk edit model attrbutes
* Returns a view that allows the user to bulk edit model attributes
*
* @author [A. Gianotto] [<[email protected]>]
* @since [v1.7]
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Assets/BulkAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ public function storeCheckout(AssetCheckoutRequest $request) : RedirectResponse
}

$errors = [];
DB::transaction(function () use ($target, $admin, $checkout_at, $expected_checkin, &$errors, $assets, $request) { //NOTE: $errors is passsed by reference!
DB::transaction(function () use ($target, $admin, $checkout_at, $expected_checkin, &$errors, $assets, $request) { //NOTE: $errors is passed by reference!
foreach ($assets as $asset) {
$this->authorize('checkout', $asset);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function reset(Request $request)
if (strpos(Setting::passwordComplexityRulesSaving('store'), 'disallow_same_pwd_as_user_fields') !== false) {
$request->validate(
[
'password' => 'required|notIn:["'.$user->email.'","'.$user->username.'","'.$user->first_name.'","'.$user->last_name.'"',
'password' => 'required|notIn:["'.$user->email.'","'.$user->username.'","'.$user->first_name.'","'.$user->last_name.'"', // codespell:ignore
], $messages);
}

Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/BulkAssetModelsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class BulkAssetModelsController extends Controller
{
/**
* Returns a view that allows the user to bulk edit model attrbutes
* Returns a view that allows the user to bulk edit model attributes
*
* @author [A. Gianotto] [<[email protected]>]
* @since [v1.7]
Expand Down Expand Up @@ -55,7 +55,7 @@ public function edit(Request $request) : View | RedirectResponse
}

/**
* Returns a view that allows the user to bulk edit model attrbutes
* Returns a view that allows the user to bulk edit model attributes
*
* @author [A. Gianotto] [<[email protected]>]
* @since [v1.7]
Expand Down
12 changes: 6 additions & 6 deletions app/Http/Controllers/Kits/PredefinedKitsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function destroy($kit_id)
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_not_found'));
}

// Delete childs
// Delete children
$kit->models()->detach();
$kit->licenses()->detach();
$kit->consumables()->detach();
Expand Down Expand Up @@ -217,7 +217,7 @@ public function detachModel($kit_id, $model_id)
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_none'));
}

// Delete childs
// Delete children
$kit->models()->detach($model_id);

// Redirect to the kit management page
Expand Down Expand Up @@ -250,7 +250,7 @@ public function editLicense($kit_id, $license_id)
}

/**
* Update attached licese
* Update attached license
*
* @author [D. Minaev] [<[email protected]>]
* @param int $kit_id
Expand Down Expand Up @@ -296,7 +296,7 @@ public function detachLicense($kit_id, $license_id)
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_none'));
}

// Delete childs
// Delete children
$kit->licenses()->detach($license_id);

// Redirect to the kit management page
Expand Down Expand Up @@ -374,7 +374,7 @@ public function detachAccessory($kit_id, $accessory_id)
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_none'));
}

// Delete childs
// Delete children
$kit->accessories()->detach($accessory_id);

// Redirect to the kit management page
Expand Down Expand Up @@ -452,7 +452,7 @@ public function detachConsumable($kit_id, $consumable_id)
return redirect()->route('kits.index')->with('error', trans('admin/kits/general.kit_none'));
}

// Delete childs
// Delete children
$kit->consumables()->detach($consumable_id);

// Redirect to the kit management page
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/ViewAssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getIndex() : View | RedirectResponse

}

// Since some models may re-use the same fieldsets/fields, let's make the array unique so we don't repeat columns
// Since some models may reuse the same fieldsets/fields, let's make the array unique so we don't repeat columns
array_unique($field_array);

if (isset($user->id)) {
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/DeleteUserRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function prepareForValidation(): void
public function rules(): array
{
return [
'user' => Rule::notIn([auth()->id()]),
'user' => Rule::notIn([auth()->id()]), # codespell:ignore
'managed_users' => Rule::in([0]),
'managed_locations' => Rule::in([0]),
'assigned_assets' => Rule::in([0]),
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Requests/SettingsSamlRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function withValidator($validator)
$x509 = openssl_x509_read($custom_x509cert);
$pkey = openssl_pkey_get_private($custom_privateKey);
} elseif ($this->input('saml_sp_regenerate_keypair') == '1' || ! $this->has('saml_sp_x509cert') || $was_custom_x509cert) {
// key regeneration requested, no certificate defined yet or previous custom certicate was removed
// key regeneration requested, no certificate defined yet or previous custom certificate was removed
error_log('regen');
$cert_updated = true;
$dn = [
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Transformers/DepreciationReportTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
use Illuminate\Database\Eloquent\Collection;

/**
* This tranformer looks like it's extraneous, since we return as much or more
* This transformer looks like it's extraneous, since we return as much or more
* info in the AssetsTransformer, but we want to flatten these results out so that they
* don't dislose more information than we want. Folks with depreciation powers don't necessaily
* don't dislose more information than we want. Folks with depreciation powers don't necessarily
* have the right to see additional info, and inspecting the API call here could disclose
* info they're not supposed to see.
*
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Transformers/PredefinedKitsTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function transformPredefinedKit(PredefinedKit $kit)
}

/**
* transform collection of any elemets attached to kit
* transform collection of any elements attached to kit
* @return array
*/
public function transformElements(Collection $elements, $total)
Expand Down
2 changes: 1 addition & 1 deletion app/Importer/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public function import()

$this->log('------------- Action Summary ----------------');
}
Model::reguard();
Model::reguard(); # codespell:ignore
});
}

Expand Down
2 changes: 1 addition & 1 deletion app/Models/Accessory.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public function manufacturer()
}

/**
* Determins whether or not an email should be sent for checkin/checkout of this
* Determines whether or not an email should be sent for checkin/checkout of this
* accessory based on the category it belongs to.
*
* @author [A. Gianotto] [<[email protected]>]
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Company.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function components()
/**
* Scoping table queries, determining if a logged in user is part of a company, and only allows the user to access items associated with that company if FMCS is enabled.
*
* This method is the one that the CompanyableTrait uses to contrain queries automatically, however that trait CANNOT be
* This method is the one that the CompanyableTrait uses to constrain queries automatically, however that trait CANNOT be
* applied to the user's model, since it causes an infinite loop against the authenticated user.
*
* @todo - refactor that trait to handle the user's model as well.
Expand Down
2 changes: 1 addition & 1 deletion app/Models/CustomField.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class CustomField extends Model
UniqueUndeletedTrait;

/**
* Custom field predfined formats
* Custom field predefined formats
*
* @var array
*/
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Labels/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function setOptions($options) {

public function toArray(Asset $asset) { return Field::makeArray($this, $asset); }

/* Statics */
/* Static functions */

public static function makeArray(Field $field, Asset $asset) {
return $field->getOptions()
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Labels/FieldOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function getValue(Asset $asset) {
public function toArray(Asset $asset=null) { return FieldOption::makeArray($this, $asset); }
public function toString() { return FieldOption::makeString($this); }

/* Statics */
/* Static functions */

public static function makeArray(FieldOption $option, Asset $asset=null) {
return [
Expand Down
4 changes: 2 additions & 2 deletions app/Models/Ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ public static function findAndBindUserLdap($username, $password)
* TODO PLEASE:
*
* this isn't very clear, so it's important to note: the $ldapbind value is never correctly returned - we never 'return true' from self::bindAdminToLdap() (the function
* just "falls off the end" without ever explictly returning 'true')
* just "falls off the end" without ever explicitly returning 'true')
*
* but it *does* have an interesting side-effect of checking for the LDAP password being incorrectly encrypted with the wrong APP_KEY, so I'm leaving it in for now.
*
* If it *did* correctly return 'true' on a succesful bind, it would _probably_ allow users to log in with an incorrect password. Which would be horrible!
* If it *did* correctly return 'true' on a successful bind, it would _probably_ allow users to log in with an incorrect password. Which would be horrible!
*
* Let's definitely fix this at the next refactor!!!!
*
Expand Down
2 changes: 1 addition & 1 deletion app/Models/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ public function getAvailSeatsCountAttribute()
}

/**
* Retuns the number of assigned seats for this asset
* Returns the number of assigned seats for this asset
*
* @author A. Gianotto <[email protected]>
* @since [v3.0]
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static function getDefaultEula(): ?string
}

/**
* Check wether to show in model dropdowns.
* Check whether to show in model dropdowns.
*
* @param string $element
*
Expand Down
2 changes: 1 addition & 1 deletion app/Presenters/DepreciationReportPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public function fullStatusText() {
}

/**
* Date the warantee expires.
* Date the warranty expires.
* @return false|string
*/
public function warranty_expires()
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/ValidationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function boot()

$test_string = 'My hovercraft is full of eels';

// We have to stip out the regex: part here to check with preg_match
// We have to strip out the regex: part here to check with preg_match
$test_pattern = str_replace('regex:', '', $value);

try {
Expand Down
4 changes: 2 additions & 2 deletions config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
| ENABLE HTTP Strict Transport Security (HSTS)
|--------------------------------------------------------------------------
|
| This is set to default false for backwards compatibilty but should be
| This is set to default false for backwards compatibility but should be
| set to true if the hosting environment allows it.
|
| See https://scotthelme.co.uk/hsts-the-missing-link-in-tls/
Expand Down Expand Up @@ -421,7 +421,7 @@
| Escape Excel formulas in CSV exports
|--------------------------------------------------------------------------
|
| This determins whether or not we should escape Excel formulas in CSV exports.
| This determines whether or not we should escape Excel formulas in CSV exports.
| This can be UNSAFE in untrusted environments, and therefore defaults to true
| so that Excel forumals WILL be escaped in CSV exports, however if your workflow
| is designed around using formulas in your fields, you
Expand Down
Loading
Loading