repo.or.cz
/
phabricator.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Remove all "FileHasObject" edge reads and writes
[phabricator.git]
/
src
/
applications
/
fact
/
chart
/
PhabricatorScaleChartFunction.php
blob
228674023e2a74382be6aa6e386616b864bae271
1
<
?php
2
3
final class
PhabricatorScaleChartFunction
4
extends
PhabricatorPureChartFunction
{
5
6
const
FUNCTIONKEY
=
'scale'
;
7
8
protected function
newArguments
() {
9
return array
(
10
$this
->
newArgument
()
11
->
setName
(
'scale'
)
12
->
setType
(
'number'
),
13
);
14
}
15
16
public function
evaluateFunction
(
array
$xv
) {
17
$scale
=
$this
->
getArgument
(
'scale'
);
18
19
$yv
=
array
();
20
21
foreach
(
$xv
as
$x
) {
22
$yv
[] =
$x
*
$scale
;
23
}
24
25
return
$yv
;
26
}
27
28
}