Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into bugfix/cc-7177-url-…
Browse files Browse the repository at this point in the history
…nested-transaction-issue
  • Loading branch information
AsonUnique committed Mar 17, 2020
2 parents c4f398f + ea435a3 commit 51e0bbc
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 31 deletions.
2 changes: 2 additions & 0 deletions src/Spryker/Client/Locale/LocaleClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
class LocaleClient extends AbstractClient implements LocaleClientInterface
{
/**
* {@inheritDoc}
*
* @api
*
* @return string
Expand Down
40 changes: 11 additions & 29 deletions src/Spryker/Zed/Locale/Business/LocaleFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
class LocaleFacade extends AbstractFacade implements LocaleFacadeInterface
{
/**
* Specification:
* - Checks if the given $localeName exists in database or not.
* - Returns true if it exists, false otherwise.
* {@inheritDoc}
*
* @api
*
Expand All @@ -36,9 +34,7 @@ public function hasLocale($localeName)
}

/**
* Specification:
* - Reads persisted locale by given locale name.
* - Returns a LocaleTransfer if it's found, throws exception otherwise.
* {@inheritDoc}
*
* @api
*
Expand All @@ -56,9 +52,7 @@ public function getLocale($localeName)
}

/**
* Specification:
* - Reads persisted locale by given locale name.
* - Returns a LocaleTransfer if it's found, throws exception otherwise.
* {@inheritDoc}
*
* @api
*
Expand All @@ -76,9 +70,7 @@ public function getLocaleByCode($localeCode)
}

/**
* Specification:
* - Reads persisted locale by given locale id
* - Returns a LocaleTransfer if it's found, throws exception otherwise.
* {@inheritDoc}
*
* @api
*
Expand All @@ -94,8 +86,7 @@ public function getLocaleById($idLocale)
}

/**
* Specification:
* - Returns the name of the currently used locale.
* {@inheritDoc}
*
* @api
*
Expand All @@ -107,13 +98,11 @@ public function getCurrentLocaleName()
}

/**
* Specification:
* - Returns an associative array of [id_locale => locale_name] pairs.
* - The locales returned are read from the store configuration and their data is read from database.
* {@inheritDoc}
*
* @api
*
* @return array
* @return string[]
*/
public function getAvailableLocales()
{
Expand All @@ -123,8 +112,7 @@ public function getAvailableLocales()
}

/**
* Specification:
* - Returns a LocaleTransfer with the data of the currently used locale.
* {@inheritDoc}
*
* @api
*
Expand All @@ -138,10 +126,7 @@ public function getCurrentLocale()
}

/**
* Specification:
* - Persists a new locale entity to database.
* - The locale name must be unique otherwise exception is thrown.
* - Returns a LocaleTransfer with the data of the persisted locale.
* {@inheritDoc}
*
* @api
*
Expand All @@ -157,8 +142,7 @@ public function createLocale($localeName)
}

/**
* Specification:
* - "Soft delete" the locale entity by setting it inactive.
* {@inheritDoc}
*
* @api
*
Expand All @@ -173,9 +157,7 @@ public function deleteLocale($localeName)
}

/**
* Specification:
* - Reads a list of predefined locales from a file, specified in the LocaleConfig.
* - Persists new locale entities from the list to database.
* {@inheritDoc}
*
* @api
*
Expand Down
2 changes: 1 addition & 1 deletion src/Spryker/Zed/Locale/Business/LocaleFacadeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function getCurrentLocaleName();
*
* @api
*
* @return array
* @return string[]
*/
public function getAvailableLocales();

Expand Down
2 changes: 1 addition & 1 deletion src/Spryker/Zed/Locale/Business/Manager/LocaleManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public function getLocaleCollection()
}

/**
* @return array
* @return string[]
*/
public function getAvailableLocales()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
class LocaleInstallerPlugin extends AbstractPlugin implements InstallerPluginInterface
{
/**
* {@inheritDoc}
*
* @api
*
* @return void
Expand Down
2 changes: 2 additions & 0 deletions src/Spryker/Zed/Locale/LocaleConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
class LocaleConfig extends AbstractBundleConfig
{
/**
* @api
*
* @return string
*/
public function getLocaleFile()
Expand Down
4 changes: 4 additions & 0 deletions src/Spryker/Zed/Locale/Persistence/LocaleQueryContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
class LocaleQueryContainer extends AbstractQueryContainer implements LocaleQueryContainerInterface
{
/**
* {@inheritDoc}
*
* @api
*
* @param string $localeName
Expand All @@ -30,6 +32,8 @@ public function queryLocaleByName($localeName)
}

/**
* {@inheritDoc}
*
* @api
*
* @return \Orm\Zed\Locale\Persistence\SpyLocaleQuery
Expand Down

0 comments on commit 51e0bbc

Please sign in to comment.