Skip to content

PHPStorm integration #16

@Youssef-Azijni

Description

@Youssef-Azijni

I've taken note of some of the most important things related to publishing a PHPStorm Config, using project defaults:

file: .idea/inspectionProfiles/Project_Default.xml

<component name="InspectionProjectProfileManager">
  <profile version="1.0">
    <option name="myName" value="Project Default" />
    <inspection_tool class="LaravelPintValidationInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpCSFixerValidationInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpCSValidationInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpMethodOrClassCallIsNotCaseSensitiveInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpStanGlobal" enabled="true" level="TEXT ATTRIBUTES" enabled_by_default="true" editorAttributes="NOT_USED_ELEMENT_ATTRIBUTES" />
    <inspection_tool class="PhpTraditionalSyntaxArrayLiteralInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpUnnecessaryDoubleQuotesInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpUsageOfSilenceOperatorInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
    <inspection_tool class="PhpVariableVariableInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
  </profile>
</component>

file: .idea/modules.xml (vgm geeft dit de file root van een project aan? Of het wijst naar de project file)

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ProjectModuleManager">
    <modules>
      <module fileurl="file://$PROJECT_DIR$/.idea/CDT-codesdirect.com.iml" filepath="$PROJECT_DIR$/.idea/CDT-codesdirect.com.iml" />
    </modules>
  </component>
</project>

file: .idea/php-test-framework.xml

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="PhpTestFrameworkSettings">
    <test_tools>
      <tool tool_name="Pest">
        <settings>
          <configurations>
            <local_configuration executable_path="$PROJECT_DIR$/vendor/bin/pest" />
          </configurations>
        </settings>
      </tool>
    </test_tools>
  </component>
</project>

file: .idea/prettier.xml

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="PrettierConfiguration">
    <option name="myConfigurationMode" value="MANUAL" />
    <option name="myRunOnSave" value="true" />
    <option name="myRunOnReformat" value="true" />
    <option name="myFilesPattern" value="*.blade.php" />
  </component>
</project>

file: .idea/externalDependencies.xml (vereiste plugins)

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
    <component name="ExternalDependencies">
        <plugin id="com.intellij.php.tools.quality.phpstan" />
        <plugin id="com.jetbrains.php.sharedIndexes" />
        <plugin id="com.pestphp.pest-intellij" />
        <plugin id="intellij.prettierJS" />
        <plugin id="org.editorconfig.editorconfigjetbrains" />
        <plugin id="org.jetbrains.plugins.yaml" />
    </component>
</project>

file: .idea/codeStyles/Project.xml (dit zou denk ik ook met editorconfig kunnen)

<component name="ProjectCodeStyleConfiguration">
  <code_scheme name="Project" version="173">
    <PHPCodeStyleSettings>
      <option name="ALIGN_INLINE_COMMENTS" value="true" />
      <option name="COMMA_AFTER_LAST_ARRAY_ELEMENT" value="true" />
      <option name="COMMA_AFTER_LAST_PARAMETER" value="true" />
      <option name="PHPDOC_BLANK_LINE_BEFORE_TAGS" value="true" />
      <option name="IMPORT_SORTING" value="BY_LENGTH" />
      <option name="LOWER_CASE_BOOLEAN_CONST" value="true" />
      <option name="LOWER_CASE_NULL_CONST" value="true" />
      <option name="FIELDS_DEFAULT_VISIBILITY" value="protected" />
      <option name="SPACE_BETWEEN_TERNARY_QUEST_AND_COLON" value="true" />
      <option name="FORCE_SHORT_DECLARATION_ARRAY_STYLE" value="true" />
      <option name="NEW_LINE_AFTER_PHP_OPENING_TAG" value="true" />
      <option name="SPACE_AROUND_ASSIGNMENT_IN_DECLARE" value="true" />
      <option name="FORCE_EMPTY_METHODS_IN_ONE_LINE" value="true" />
      <option name="PHPDOC_USE_FQCN" value="true" />
      <option name="NULL_TYPE_POSITION" value="IN_THE_BEGINNING" />
      <option name="PLACE_PARENS_FOR_CONSTRUCTOR" value="2" />
    </PHPCodeStyleSettings>
    <codeStyleSettings language="PHP">
      <option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
      <option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
      <option name="SPACE_AFTER_TYPE_CAST" value="true" />
      <option name="CALL_PARAMETERS_LPAREN_ON_NEXT_LINE" value="true" />
      <option name="IF_BRACE_FORCE" value="1" />
    </codeStyleSettings>
  </code_scheme>
</component>

file: .idea/codeStyles/codeStyleConfig.xml

<component name="ProjectCodeStyleConfiguration">
  <state>
    <option name="USE_PER_PROJECT_SETTINGS" value="true" />
  </state>
</component>

file: .idea/CDT-codesdirect.com.iml

<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
  <component name="NewModuleRootManager">
    <content url="file://$MODULE_DIR$">
      <excludeFolder url="file://$MODULE_DIR$/vendor" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>

file: .idea/php.xml <- Probablty where a bulk of the money is to be found

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
    <component name="LaravelPint">
        <laravel_pint_settings>
            <LaravelPintConfiguration tool_path="$USER_HOME$/Documents/Mediacode/CDT-codesdirect.com/vendor/bin/pint" />
        </laravel_pint_settings>
    </component>
    <component name="LaravelPint">
        <laravel_pint_settings>
            <LaravelPintConfiguration tool_path="$USER_HOME$/Documents/Mediacode/CDT-codesdirect.com/vendor/bin/pint" />
        </laravel_pint_settings>
    </component>
    <component name="LaravelPintOptionsConfiguration">
        <option name="pintJsonPath" value="$PROJECT_DIR$/pint.json" />
        <option name="reformatOnlyUncommittedFiles" value="true" />
    </component>
    <component name="PHPCodeSnifferOptionsConfiguration">
        <option name="highlightLevel" value="WARNING" />
        <option name="transferred" value="true" />
    </component>
    <component name="PhpCSFixer">
        <phpcsfixer_settings>
            <PhpCSFixerConfiguration tool_path="$USER_HOME$/Documents/Mediacode/CDT-codesdirect.com/vendor/bin/php-cs-fixer" />
        </phpcsfixer_settings>
    </component>
    <component name="PhpCodeSniffer">
        <phpcs_settings>
            <PhpCSConfiguration beautifier_path="$USER_HOME$/Documents/Mediacode/CDT-codesdirect.com/vendor/bin/phpcbf" tool_path="$USER_HOME$/Documents/Mediacode/CDT-codesdirect.com/vendor/bin/phpcs" />
        </phpcs_settings>
    </component>
    <component name="PhpExternalFormatter">
        <option name="externalFormatter" value="LARAVEL_PINT" />
    </component>
    <component name="PhpStan">
        <PhpStan_settings>
            <PhpStanConfiguration tool_path="$USER_HOME$/Documents/Mediacode/CDT-codesdirect.com/vendor/bin/phpstan" />
        </PhpStan_settings>
    </component>
    <component name="PhpStanOptionsConfiguration">
        <option name="transferred" value="true" />
    </component>
</project>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions