mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
CS fixes.
This commit is contained in:
@@ -136,7 +136,7 @@ class DocBlock implements \Reflector
|
|||||||
} else {
|
} else {
|
||||||
// clears all extra horizontal whitespace from the line endings
|
// clears all extra horizontal whitespace from the line endings
|
||||||
// to prevent parsing issues
|
// to prevent parsing issues
|
||||||
$comment = preg_replace('~(?m)\h*$~u', '', $comment);
|
$comment = preg_replace('/\h*$/Sum', '', $comment);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Splits the docblock into a short description, long description and
|
* Splits the docblock into a short description, long description and
|
||||||
@@ -153,7 +153,7 @@ class DocBlock implements \Reflector
|
|||||||
* Big thanks to RichardJ for contributing this Regular Expression
|
* Big thanks to RichardJ for contributing this Regular Expression
|
||||||
*/
|
*/
|
||||||
preg_match(
|
preg_match(
|
||||||
'/(?x)
|
'/
|
||||||
\A (
|
\A (
|
||||||
[^\n.]+
|
[^\n.]+
|
||||||
(?:
|
(?:
|
||||||
@@ -176,7 +176,7 @@ class DocBlock implements \Reflector
|
|||||||
)
|
)
|
||||||
)?
|
)?
|
||||||
(\s+ [\s\S]*)? # everything that follows
|
(\s+ [\s\S]*)? # everything that follows
|
||||||
/u',
|
/ux',
|
||||||
$comment,
|
$comment,
|
||||||
$matches
|
$matches
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Context
|
|||||||
protected $lsen = '';
|
protected $lsen = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Cteates a new context.
|
||||||
* @param string $namespace The namespace where this DocBlock
|
* @param string $namespace The namespace where this DocBlock
|
||||||
* resides in.
|
* resides in.
|
||||||
* @param array $namespace_aliases List of namespace aliases => Fully
|
* @param array $namespace_aliases List of namespace aliases => Fully
|
||||||
|
|||||||
@@ -65,7 +65,13 @@ class ExampleTagTest extends \PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
public function provideDataForConstuctor()
|
public function provideDataForConstuctor()
|
||||||
{
|
{
|
||||||
// $type, $content, $exContent, $exDescription, $exStartingLine, $exLineCount, $exFilePath
|
// $type,
|
||||||
|
// $content,
|
||||||
|
// $exContent,
|
||||||
|
// $exDescription,
|
||||||
|
// $exStartingLine,
|
||||||
|
// $exLineCount,
|
||||||
|
// $exFilePath
|
||||||
return array(
|
return array(
|
||||||
array(
|
array(
|
||||||
'example',
|
'example',
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class TagTest extends \PHPUnit_Framework_TestCase
|
|||||||
$tagPreReg
|
$tagPreReg
|
||||||
);
|
);
|
||||||
|
|
||||||
require 'data:text/plain;base64,'. base64_encode(
|
include 'data:text/plain;base64,'. base64_encode(
|
||||||
<<<TAG_HANDLER
|
<<<TAG_HANDLER
|
||||||
<?php
|
<?php
|
||||||
class MyTagHandler extends \phpDocumentor\Reflection\DocBlock\Tag {}
|
class MyTagHandler extends \phpDocumentor\Reflection\DocBlock\Tag {}
|
||||||
@@ -120,6 +120,8 @@ TAG_HANDLER
|
|||||||
* @depends testTagHandlerCorrectRegistration
|
* @depends testTagHandlerCorrectRegistration
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
|
* @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
|
* @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testNamespacedTagHandlerCorrectRegistration()
|
public function testNamespacedTagHandlerCorrectRegistration()
|
||||||
{
|
{
|
||||||
@@ -162,6 +164,8 @@ TAG_HANDLER
|
|||||||
* @depends testTagHandlerCorrectRegistration
|
* @depends testTagHandlerCorrectRegistration
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
|
* @covers \phpDocumentor\Reflection\DocBlock\Tag::registerTagHandler
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
|
* @covers \phpDocumentor\Reflection\DocBlock\Tag::createInstance
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testNamespacedTagHandlerIncorrectRegistration()
|
public function testNamespacedTagHandlerIncorrectRegistration()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class DocBlockTest extends \PHPUnit_Framework_TestCase
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @covers \phpDocumentor\Reflection\DocBlock
|
* @covers \phpDocumentor\Reflection\DocBlock
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testConstruct()
|
public function testConstruct()
|
||||||
{
|
{
|
||||||
@@ -168,7 +170,7 @@ DOCBLOCK;
|
|||||||
$this->markTestSkipped('"data" URIs for includes are required.');
|
$this->markTestSkipped('"data" URIs for includes are required.');
|
||||||
}
|
}
|
||||||
|
|
||||||
require 'data:text/plain;base64,'. base64_encode(
|
include 'data:text/plain;base64,'. base64_encode(
|
||||||
<<<DOCBLOCK_EXTENSION
|
<<<DOCBLOCK_EXTENSION
|
||||||
<?php
|
<?php
|
||||||
class MyReflectionDocBlock extends \phpDocumentor\Reflection\DocBlock {
|
class MyReflectionDocBlock extends \phpDocumentor\Reflection\DocBlock {
|
||||||
|
|||||||
Reference in New Issue
Block a user