Tag: PhpStorm
-
Post Views: 29 1. In phpstorm prompt: @property-read . as shown in Figure 1 2. In common/config/main-local.php 3. In yii2, the yii\swiftmailer\mailer component is not set through public properties, but through the setTransport() method. And Yii::$App->Mailer->Transport =[…]It belongs to the direct setting of properties, and phpstorm cannot statically analyze that you are actually calling the setter method indirectly through magic…
-
Post Views: 35 1. Generate src/frontend/views/use-case/view-mobile.php~ in phpstorm, how to cancel? as shown in Figure 1 2. File – Settings – Appearance and Behavior – System Settings – Auto Save – Backup files before saving, uncheck them. as shown in Figure 2
-
Post Views: 25 1. Batch replacement needs to be performed in the code, the rules are as follows, as shown in Figure 1 2. Replacement results are as expected
-
Post Views: 27 1. Prompt in phpstorm: misspelling in wordsLabelsin. as shown in Figure 1 2. Click Spelling Error: Rename to… , based on the drop-down option: $typeLabels . as shown in Figure 2 3. When git is submitted, it is found that all the places referenced to $typelables have been renamed to $typelabels. in line with expectations.
-
Post Views: 17 1. In phpstorm, the prompt: the base class referenced by the subclass\common\models\conventionparticipantsharerecipientconstant in the constant. as shown in Figure 1 2. The code is implemented as follows common/models/conventionparticipantsharerecipient.php api/models/conventionparticipantsharerecipient.php API/Controllers/ConventionParticipantShareRecipientController.php 3. The adjustment code is implemented as follows, no longer prompted. as shown in Figure 2
-
Post Views: 19 1. Prompt in phpstorm: potential polymorphic calls. There are no members in the hierarchy of requests. as shown in Figure 1 2. Print $this->request and confirm that it is yii\web\request object. as shown in Figure 2 3. This is because $this->request is not explicitly marked by the type, and phpstorm cannot confirm its class type (i.e. $this->request…
-
Post Views: 15 1. When editing the code in phpstorm, there is a shortcut key: Ctrl+Shift+U, which can be switched to case, but it does not support switching to Hump. as shown in Figure 1 2. In Settings – Plugin – Marketplace, search: Camel, install: CamelCase. as shown in Figure 2 3. A new shortcut key appears in the editing…
-
Post Views: 15 1. After formatting the homestead.yaml file in phpstorm, the indentation of the format is incorrect, the format is as follows. as shown in Figure 1 2. Check the format of homestead.yaml.example, – there is only one space with map. as shown in Figure 2 3. Reference:https://www.jetbrains.com.cn/help/phpstorm/2021.3/yaml.html. Settings – Editor – Code Style – YAML . Settings may…
-
Post Views: 16 1. When starting Vagrant, an error is reported: D:/Program files/hashicorp/vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse: (): found a tab character that violates indentation while scanning a plain scalar at line 10 Column 7 (psych::SyntaxError). as shown in Figure 1 2. View the file ~/homestead/homestead.yaml in phpstorm, and find a red wavy line prompt. The reason may be that it has been…
-
Post Views: 18 1. When starting Vagrant, an error is reported: D:/Program files/hashicorp/vagrant/embedded/mingw64/lib/ruby/2.7.0/psych.rb:456:in `parse: (): found a tab character that violates indentation while scanning a plain scalar at line 10 Column 7 (psych::SyntaxError). as shown in Figure 1 2. View the file ~/homestead/homestead.yaml in phpstorm, and find a red wavy line prompt. The reason may be that it has been…
