Skip to content

Commit

Permalink
php nullable types
Browse files Browse the repository at this point in the history
  • Loading branch information
fxbois committed Jan 31, 2021
1 parent a3ce21f commit 040532c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions issues/1173.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

public function upload_s3_file($file_ptr_or_name,
string $key,
?string $content_type = null,
?string $download_filename = null)
{
}

?>
4 changes: 3 additions & 1 deletion web-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -2350,7 +2350,7 @@ shouldn't be moved back.)")
(defvar web-mode-php-font-lock-keywords
(list
(cons (concat "\\_<\\(" web-mode-php-keywords "\\)\\_>") '(0 'web-mode-keyword-face))
(cons (concat "(\\_<\\(" web-mode-php-types "\\)\\_>") '(1 'web-mode-type-face))
(cons (concat "\\_<\\(" web-mode-php-types "\\)\\_>") '(1 'web-mode-type-face))
(cons (concat "\\_<\\(" web-mode-php-constants "\\)\\_>") '(0 'web-mode-constant-face))
'("function[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face)
'("\\_<\\([[:alnum:]_]+\\)[ ]?(" 1 'web-mode-function-call-face)
Expand Down Expand Up @@ -8750,6 +8750,8 @@ Also return non-nil if it is the command `self-insert-command' is remapped to."
(string-match-p "^[&|?:+-]" curr-line))
(not (and (string= language "php")
(string-match-p "^->" curr-line)))
(not (and (string= language "php")
(string-match-p "^?[a-zA-z]*" curr-line)))
(not (and (string= language "php")
(string-match-p "\\(else[ ]?:\\|if[ ]?([^)]*)[ ]?:\\)" prev-line)))
(not (string-match-p "^\\(++\\|--\\)" curr-line))
Expand Down

0 comments on commit 040532c

Please sign in to comment.