FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
hack-codegen/src/PartiallyGeneratedSignedSource.php at master · numb4/hack-codegen · GitHub
numb4
/
hack-codegen
Public
forked from
hhvm/hack-codegen
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
1
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
hack-codegen
/
src
/
PartiallyGeneratedSignedSource.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (36 loc) · 1.24 KB
Breadcrumbs
hack-codegen
/
src
/
PartiallyGeneratedSignedSource.php
Copy path
File metadata and controls
44 lines (36 loc) · 1.24 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<
?
hh
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
namespace
Facebook\HackCodegen
;
/**
* Similar to SignedSource, but it uses a different header to indicate that the
* file is partially generated
*/
final
class
PartiallyGeneratedSignedSource
extends
SignedSourceBase
{
protected
static
function
preprocess
(
string
$file_data
) {
return
(
new
PartiallyGeneratedCode
(
$file_data
))
->
extractGeneratedCode();
}
protected
static
function
getTokenName
() {
return
'
partially-generated
'
;
}
/**
* Get the text for a doc block that can be used for a partially
* generated file.
* If a comment is set, it will be included in the doc block.
*/
public
static
function
getDocBlock
(?
string
$comment
=
null
) {
$comment
=
$comment
?
$comment
.
"
\n\n
"
:
null
;
return
"
This file is partially generated.
"
.
"
Only make modifications between BEGIN MANUAL SECTION
"
.
"
and END MANUAL SECTION designators.
\n\n
"
.
$comment
.
self
::
getSigningToken();
}
}
Back
|
FazBrowse Home
|
New Git URL