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 #27239 from totten/phpstorm-adaptive-path
phpstorm - Prefer to store generated hints in source-tree
- Loading branch information
Showing
6 changed files
with
82 additions
and
22 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 was deleted.
Oops, something went wrong.
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
28 changes: 28 additions & 0 deletions
28
tools/extensions/phpstorm/Civi/PhpStorm/StaticGenerator.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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Civi\PhpStorm; | ||
|
||
use Civi\Core\Service\AutoService; | ||
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | ||
|
||
/** | ||
* Generate simple/static mappings. | ||
* | ||
* This could be committed directly, but generating via PhpStormMetadata means that we get the same | ||
* install/upgrade/uninstall workflow as the others. (No special carve-outs per-file.) | ||
* | ||
* @service civi.phpstorm.static | ||
*/ | ||
class StaticGenerator extends AutoService implements EventSubscriberInterface { | ||
|
||
public static function getSubscribedEvents() { | ||
return ['civi.phpstorm.flush' => 'generate']; | ||
} | ||
|
||
public function generate() { | ||
$builder = new PhpStormMetadata('static', __CLASS__); | ||
$builder->addExitPoint('\CRM_Utils_System::civiExit()'); | ||
$builder->write(); | ||
} | ||
|
||
} |
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