Skip to content

Commit

Permalink
Merge pull request #38 from systopia/code-style
Browse files Browse the repository at this point in the history
Code style
  • Loading branch information
dontub authored Oct 27, 2023
2 parents 7fe584c + 65be6ad commit 2f16422
Show file tree
Hide file tree
Showing 22 changed files with 77 additions and 65 deletions.
2 changes: 1 addition & 1 deletion src/Breadcrumb/BreadcrumbRouteAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ final class BreadcrumbRouteAnalyzer implements ContainerInjectionInterface {
private RouteAnalyzer $routeAnalyzer;

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Element/CiviremoteFundingApplicationHistory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
final class CiviremoteFundingApplicationHistory extends RenderElement {

/**
* @inheritDoc
* {@inheritDoc}
*/
public function getInfo(): array {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/Element/CiviremoteFundingApplicationHistoryComment.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class CiviremoteFundingApplicationHistoryComment extends RenderElement {

/**
* @inheritDoc
* {@inheritDoc}
*
* @phpstan-return array<string, mixed>
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Element/CiviremoteFundingApplicationHistoryCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class CiviremoteFundingApplicationHistoryCreate extends RenderElement {

/**
* @inheritDoc
* {@inheritDoc}
*/
public function getInfo(): array {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/Element/CiviremoteFundingApplicationHistoryEntry.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
final class CiviremoteFundingApplicationHistoryEntry extends RenderElement {

/**
* @inheritDoc
* {@inheritDoc}
*/
public function getInfo(): array {
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class CiviremoteFundingApplicationHistoryStatusChange extends RenderElement {

/**
* @inheritDoc
* {@inheritDoc}
*/
public function getInfo(): array {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/ViewTranslationSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(ViewTranslator $viewTranslator) {
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public static function getSubscribedEvents(): array {
return [
Expand Down
2 changes: 1 addition & 1 deletion src/Form/AbstractFundingJsonFormsForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function validateForm(array &$form, FormStateInterface $formState): void
}

/**
* @inheritDoc
* {@inheritDoc}
*
* @param array<int|string, mixed> $form
* @param \Drupal\Core\Form\FormStateInterface $formState
Expand Down
2 changes: 1 addition & 1 deletion src/Form/AddApplicationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class AddApplicationForm extends AbstractFundingJsonFormsForm {

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Form/ApplicationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class ApplicationForm extends AbstractFundingJsonFormsForm {

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Form/ChooseFundingProgramForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct(FundingApi $fundingApi) {
}

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Form/FundingCaseForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class FundingCaseForm extends AbstractFundingJsonFormsForm {

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Form/NewApplicationForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class NewApplicationForm extends AbstractFundingJsonFormsForm {

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Form/NewDrawdownForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(FundingApi $fundingApi) {
}

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand All @@ -52,7 +52,7 @@ public function getFormId(): string {
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public function buildForm(
array $form,
Expand Down
2 changes: 1 addition & 1 deletion src/Form/NewFundingCaseForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
final class NewFundingCaseForm extends AbstractFundingJsonFormsForm {

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
2 changes: 1 addition & 1 deletion src/JsonForms/Callbacks/FileUploadCallback.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct(
}

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*
Expand Down
2 changes: 1 addition & 1 deletion src/JsonForms/FileUploadArrayFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static function getPriority(): int {
}

/**
* @inheritDoc
* {@inheritDoc}
*/
public function createFormArray(DefinitionInterface $definition,
FormStateInterface $formState,
Expand Down
2 changes: 1 addition & 1 deletion src/Route/RouteAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ final class RouteAnalyzer implements ContainerInjectionInterface {
private RouteProvider $routeProvider;

/**
* @inheritDoc
* {@inheritDoc}
*
* @return static
*/
Expand Down
13 changes: 11 additions & 2 deletions src/ViewTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@

final class ViewTranslator {

private const DEFAULT_TRANSLATABLE_KEYS = [
'label',
'title',
'description',
'text',
'submit_button',
];

private ConfigFactoryInterface $configFactory;

private LanguageManagerInterface $languageManager;
Expand All @@ -41,10 +49,11 @@ final class ViewTranslator {
/**
* @phpstan-param array<string> $translatableKeys
*/
public function __construct(ConfigFactoryInterface $configFactory,
public function __construct(
ConfigFactoryInterface $configFactory,
LanguageManagerInterface $languageManager,
TranslatorInterface $translator,
array $translatableKeys = ['label', 'title', 'description', 'text', 'submit_button']
array $translatableKeys = self::DEFAULT_TRANSLATABLE_KEYS
) {
$this->configFactory = $configFactory;
$this->languageManager = $languageManager;
Expand Down
Loading

0 comments on commit 2f16422

Please sign in to comment.