Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply fixes from StyleCI #282

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
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
36 changes: 20 additions & 16 deletions resources/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Str;

if (! function_exists('set_active')) {
if (!function_exists('set_active')) {
/**
* Determine if a route is the currently active route.
*
* @param string $path
* @param string $class
* @param string $path
* @param string $class
*
* @return string
*/
function set_active($path, $class = 'active')
Expand All @@ -17,12 +18,13 @@ function set_active($path, $class = 'active')
}
}

if (! function_exists('strs_contain')) {
if (!function_exists('strs_contain')) {
/**
* Determine whether any of the provided strings in the haystack contain the needle.
*
* @param array $haystacks
* @param string $needle
* @param array $haystacks
* @param string $needle
*
* @return bool
*/
function strs_contain($haystacks, $needle)
Expand All @@ -41,30 +43,31 @@ function strs_contain($haystacks, $needle)
}
}

if (! function_exists('array_diff_assoc_recursive')) {
if (!function_exists('array_diff_assoc_recursive')) {
/**
* Recursively diff two arrays.
*
* @param array $arrayOne
* @param array $arrayTwo
* @param array $arrayOne
* @param array $arrayTwo
*
* @return array
*/
function array_diff_assoc_recursive($arrayOne, $arrayTwo)
{
$difference = [];
foreach ($arrayOne as $key => $value) {
if (is_array($value) || $value instanceof Illuminate\Support\Collection) {
if (! isset($arrayTwo[$key])) {
if (!isset($arrayTwo[$key])) {
$difference[$key] = $value;
} elseif (! (is_array($arrayTwo[$key]) || $arrayTwo[$key] instanceof Illuminate\Support\Collection)) {
} elseif (!(is_array($arrayTwo[$key]) || $arrayTwo[$key] instanceof Illuminate\Support\Collection)) {
$difference[$key] = $value;
} else {
$new_diff = array_diff_assoc_recursive($value, $arrayTwo[$key]);
if ($new_diff != false) {
$difference[$key] = $new_diff;
}
}
} elseif (! isset($arrayTwo[$key])) {
} elseif (!isset($arrayTwo[$key])) {
$difference[$key] = $value;
}
}
Expand All @@ -73,12 +76,13 @@ function array_diff_assoc_recursive($arrayOne, $arrayTwo)
}
}

if (! function_exists('str_before')) {
if (!function_exists('str_before')) {
/**
* Get the portion of a string before a given value.
*
* @param string $subject
* @param string $search
* @param string $subject
* @param string $search
*
* @return string
*/
function str_before($subject, $search)
Expand All @@ -88,7 +92,7 @@ function str_before($subject, $search)
}

// Array undot
if (! function_exists('array_undot')) {
if (!function_exists('array_undot')) {
/**
* Expands a single level array with dot notation into a multi-dimensional array.
*
Expand Down
2 changes: 1 addition & 1 deletion resources/lang/de/errors.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

return [
'language_exists' => 'Die Sprache { :language } ist bereits vorhanden',
'key_exists' => 'Der Übersetzungsschlüssel { :key } ist bereits vorhanden',
'key_exists' => 'Der Übersetzungsschlüssel { :key } ist bereits vorhanden',
];
84 changes: 42 additions & 42 deletions resources/lang/de/translation.php
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
<?php

return [
'languages' => 'Sprachen',
'language' => 'Sprache',
'type' => 'Typ',
'file' => 'Datei',
'key' => 'Schlüssel',
'prompt_language' => 'Geben Sie den Sprachcode ein, den Sie hinzufügen möchten (z.B. en).',
'language_added' => 'Neue Sprache wurde erfolgreich hinzugefügt 🙌',
'languages' => 'Sprachen',
'language' => 'Sprache',
'type' => 'Typ',
'file' => 'Datei',
'key' => 'Schlüssel',
'prompt_language' => 'Geben Sie den Sprachcode ein, den Sie hinzufügen möchten (z.B. en).',
'language_added' => 'Neue Sprache wurde erfolgreich hinzugefügt 🙌',
'prompt_language_for_key' => 'Geben Sie die Sprache für den Schlüssel ein (z.B. en)',
'prompt_type' => 'Ist das ein Json- oder Array-Schlüssel?',
'prompt_file' => 'In welcher Datei wird das gespeichert?',
'prompt_key' => 'Was ist der Schlüssel für diese Übersetzung?',
'prompt_value' => 'Was ist der Wert für diese Übersetzung',
'type_error' => 'Übersetzungstyp muss json oder ein Array sein',
'language_key_added' => 'Neuer Sprachenschlüssel wurde erfolgreich hinzugefügt 👏',
'no_missing_keys' => 'Es fehlen keine Übersetzungsschlüssel in der App 🎉',
'keys_synced' => 'Fehlende Schlüssel erfolgreich synchronisiert 🎊',
'search' => 'Alle Übersetzungen suchen',
'translations' => 'Übersetzung',
'language_name' => 'Name',
'locale' => 'locale',
'add' => '+ Hinzufügen',
'add_language' => 'Neue Sprache hinzufügen',
'save' => 'save',
'language_exists' => 'Das :attribute ist bereits vorhanden.',
'uh_oh' => 'Etwas ist nicht ganz richtig',
'group_single' => 'Gruppe / Single',
'Gruppe' => 'Gruppe',
'single' => 'single',
'value' => 'Wert',
'namespace' => 'Namespace',
'synchronisieren' => 'Übersetzungen synchronisieren ⏳',
'synced' => 'Übersetzungen wurden synchronisiert 😎',
'add_translation' => 'Übersetzung hinzufügen',
'translation_added' => 'Neue Übersetzung erfolgreich hinzugefügt 🙌',
'namespace_label' => 'Namespace (optional)',
'group_label' => 'Gruppe (optional)',
'key_label' => 'Schlüssel',
'value_label' => 'Wert',
'namespace_placeholder' => 'z.B. my_package',
'group_placeholder' => 'z.B. validation',
'key_placeholder' => 'z.B. invalid_key',
'value_placeholder' => 'z.B. Schlüssel müssen eine einzige Zeichenfolge sein',
'advanced_options' => 'Erweiterte Optionen umschalten',
'prompt_type' => 'Ist das ein Json- oder Array-Schlüssel?',
'prompt_file' => 'In welcher Datei wird das gespeichert?',
'prompt_key' => 'Was ist der Schlüssel für diese Übersetzung?',
'prompt_value' => 'Was ist der Wert für diese Übersetzung',
'type_error' => 'Übersetzungstyp muss json oder ein Array sein',
'language_key_added' => 'Neuer Sprachenschlüssel wurde erfolgreich hinzugefügt 👏',
'no_missing_keys' => 'Es fehlen keine Übersetzungsschlüssel in der App 🎉',
'keys_synced' => 'Fehlende Schlüssel erfolgreich synchronisiert 🎊',
'search' => 'Alle Übersetzungen suchen',
'translations' => 'Übersetzung',
'language_name' => 'Name',
'locale' => 'locale',
'add' => '+ Hinzufügen',
'add_language' => 'Neue Sprache hinzufügen',
'save' => 'save',
'language_exists' => 'Das :attribute ist bereits vorhanden.',
'uh_oh' => 'Etwas ist nicht ganz richtig',
'group_single' => 'Gruppe / Single',
'Gruppe' => 'Gruppe',
'single' => 'single',
'value' => 'Wert',
'namespace' => 'Namespace',
'synchronisieren' => 'Übersetzungen synchronisieren ⏳',
'synced' => 'Übersetzungen wurden synchronisiert 😎',
'add_translation' => 'Übersetzung hinzufügen',
'translation_added' => 'Neue Übersetzung erfolgreich hinzugefügt 🙌',
'namespace_label' => 'Namespace (optional)',
'group_label' => 'Gruppe (optional)',
'key_label' => 'Schlüssel',
'value_label' => 'Wert',
'namespace_placeholder' => 'z.B. my_package',
'group_placeholder' => 'z.B. validation',
'key_placeholder' => 'z.B. invalid_key',
'value_placeholder' => 'z.B. Schlüssel müssen eine einzige Zeichenfolge sein',
'advanced_options' => 'Erweiterte Optionen umschalten',
];
2 changes: 1 addition & 1 deletion resources/lang/en/errors.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

return [
'language_exists' => 'The language { :language } already exists',
'key_exists' => 'The translation key { :key } already exists',
'key_exists' => 'The translation key { :key } already exists',
];
80 changes: 40 additions & 40 deletions resources/lang/en/translation.php
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<?php

return [
'languages' => 'Languages',
'language' => 'Language',
'type' => 'Type',
'file' => 'File',
'key' => 'Key',
'prompt_language' => 'Enter the language code you would like to add (e.g. en)',
'language_added' => 'New language added successfully 🙌',
'languages' => 'Languages',
'language' => 'Language',
'type' => 'Type',
'file' => 'File',
'key' => 'Key',
'prompt_language' => 'Enter the language code you would like to add (e.g. en)',
'language_added' => 'New language added successfully 🙌',
'prompt_language_for_key' => 'Enter the language for the key (e.g. en)',
'prompt_type' => 'Is this a json or array key?',
'prompt_file' => 'Which file will this be stored in?',
'prompt_key' => 'What is the key for this translation?',
'prompt_value' => 'What is the value for this translation',
'type_error' => 'Translation type must be json or array',
'language_key_added' => 'New language key added successfully 👏',
'no_missing_keys' => 'There are no missing translation keys in the app 🎉',
'keys_synced' => 'Missing keys synchronised successfully 🎊',
'search' => 'Search all translations',
'translations' => 'Translation',
'language_name' => 'Name',
'locale' => 'Locale',
'add' => '+ Add',
'add_language' => 'Add a new language',
'save' => 'Save',
'language_exists' => 'The :attribute already exists.',
'uh_oh' => 'Something\'s not quite right',
'group_single' => 'Group / Single',
'group' => 'Group',
'single' => 'Single',
'value' => 'Value',
'namespace' => 'Namespace',
'add_translation' => 'Add a translation',
'translation_added' => 'New translation added successfull 🙌',
'namespace_label' => 'Namespace (Optional)',
'group_label' => 'Group (Optional)',
'key_label' => 'Key',
'value_label' => 'Value',
'namespace_placeholder' => 'e.g. my_package',
'group_placeholder' => 'e.g. validation',
'key_placeholder' => 'e.g. invalid_key',
'value_placeholder' => 'e.g. Keys must be a single string',
'advanced_options' => 'Toggle advanced options',
'prompt_type' => 'Is this a json or array key?',
'prompt_file' => 'Which file will this be stored in?',
'prompt_key' => 'What is the key for this translation?',
'prompt_value' => 'What is the value for this translation',
'type_error' => 'Translation type must be json or array',
'language_key_added' => 'New language key added successfully 👏',
'no_missing_keys' => 'There are no missing translation keys in the app 🎉',
'keys_synced' => 'Missing keys synchronised successfully 🎊',
'search' => 'Search all translations',
'translations' => 'Translation',
'language_name' => 'Name',
'locale' => 'Locale',
'add' => '+ Add',
'add_language' => 'Add a new language',
'save' => 'Save',
'language_exists' => 'The :attribute already exists.',
'uh_oh' => 'Something\'s not quite right',
'group_single' => 'Group / Single',
'group' => 'Group',
'single' => 'Single',
'value' => 'Value',
'namespace' => 'Namespace',
'add_translation' => 'Add a translation',
'translation_added' => 'New translation added successfull 🙌',
'namespace_label' => 'Namespace (Optional)',
'group_label' => 'Group (Optional)',
'key_label' => 'Key',
'value_label' => 'Value',
'namespace_placeholder' => 'e.g. my_package',
'group_placeholder' => 'e.g. validation',
'key_placeholder' => 'e.g. invalid_key',
'value_placeholder' => 'e.g. Keys must be a single string',
'advanced_options' => 'Toggle advanced options',
];
2 changes: 1 addition & 1 deletion resources/lang/fr/errors.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

return [
'key_exists' => 'La clé de traduction { :key } existe déjà',
'key_exists' => 'La clé de traduction { :key } existe déjà',
'language_exists' => 'La langue { :language } existe déjà',
];
80 changes: 40 additions & 40 deletions resources/lang/fr/translation.php
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
<?php

return [
'add' => '+ Ajouter',
'add_language' => 'Ajouter une nouvelle langue',
'add_translation' => 'Ajouter une traduction',
'advanced_options' => 'Afficher les options avancées',
'file' => 'Fichier',
'group' => 'Groupe',
'group_label' => 'Groupe (Optionnel)',
'group_placeholder' => 'Ex: validation',
'group_single' => 'Groupe / Unique',
'key' => 'Clé',
'key_label' => 'Clé',
'key_placeholder' => 'Par exemple : invalid_key',
'keys_synced' => 'Clés manquantes synchronisées avec succès 🎊',
'language' => 'Langue',
'language_added' => 'Nouvelle langue ajoutée avec succés 🙌',
'language_exists' => 'Le :attribute existe déjà.',
'language_key_added' => 'Nouvelle clé dans la langue ajoutée avec succès 👏',
'language_name' => 'Nom',
'languages' => 'Langues',
'locale' => 'Locale',
'namespace' => 'Namespace',
'namespace_label' => 'Namespace (Optionnel)',
'namespace_placeholder' => 'Par exemple : my_package',
'no_missing_keys' => 'Il ne manque aucune clé de traduction dans l\'application 🎉',
'prompt_file' => 'Dans quel fichier sera t\'elle stockée ?',
'prompt_key' => 'Quelle est la clé de cette traduction ?',
'prompt_language' => 'Entrez le code langue que vous aimeriez ajouter (Ex: fr)',
'add' => '+ Ajouter',
'add_language' => 'Ajouter une nouvelle langue',
'add_translation' => 'Ajouter une traduction',
'advanced_options' => 'Afficher les options avancées',
'file' => 'Fichier',
'group' => 'Groupe',
'group_label' => 'Groupe (Optionnel)',
'group_placeholder' => 'Ex: validation',
'group_single' => 'Groupe / Unique',
'key' => 'Clé',
'key_label' => 'Clé',
'key_placeholder' => 'Par exemple : invalid_key',
'keys_synced' => 'Clés manquantes synchronisées avec succès 🎊',
'language' => 'Langue',
'language_added' => 'Nouvelle langue ajoutée avec succés 🙌',
'language_exists' => 'Le :attribute existe déjà.',
'language_key_added' => 'Nouvelle clé dans la langue ajoutée avec succès 👏',
'language_name' => 'Nom',
'languages' => 'Langues',
'locale' => 'Locale',
'namespace' => 'Namespace',
'namespace_label' => 'Namespace (Optionnel)',
'namespace_placeholder' => 'Par exemple : my_package',
'no_missing_keys' => 'Il ne manque aucune clé de traduction dans l\'application 🎉',
'prompt_file' => 'Dans quel fichier sera t\'elle stockée ?',
'prompt_key' => 'Quelle est la clé de cette traduction ?',
'prompt_language' => 'Entrez le code langue que vous aimeriez ajouter (Ex: fr)',
'prompt_language_for_key' => 'Entrez la langue pour la clé (Ex: fr)',
'prompt_type' => 'Est-ce une clé Json ou Array ?',
'prompt_value' => 'Quelle est la valeur de la traduction',
'save' => 'Sauvegarder',
'search' => 'Rechercher toutes les traductions',
'single' => 'Unique',
'translation_added' => 'Nouvelle traduction ajoutée avec succès 🙌',
'translations' => 'Traduction',
'type' => 'Type',
'type_error' => 'Le type de traduction doit être en json ou en array',
'uh_oh' => 'Quelque chose ne fonctionne pas',
'value' => 'Valeur',
'value_label' => 'Valeur',
'value_placeholder' => 'Par exemple : Les clés doivent être une seule chaîne',
'prompt_type' => 'Est-ce une clé Json ou Array ?',
'prompt_value' => 'Quelle est la valeur de la traduction',
'save' => 'Sauvegarder',
'search' => 'Rechercher toutes les traductions',
'single' => 'Unique',
'translation_added' => 'Nouvelle traduction ajoutée avec succès 🙌',
'translations' => 'Traduction',
'type' => 'Type',
'type_error' => 'Le type de traduction doit être en json ou en array',
'uh_oh' => 'Quelque chose ne fonctionne pas',
'value' => 'Valeur',
'value_label' => 'Valeur',
'value_placeholder' => 'Par exemple : Les clés doivent être une seule chaîne',
];
2 changes: 1 addition & 1 deletion resources/lang/nl/errors.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

return [
'language_exists' => 'De taal { :language } bestaat al',
'key_exists' => 'De vertaalsleutel { :key } bestaat al',
'key_exists' => 'De vertaalsleutel { :key } bestaat al',
];
Loading