Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c01fdc5e
Commit
c01fdc5e
authored
Mar 08, 2014
by
Paul Klimov
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:yiisoft/yii2
parents
bc73a248
595f55c5
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
21 additions
and
14 deletions
+21
-14
.travis.yml
.travis.yml
+2
-0
ApiMarkdown.php
extensions/apidoc/helpers/ApiMarkdown.php
+1
-1
style.css
extensions/apidoc/templates/bootstrap/assets/css/style.css
+6
-2
ApiRenderer.php
extensions/apidoc/templates/html/ApiRenderer.php
+5
-4
methodDetails.php
extensions/apidoc/templates/html/views/methodDetails.php
+4
-4
TwigSimpleFileLoader.php
extensions/twig/TwigSimpleFileLoader.php
+2
-2
Widget.php
framework/base/Widget.php
+1
-1
No files found.
.travis.yml
View file @
c01fdc5e
...
@@ -45,5 +45,7 @@ script:
...
@@ -45,5 +45,7 @@ script:
-
cd apps/basic && php vendor/bin/codecept run
-
cd apps/basic && php vendor/bin/codecept run
after_script
:
after_script
:
-
cd ../..
-
pwd
-
wget https://scrutinizer-ci.com/ocular.phar
-
wget https://scrutinizer-ci.com/ocular.phar
-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
-
php ocular.phar code-coverage:upload --format=php-clover coverage.clover
extensions/apidoc/helpers/ApiMarkdown.php
View file @
c01fdc5e
...
@@ -93,7 +93,7 @@ class ApiMarkdown extends GithubMarkdown
...
@@ -93,7 +93,7 @@ class ApiMarkdown extends GithubMarkdown
}
}
}
}
p
rotected
function
highlight
(
$code
,
$language
)
p
ublic
static
function
highlight
(
$code
,
$language
)
{
{
if
(
$language
!==
'php'
)
{
if
(
$language
!==
'php'
)
{
return
htmlspecialchars
(
$code
,
ENT_NOQUOTES
,
'UTF-8'
);
return
htmlspecialchars
(
$code
,
ENT_NOQUOTES
,
'UTF-8'
);
...
...
extensions/apidoc/templates/bootstrap/assets/css/style.css
View file @
c01fdc5e
...
@@ -57,4 +57,9 @@ blockquote {
...
@@ -57,4 +57,9 @@ blockquote {
td
p
{
td
p
{
margin
:
0
;
margin
:
0
;
}
}
\ No newline at end of file
table
.detailTable
.paramNameCol
{
width
:
15%
;
min-width
:
100px
;
}
table
.detailTable
.paramTypeCol
{
width
:
15%
;
min-width
:
150px
;
}
table
.detailTable
.paramDescCol
{
width
:
70%
;
}
extensions/apidoc/templates/html/ApiRenderer.php
View file @
c01fdc5e
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
namespace
yii\apidoc\templates\html
;
namespace
yii\apidoc\templates\html
;
use
yii\apidoc\helpers\ApiMarkdown
;
use
yii\apidoc\models\MethodDoc
;
use
yii\apidoc\models\MethodDoc
;
use
yii\apidoc\models\PropertyDoc
;
use
yii\apidoc\models\PropertyDoc
;
use
yii\apidoc\models\ClassDoc
;
use
yii\apidoc\models\ClassDoc
;
...
@@ -225,7 +226,8 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
...
@@ -225,7 +226,8 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
}
}
return
implode
(
'<br />'
,
$sig
);
return
implode
(
'<br />'
,
$sig
);
}
}
return
$this
->
createTypeLink
(
$property
->
types
)
.
' '
.
$property
->
name
.
' = '
.
(
$property
->
defaultValue
===
null
?
'null'
:
$property
->
defaultValue
);
return
$this
->
createTypeLink
(
$property
->
types
)
.
' '
.
$this
->
createSubjectLink
(
$property
,
$property
->
name
)
.
' '
.
ApiMarkdown
::
highlight
(
'= '
.
(
$property
->
defaultValue
===
null
?
'null'
:
$property
->
defaultValue
),
'php'
);
}
}
/**
/**
...
@@ -244,9 +246,8 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
...
@@ -244,9 +246,8 @@ class ApiRenderer extends BaseApiRenderer implements ViewContextInterface
return
(
$method
->
isReturnByReference
?
'<b>&</b>'
:
''
)
return
(
$method
->
isReturnByReference
?
'<b>&</b>'
:
''
)
.
(
$method
->
returnType
===
null
?
'void'
:
$this
->
createTypeLink
(
$method
->
returnTypes
))
.
(
$method
->
returnType
===
null
?
'void'
:
$this
->
createTypeLink
(
$method
->
returnTypes
))
.
' '
.
$this
->
createSubjectLink
(
$method
,
$method
->
name
)
.
'( '
.
' '
.
$this
->
createSubjectLink
(
$method
,
$method
->
name
)
.
implode
(
', '
,
$params
)
.
ApiMarkdown
::
highlight
(
'( '
.
implode
(
', '
,
$params
)
.
' )'
,
'php'
);
.
' )'
;
}
}
public
function
generateApiUrl
(
$typeName
)
public
function
generateApiUrl
(
$typeName
)
...
...
extensions/apidoc/templates/html/views/methodDetails.php
View file @
c01fdc5e
...
@@ -34,28 +34,28 @@ ArrayHelper::multisort($methods, 'name');
...
@@ -34,28 +34,28 @@ ArrayHelper::multisort($methods, 'name');
</span>
</span>
</div>
</div>
<table
class=
"
summary
Table table table-striped table-bordered table-hover"
>
<table
class=
"
detail
Table table table-striped table-bordered table-hover"
>
<tr><td
colspan=
"3"
>
<tr><td
colspan=
"3"
>
<div
class=
"signature2"
>
<?=
$renderer
->
renderMethodSignature
(
$method
)
?>
</div>
<div
class=
"signature2"
>
<?=
$renderer
->
renderMethodSignature
(
$method
)
?>
</div>
</td></tr>
</td></tr>
<?php
if
(
!
empty
(
$method
->
params
)
||
!
empty
(
$method
->
return
)
||
!
empty
(
$method
->
exceptions
))
:
?>
<?php
if
(
!
empty
(
$method
->
params
)
||
!
empty
(
$method
->
return
)
||
!
empty
(
$method
->
exceptions
))
:
?>
<?php
foreach
(
$method
->
params
as
$param
)
:
?>
<?php
foreach
(
$method
->
params
as
$param
)
:
?>
<tr>
<tr>
<td
class=
"paramNameCol"
>
<?=
$param
->
name
?>
</td>
<td
class=
"paramNameCol"
>
<?=
ApiMarkdown
::
highlight
(
$param
->
name
,
'php'
)
?>
</td>
<td
class=
"paramTypeCol"
>
<?=
$renderer
->
createTypeLink
(
$param
->
types
)
?>
</td>
<td
class=
"paramTypeCol"
>
<?=
$renderer
->
createTypeLink
(
$param
->
types
)
?>
</td>
<td
class=
"paramDescCol"
>
<?=
ApiMarkdown
::
process
(
$param
->
description
,
$type
)
?>
</td>
<td
class=
"paramDescCol"
>
<?=
ApiMarkdown
::
process
(
$param
->
description
,
$type
)
?>
</td>
</tr>
</tr>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
<?php
if
(
!
empty
(
$method
->
return
))
:
?>
<?php
if
(
!
empty
(
$method
->
return
))
:
?>
<tr>
<tr>
<t
d
class=
"paramNameCol"
>
<?=
'return'
;
?>
</td
>
<t
h
class=
"paramNameCol"
>
<?=
'return'
;
?>
</th
>
<td
class=
"paramTypeCol"
>
<?=
$renderer
->
createTypeLink
(
$method
->
returnTypes
);
?>
</td>
<td
class=
"paramTypeCol"
>
<?=
$renderer
->
createTypeLink
(
$method
->
returnTypes
);
?>
</td>
<td
class=
"paramDescCol"
>
<?=
ApiMarkdown
::
process
(
$method
->
return
,
$type
);
?>
</td>
<td
class=
"paramDescCol"
>
<?=
ApiMarkdown
::
process
(
$method
->
return
,
$type
);
?>
</td>
</tr>
</tr>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
foreach
(
$method
->
exceptions
as
$exception
=>
$description
)
:
?>
<?php
foreach
(
$method
->
exceptions
as
$exception
=>
$description
)
:
?>
<tr>
<tr>
<t
d
class=
"paramNameCol"
>
<?=
'throws'
?>
</td
>
<t
h
class=
"paramNameCol"
>
<?=
'throws'
?>
</th
>
<td
class=
"paramTypeCol"
>
<?=
$renderer
->
createTypeLink
(
$exception
)
?>
</td>
<td
class=
"paramTypeCol"
>
<?=
$renderer
->
createTypeLink
(
$exception
)
?>
</td>
<td
class=
"paramDescCol"
>
<?=
ApiMarkdown
::
process
(
$description
,
$type
)
?>
</td>
<td
class=
"paramDescCol"
>
<?=
ApiMarkdown
::
process
(
$description
,
$type
)
?>
</td>
</tr>
</tr>
...
...
extensions/twig/TwigSimpleFileLoader.php
View file @
c01fdc5e
...
@@ -33,8 +33,8 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface
...
@@ -33,8 +33,8 @@ class TwigSimpleFileLoader implements \Twig_LoaderInterface
/**
/**
* Compare a file's freshness with previously stored timestamp
* Compare a file's freshness with previously stored timestamp
*
*
* @param
$name string
file name to check
* @param
string $name
file name to check
* @param
$time int
timestamp to compare with
* @param
integer $time
timestamp to compare with
* @return boolean true if file is still fresh and not changes, false otherwise
* @return boolean true if file is still fresh and not changes, false otherwise
*/
*/
public
function
isFresh
(
$name
,
$time
)
public
function
isFresh
(
$name
,
$time
)
...
...
framework/base/Widget.php
View file @
c01fdc5e
...
@@ -31,7 +31,7 @@ class Widget extends Component implements ViewContextInterface
...
@@ -31,7 +31,7 @@ class Widget extends Component implements ViewContextInterface
public
static
$counter
=
0
;
public
static
$counter
=
0
;
/**
/**
* @var string the prefix to the automatically generated widget IDs.
* @var string the prefix to the automatically generated widget IDs.
* @see
[[getId()]]
* @see
getId()
*/
*/
public
static
$autoIdPrefix
=
'w'
;
public
static
$autoIdPrefix
=
'w'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment