-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #622 from bohdan-harniuk/code-cleanup-before-4-0-0…
…-version-release Code cleanup before release v4.0.0
- Loading branch information
Showing
6 changed files
with
88 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...nto2plugin/actions/generation/generator/util/DefaultCodeStyleSettingsAdjustmentsUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
package com.magento.idea.magento2plugin.actions.generation.generator.util; | ||
|
||
import com.intellij.openapi.project.Project; | ||
import com.intellij.psi.codeStyle.CodeStyleSettings; | ||
import com.intellij.psi.codeStyle.CodeStyleSettingsManager; | ||
import com.intellij.psi.codeStyle.CommonCodeStyleSettings; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public final class DefaultCodeStyleSettingsAdjustmentsUtil { | ||
|
||
private DefaultCodeStyleSettingsAdjustmentsUtil() { | ||
} | ||
|
||
/** | ||
* Adjust default code style settings for project. | ||
* | ||
* @param project Project | ||
*/ | ||
public static void execute(final @NotNull Project project) { | ||
final CodeStyleSettings codeStyleSettings = CodeStyleSettingsManager | ||
.getInstance(project) | ||
.getTemporarySettings(); | ||
|
||
if (codeStyleSettings == null) { | ||
return; | ||
} | ||
final CommonCodeStyleSettings commonPhpSettings = codeStyleSettings | ||
.getCommonSettings("PHP"); | ||
// This value has changed to TRUE by default in the latest releases. | ||
// This is necessary to return the value by default to the previous one. | ||
commonPhpSettings.ALIGN_MULTILINE_PARAMETERS = false; | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
.../actions/generation/generator/PluginClassGenerator/generatePluginClassFile/TestPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
<?php | ||
|
||
|
||
namespace Foo\Bar\Plugin; | ||
|
||
|
||
use Foo\Bar\Service\SimpleService; | ||
|
||
class TestPlugin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters