Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Emacs org-mode babel support for phpstan

License

NotificationsYou must be signed in to change notification settings

emacs-php/ob-phpstan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This org-mode babel extension enables you to execute phpstan code blocks.

Install

Requirement

You need to installphpstan to use this extension.

with Melpa

yet

with Manually

Add ob-phpstan.el to your load-path and require.

(add-to-list'load-path"/path/to/ob-phpstan.el")(require'ob-phpstan)

Configure

add phpstan-mode:

(define-derived-mode phpstan-mode php-mode"phpstan")

add org-src-lang-modes:

(eval-after-load"org" '(add-to-list'org-src-lang-modes '("phpstan". phpstan)))

Example

#+begin_src phpstan :level 0  class HelloWorld  {          public function sayHello(DateTimeImutable $date): void          {                  echo 'Hello, ' . $date->format('j. n. Y');          }  }#+end_src#+RESULTS:#+begin_example ------ ----------------------------------------------------------------------------------  Line   /var/folders/z5/sk1q5qj96xg4g87vkcp4hq9h0000gn/T/babel-TGYZJB/phpstan-ulqeYI.php ------ ----------------------------------------------------------------------------------  4      Parameter $date of method HelloWorld::sayHello() has invalid type         DateTimeImutable. ------ ---------------------------------------------------------------------------------- [ERROR] Found 1 error#+end_example

About

Emacs org-mode babel support for phpstan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp