Skip to content

Commit

Permalink
Merge pull request #51 from monsieurbiz/feature/missing-returns
Browse files Browse the repository at this point in the history
Correct missing returns which break everything
  • Loading branch information
maximehuran authored Jul 21, 2022
2 parents c924764 + e93d441 commit 57f2559
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
key: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-${{ github.sha }}
restore-keys: composer2-php:${{ matrix.php }}-sylius:${{ matrix.sylius }}-

- name: Composer v2
run: sudo composer self-update --2
- name: Composer
run: sudo composer self-update

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
Expand All @@ -74,6 +74,7 @@ jobs:
- name: Setup some requirements
working-directory: ./sylius
run: |
composer config --no-plugins allow-plugins true
composer config repositories.plugin '{"type": "path", "url": "../plugin/"}'
composer config extra.symfony.allow-contrib true
composer config secure-http false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
if: steps.cache-composer.outputs.cache-hit != 'true'

- name: Composer v2
run: sudo composer self-update --2
- name: Composer
run: sudo composer self-update

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
- run: mkdir -p /home/runner/{.composer/cache,.config/composer}
if: steps.cache-composer.outputs.cache-hit != 'true'

- name: Composer v2
run: sudo composer self-update --2
- name: Composer
run: sudo composer self-update

- name: Composer Github Auth
run: composer config -g github-oauth.github.com ${{ github.token }}
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ setup_application:
(cd ${APP_DIR} && ${COMPOSER} config repositories.plugin '{"type": "path", "url": "../../"}')
(cd ${APP_DIR} && ${COMPOSER} config extra.symfony.allow-contrib true)
(cd ${APP_DIR} && ${COMPOSER} config minimum-stability dev)
(cd ${APP_DIR} && ${COMPOSER} config --no-plugins allow-plugins true)
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/sylius="~${SYLIUS_VERSION}") # Make sure to install the required version of sylius because the sylius-standard has a soft constraint
$(MAKE) ${APP_DIR}/.php-version
$(MAKE) ${APP_DIR}/php.ini
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ use MonsieurBiz\SyliusSettingsPlugin\Provider\SettingsProviderInterface;

public function myAwesomeMethod()
{
$this->settingsProvider->getSettingValue('app.default', 'demo_message')
return $this->settingsProvider->getSettingValue('app.default', 'demo_message')
}
```

Expand Down
8 changes: 8 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,13 @@
"branch-alias": {
"dev-master": "1.0-dev"
}
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"symfony/thanks": true,
"ergebnis/composer-normalize": true,
"symfony/flex": true
}
}
}
2 changes: 1 addition & 1 deletion src/Provider/SettingsProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct(
*/
public function getSettingValue(string $alias, string $path)
{
$this->getSettingValueByChannelAndLocale(
return $this->getSettingValueByChannelAndLocale(
$alias,
$path,
$this->channelContext->getChannel(),
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/Extension/SettingsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getSettingValue(array $context, string $alias, string $path)
{
if (isset($context['sylius']) && $context['sylius'] instanceof ShopperContextInterface) {
try {
$this->settingsProvider->getSettingValue($alias, $path);
return $this->settingsProvider->getSettingValue($alias, $path);
} catch (SettingsException $settingsException) {
return null;
}
Expand Down

0 comments on commit 57f2559

Please sign in to comment.