[CHANGED] Added "@return" annotation where it as missed.

This commit is contained in:
Roman Syroeshko 2014-07-03 15:40:24 +04:00
parent 20d986b11d
commit d0a609bc95
116 changed files with 688 additions and 262 deletions

View File

@ -41,6 +41,7 @@ class Autoloader
* Autoload * Autoload
* *
* @param string $class * @param string $class
* @return void
*/ */
public static function autoload($class) public static function autoload($class)
{ {

View File

@ -57,10 +57,11 @@ abstract class AbstractCollection
} }
/** /**
* Set item * Set item.
* *
* @param int $index * @param int $index
* @param mixed $item * @param mixed $item
* @return void
*/ */
public function setItem($index, $item) public function setItem($index, $item)
{ {

View File

@ -126,9 +126,10 @@ abstract class AbstractElement
} }
/** /**
* Set PhpWord as reference * Set PhpWord as reference.
* *
* @param \PhpOffice\PhpWord\PhpWord * @param \PhpOffice\PhpWord\PhpWord &$phpWord
* @return void
*/ */
public function setPhpWord(PhpWord &$phpWord = null) public function setPhpWord(PhpWord &$phpWord = null)
{ {
@ -146,10 +147,11 @@ abstract class AbstractElement
} }
/** /**
* Set doc part * Set doc part.
* *
* @param string $docPart * @param string $docPart
* @param int $docPartId * @param int $docPartId
* @return void
*/ */
public function setDocPart($docPart, $docPartId = 1) public function setDocPart($docPart, $docPartId = 1)
{ {
@ -203,9 +205,10 @@ abstract class AbstractElement
} }
/** /**
* Set element index * Set element index.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setElementIndex($value) public function setElementIndex($value)
{ {
@ -223,7 +226,9 @@ abstract class AbstractElement
} }
/** /**
* Set element unique ID from 6 first digit of md5 * Set element unique ID from 6 first digit of md5.
*
* @return void
*/ */
public function setElementId() public function setElementId()
{ {
@ -241,9 +246,10 @@ abstract class AbstractElement
} }
/** /**
* Set relation Id * Set relation Id.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setRelationId($value) public function setRelationId($value)
{ {
@ -266,6 +272,7 @@ abstract class AbstractElement
* Passed parameter should be a container, except for Table (contain Row) and Row (contain Cell) * Passed parameter should be a container, except for Table (contain Row) and Row (contain Cell)
* *
* @param \PhpOffice\PhpWord\Element\AbstractElement $container * @param \PhpOffice\PhpWord\Element\AbstractElement $container
* @return void
*/ */
public function setParentContainer(AbstractElement $container) public function setParentContainer(AbstractElement $container)
{ {
@ -295,6 +302,8 @@ abstract class AbstractElement
* *
* - Image element needs to be passed to Media object * - Image element needs to be passed to Media object
* - Icon needs to be set for Object element * - Icon needs to be set for Object element
*
* @return void
*/ */
private function setMediaRelation() private function setMediaRelation()
{ {
@ -320,7 +329,9 @@ abstract class AbstractElement
} }
/** /**
* Set relation Id for elements that will be registered in the Collection subnamespaces * Set relation Id for elements that will be registered in the Collection subnamespaces.
*
* @return void
*/ */
private function setCollectionRelation() private function setCollectionRelation()
{ {

View File

@ -80,9 +80,10 @@ class Chart extends AbstractElement
} }
/** /**
* Set type * Set type.
* *
* @param string $value * @param string $value
* @return void
*/ */
public function setType($value) public function setType($value)
{ {
@ -95,6 +96,7 @@ class Chart extends AbstractElement
* *
* @param array $categories * @param array $categories
* @param array $values * @param array $values
* @return void
*/ */
public function addSeries($categories, $values) public function addSeries($categories, $values)
{ {

View File

@ -59,10 +59,12 @@ class Footer extends AbstractContainer
} }
/** /**
* Set type * Set type.
*
* @since 0.10.0
* *
* @param string $value * @param string $value
* @since 0.10.0 * @return void
*/ */
public function setType($value = self::AUTO) public function setType($value = self::AUTO)
{ {

View File

@ -257,9 +257,10 @@ class Image extends AbstractElement
} }
/** /**
* Set target file name * Set target file name.
* *
* @param string $value * @param string $value
* @return void
*/ */
public function setTarget($value) public function setTarget($value)
{ {
@ -277,9 +278,10 @@ class Image extends AbstractElement
} }
/** /**
* Set media index * Set media index.
* *
* @param integer $value * @param integer $value
* @return void
*/ */
public function setMediaIndex($value) public function setMediaIndex($value)
{ {
@ -358,9 +360,10 @@ class Image extends AbstractElement
} }
/** /**
* Check memory image, supported type, image functions, and proportional width/height * Check memory image, supported type, image functions, and proportional width/height.
* *
* @param string $source * @param string $source
* @return void
* @throws \PhpOffice\PhpWord\Exception\InvalidImageException * @throws \PhpOffice\PhpWord\Exception\InvalidImageException
* @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException * @throws \PhpOffice\PhpWord\Exception\UnsupportedImageTypeException
*/ */
@ -395,9 +398,10 @@ class Image extends AbstractElement
} }
/** /**
* Set source type * Set source type.
* *
* @param string $source * @param string $source
* @return void
*/ */
private function setSourceType($source) private function setSourceType($source)
{ {
@ -443,7 +447,9 @@ class Image extends AbstractElement
} }
/** /**
* Set image functions and extensions * Set image functions and extensions.
*
* @return void
*/ */
private function setFunctions() private function setFunctions()
{ {
@ -476,10 +482,11 @@ class Image extends AbstractElement
} }
/** /**
* Set proportional width/height if one dimension not available * Set proportional width/height if one dimension not available.
* *
* @param integer $actualWidth * @param integer $actualWidth
* @param integer $actualHeight * @param integer $actualHeight
* @return void
*/ */
private function setProportionalSize($actualWidth, $actualHeight) private function setProportionalSize($actualWidth, $actualHeight)
{ {

View File

@ -65,7 +65,9 @@ class ListItemRun extends TextRun
} }
/** /**
* Get ListItem style * Get ListItem style.
*
* @return \PhpOffice\PhpWord\Style\ListItem
*/ */
public function getStyle() public function getStyle()
{ {
@ -73,7 +75,9 @@ class ListItemRun extends TextRun
} }
/** /**
* Get ListItem depth * Get ListItem depth.
*
* @return int
*/ */
public function getDepth() public function getDepth()
{ {

View File

@ -129,9 +129,10 @@ class Object extends AbstractElement
} }
/** /**
* Set Image Relation ID * Set Image Relation ID.
* *
* @param int $rId * @param int $rId
* @return void
*/ */
public function setImageRelationId($rId) public function setImageRelationId($rId)
{ {

View File

@ -66,9 +66,10 @@ class Section extends AbstractContainer
} }
/** /**
* Set section style * Set section style.
* *
* @param array $style * @param array $style
* @return void
*/ */
public function setStyle($style = null) public function setStyle($style = null)
{ {

View File

@ -129,9 +129,10 @@ class TOC extends AbstractElement
} }
/** /**
* Set max depth * Set max depth.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setMaxDepth($value) public function setMaxDepth($value)
{ {
@ -149,9 +150,10 @@ class TOC extends AbstractElement
} }
/** /**
* Set min depth * Set min depth.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setMinDepth($value) public function setMinDepth($value)
{ {

View File

@ -118,9 +118,10 @@ class Table extends AbstractElement
} }
/** /**
* Set table width * Set table width.
* *
* @param int $width * @param int $width
* @return void
*/ */
public function setWidth($width) public function setWidth($width)
{ {

View File

@ -218,9 +218,10 @@ class PhpWord
} }
/** /**
* Set default font name * Set default font name.
* *
* @param string $fontName * @param string $fontName
* @return void
*/ */
public function setDefaultFontName($fontName) public function setDefaultFontName($fontName)
{ {
@ -238,9 +239,10 @@ class PhpWord
} }
/** /**
* Set default font size * Set default font size.
* *
* @param int $fontSize * @param int $fontSize
* @return void
*/ */
public function setDefaultFontSize($fontSize) public function setDefaultFontSize($fontSize)
{ {

View File

@ -51,13 +51,14 @@ class ODText extends AbstractReader implements ReaderInterface
} }
/** /**
* Read document part * Read document part.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @param array $relationships * @param array $relationships
* @param string $partName * @param string $partName
* @param string $docFile * @param string $docFile
* @param string $xmlFile * @param string $xmlFile
* @return void
*/ */
private function readPart(PhpWord &$phpWord, $relationships, $partName, $docFile, $xmlFile) private function readPart(PhpWord &$phpWord, $relationships, $partName, $docFile, $xmlFile)
{ {

View File

@ -28,9 +28,10 @@ use PhpOffice\PhpWord\Shared\XMLReader;
class Content extends AbstractPart class Content extends AbstractPart
{ {
/** /**
* Read content.xml * Read content.xml.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {

View File

@ -28,9 +28,10 @@ use PhpOffice\PhpWord\Shared\XMLReader;
class Meta extends AbstractPart class Meta extends AbstractPart
{ {
/** /**
* Read meta.xml * Read meta.xml.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
* @todo Process property type * @todo Process property type
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)

View File

@ -130,6 +130,7 @@ class Document
* - Pushes every other character into the text queue * - Pushes every other character into the text queue
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
* @todo Use `fread` stream for scalability * @todo Use `fread` stream for scalability
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
@ -181,7 +182,9 @@ class Document
} }
/** /**
* Mark opening braket `{` character * Mark opening braket `{` character.
*
* @return void
*/ */
private function markOpening() private function markOpening()
{ {
@ -190,7 +193,9 @@ class Document
} }
/** /**
* Mark closing braket `}` character * Mark closing braket `}` character.
*
* @return void
*/ */
private function markClosing() private function markClosing()
{ {
@ -199,7 +204,9 @@ class Document
} }
/** /**
* Mark backslash `\` character * Mark backslash `\` character.
*
* @return void
*/ */
private function markBackslash() private function markBackslash()
{ {
@ -214,7 +221,9 @@ class Document
} }
/** /**
* Mark newline character: Flush control word because it's not possible to span multiline * Mark newline character: Flush control word because it's not possible to span multiline.
*
* @return void
*/ */
private function markNewline() private function markNewline()
{ {
@ -224,9 +233,10 @@ class Document
} }
/** /**
* Flush control word or text * Flush control word or text.
* *
* @param bool $isControl * @param bool $isControl
* @return void
*/ */
private function flush($isControl = false) private function flush($isControl = false)
{ {
@ -238,9 +248,10 @@ class Document
} }
/** /**
* Flush control word * Flush control word.
* *
* @param bool $isControl * @param bool $isControl
* @return void
*/ */
private function flushControl($isControl = false) private function flushControl($isControl = false)
{ {
@ -255,7 +266,9 @@ class Document
} }
/** /**
* Flush text in queue * Flush text in queue.
*
* @return void
*/ */
private function flushText() private function flushText()
{ {
@ -279,9 +292,10 @@ class Document
} }
/** /**
* Reset control word and first char state * Reset control word and first char state.
* *
* @param bool $value * @param bool $value
* @return void
*/ */
private function setControl($value) private function setControl($value)
{ {
@ -290,9 +304,10 @@ class Document
} }
/** /**
* Push text into queue * Push text into queue.
* *
* @param string $char * @param string $char
* @return void
*/ */
private function pushText($char) private function pushText($char)
{ {
@ -306,10 +321,11 @@ class Document
} }
/** /**
* Parse control * Parse control.
* *
* @param string $control * @param string $control
* @param string $parameter * @param string $parameter
* @return void
*/ */
private function parseControl($control, $parameter) private function parseControl($control, $parameter)
{ {
@ -346,9 +362,10 @@ class Document
} }
/** /**
* Read paragraph * Read paragraph.
* *
* @param array $directives * @param array $directives
* @return void
*/ */
private function readParagraph($directives) private function readParagraph($directives)
{ {
@ -358,9 +375,10 @@ class Document
} }
/** /**
* Read style * Read style.
* *
* @param array $directives * @param array $directives
* @return void
*/ */
private function readStyle($directives) private function readStyle($directives)
{ {
@ -369,9 +387,10 @@ class Document
} }
/** /**
* Read skip * Read skip.
* *
* @param array $directives * @param array $directives
* @return void
*/ */
private function readSkip($directives) private function readSkip($directives)
{ {
@ -381,7 +400,9 @@ class Document
} }
/** /**
* Read text * Read text.
*
* @return void
*/ */
private function readText() private function readText()
{ {

View File

@ -75,13 +75,14 @@ class Word2007 extends AbstractReader implements ReaderInterface
} }
/** /**
* Read document part * Read document part.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @param array $relationships * @param array $relationships
* @param string $partName * @param string $partName
* @param string $docFile * @param string $docFile
* @param string $xmlFile * @param string $xmlFile
* @return void
*/ */
private function readPart(PhpWord &$phpWord, $relationships, $partName, $docFile, $xmlFile) private function readPart(PhpWord &$phpWord, $relationships, $partName, $docFile, $xmlFile)
{ {

View File

@ -62,7 +62,7 @@ abstract class AbstractPart
protected $rels = array(); protected $rels = array();
/** /**
* Read part * Read part.
*/ */
abstract public function read(PhpWord &$phpWord); abstract public function read(PhpWord &$phpWord);
@ -79,9 +79,10 @@ abstract class AbstractPart
} }
/** /**
* Set relationships * Set relationships.
* *
* @param array $value * @param array $value
* @return void
*/ */
public function setRels($value) public function setRels($value)
{ {
@ -89,12 +90,13 @@ abstract class AbstractPart
} }
/** /**
* Read w:p * Read w:p.
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $domNode * @param \DOMElement $domNode
* @param mixed $parent * @param mixed $parent
* @param string $docPart * @param string $docPart
* @return void
* *
* @todo Get font style for preserve text * @todo Get font style for preserve text
*/ */
@ -179,13 +181,14 @@ abstract class AbstractPart
} }
/** /**
* Read w:r * Read w:r.
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $domNode * @param \DOMElement $domNode
* @param mixed $parent * @param mixed $parent
* @param string $docPart * @param string $docPart
* @param mixed $paragraphStyle * @param mixed $paragraphStyle
* @return void
* *
* @todo Footnote paragraph style * @todo Footnote paragraph style
*/ */
@ -241,12 +244,13 @@ abstract class AbstractPart
} }
/** /**
* Read w:tbl * Read w:tbl.
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $domNode * @param \DOMElement $domNode
* @param mixed $parent * @param mixed $parent
* @param string $docPart * @param string $docPart
* @return void
*/ */
protected function readTable(XMLReader $xmlReader, \DOMElement $domNode, &$parent, $docPart = 'document') protected function readTable(XMLReader $xmlReader, \DOMElement $domNode, &$parent, $docPart = 'document')
{ {
@ -301,7 +305,7 @@ abstract class AbstractPart
} }
/** /**
* Read w:pPr * Read w:pPr.
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $domNode * @param \DOMElement $domNode
@ -337,7 +341,7 @@ abstract class AbstractPart
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $domNode * @param \DOMElement $domNode
* @return array * @return array|null
*/ */
protected function readFontStyle(XMLReader $xmlReader, \DOMElement $domNode) protected function readFontStyle(XMLReader $xmlReader, \DOMElement $domNode)
{ {

View File

@ -52,9 +52,10 @@ class DocPropsCore extends AbstractPart
protected $callbacks = array('dcterms:created' => 'strtotime', 'dcterms:modified' => 'strtotime'); protected $callbacks = array('dcterms:created' => 'strtotime', 'dcterms:modified' => 'strtotime');
/** /**
* Read core/extended document properties * Read core/extended document properties.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {

View File

@ -29,9 +29,10 @@ use PhpOffice\PhpWord\Shared\XMLReader;
class DocPropsCustom extends AbstractPart class DocPropsCustom extends AbstractPart
{ {
/** /**
* Read custom document properties * Read custom document properties.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {

View File

@ -17,9 +17,9 @@
namespace PhpOffice\PhpWord\Reader\Word2007; namespace PhpOffice\PhpWord\Reader\Word2007;
use PhpOffice\PhpWord\Element\Section;
use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Shared\XMLReader; use PhpOffice\PhpWord\Shared\XMLReader;
use PhpOffice\PhpWord\Element\Section;
/** /**
* Document reader * Document reader
@ -37,9 +37,10 @@ class Document extends AbstractPart
private $phpWord; private $phpWord;
/** /**
* Read document.xml * Read document.xml.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {
@ -61,10 +62,11 @@ class Document extends AbstractPart
} }
/** /**
* Read header footer * Read header footer.
* *
* @param array $settings * @param array $settings
* @param \PhpOffice\PhpWord\Element\Section $section * @param \PhpOffice\PhpWord\Element\Section $section
* @return void
*/ */
private function readHeaderFooter($settings, Section &$section) private function readHeaderFooter($settings, Section &$section)
{ {
@ -138,11 +140,12 @@ class Document extends AbstractPart
} }
/** /**
* Read w:p node * Read w:p node.
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $node * @param \DOMElement $node
* @param \PhpOffice\PhpWord\Element\Section $section * @param \PhpOffice\PhpWord\Element\Section $section
* @return void
* *
* @todo <w:lastRenderedPageBreak> * @todo <w:lastRenderedPageBreak>
*/ */
@ -167,11 +170,12 @@ class Document extends AbstractPart
} }
/** /**
* Read w:sectPr node * Read w:sectPr node.
* *
* @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader * @param \PhpOffice\PhpWord\Shared\XMLReader $xmlReader
* @param \DOMElement $node * @param \DOMElement $node
* @param \PhpOffice\PhpWord\Element\Section $section * @param \PhpOffice\PhpWord\Element\Section $section
* @return void
*/ */
private function readWSectPrNode(XMLReader $xmlReader, \DOMElement $node, Section &$section) private function readWSectPrNode(XMLReader $xmlReader, \DOMElement $node, Section &$section)
{ {

View File

@ -42,9 +42,10 @@ class Footnotes extends AbstractPart
protected $element = 'footnote'; protected $element = 'footnote';
/** /**
* Read (footnotes|endnotes).xml * Read (footnotes|endnotes).xml.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {

View File

@ -28,9 +28,10 @@ use PhpOffice\PhpWord\Shared\XMLReader;
class Numbering extends AbstractPart class Numbering extends AbstractPart
{ {
/** /**
* Read numbering.xml * Read numbering.xml.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {

View File

@ -28,9 +28,10 @@ use PhpOffice\PhpWord\Shared\XMLReader;
class Styles extends AbstractPart class Styles extends AbstractPart
{ {
/** /**
* Read styles.xml * Read styles.xml.
* *
* @param \PhpOffice\PhpWord\PhpWord $phpWord * @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
public function read(PhpWord &$phpWord) public function read(PhpWord &$phpWord)
{ {

View File

@ -188,7 +188,9 @@ class Settings
} }
/** /**
* Return the PDF Rendering Library * Return the PDF Rendering Library.
*
* @return string
*/ */
public static function getPdfRendererName() public static function getPdfRendererName()
{ {
@ -214,7 +216,9 @@ class Settings
/** /**
* Return the directory path to the PDF Rendering Library * Return the directory path to the PDF Rendering Library.
*
* @return string
*/ */
public static function getPdfRendererPath() public static function getPdfRendererPath()
{ {

View File

@ -27,13 +27,14 @@ use PhpOffice\PhpWord\Element\AbstractContainer;
class Html class Html
{ {
/** /**
* Add HTML parts * Add HTML parts.
* *
* Note: $stylesheet parameter is removed to avoid PHPMD error for unused parameter * Note: $stylesheet parameter is removed to avoid PHPMD error for unused parameter
* *
* @param \PhpOffice\PhpWord\Element\AbstractContainer $element Where the parts need to be added * @param \PhpOffice\PhpWord\Element\AbstractContainer $element Where the parts need to be added
* @param string $html The code to parse * @param string $html The code to parse
* @param bool $fullHTML If it's a full HTML, no need to add 'body' tag * @param bool $fullHTML If it's a full HTML, no need to add 'body' tag
* @return void
*/ */
public static function addHtml($element, $html, $fullHTML = false) public static function addHtml($element, $html, $fullHTML = false)
{ {
@ -88,12 +89,13 @@ class Html
} }
/** /**
* Parse a node and add a corresponding element to the parent element * Parse a node and add a corresponding element to the parent element.
* *
* @param \DOMNode $node node to parse * @param \DOMNode $node node to parse
* @param \PhpOffice\PhpWord\Element\AbstractContainer $element object to add an element corresponding with the node * @param \PhpOffice\PhpWord\Element\AbstractContainer $element object to add an element corresponding with the node
* @param array $styles Array with all styles * @param array $styles Array with all styles
* @param array $data Array to transport data to a next level in the DOM tree, for example level of listitems * @param array $data Array to transport data to a next level in the DOM tree, for example level of listitems
* @return void
*/ */
protected static function parseNode($node, $element, $styles = array(), $data = array()) protected static function parseNode($node, $element, $styles = array(), $data = array())
{ {
@ -162,12 +164,13 @@ class Html
} }
/** /**
* Parse child nodes * Parse child nodes.
* *
* @param \DOMNode $node * @param \DOMNode $node
* @param \PhpOffice\PhpWord\Element\AbstractContainer $element * @param \PhpOffice\PhpWord\Element\AbstractContainer $element
* @param array $styles * @param array $styles
* @param array $data * @param array $data
* @return void
*/ */
private static function parseChildNodes($node, $element, $styles, $data) private static function parseChildNodes($node, $element, $styles, $data)
{ {

View File

@ -178,7 +178,9 @@ class String
} }
/** /**
* Build control characters array * Build control characters array.
*
* @return void
*/ */
private static function buildControlCharacters() private static function buildControlCharacters()
{ {

View File

@ -149,6 +149,7 @@ class XMLWriter
* @param string $element * @param string $element
* @param string|array $attributes * @param string|array $attributes
* @param string $value * @param string $value
* @return void
*/ */
public function writeElementBlock($element, $attributes, $value = null) public function writeElementBlock($element, $attributes, $value = null)
{ {
@ -169,6 +170,7 @@ class XMLWriter
* @param string $element * @param string $element
* @param string $attribute * @param string $attribute
* @param mixed $value * @param mixed $value
* @return void
*/ */
public function writeElementIf($condition, $element, $attribute = null, $value = null) public function writeElementIf($condition, $element, $attribute = null, $value = null)
{ {
@ -189,6 +191,7 @@ class XMLWriter
* @param bool $condition * @param bool $condition
* @param string $attribute * @param string $attribute
* @param mixed $value * @param mixed $value
* @return void
*/ */
public function writeAttributeIf($condition, $attribute, $value) public function writeAttributeIf($condition, $attribute, $value)
{ {

View File

@ -123,8 +123,11 @@ class Style
} }
/** /**
* Reset styles * Reset styles.
*
* @since 0.10.0 * @since 0.10.0
*
* @return void
*/ */
public static function resetStyles() public static function resetStyles()
{ {

View File

@ -94,7 +94,9 @@ class Cell extends Border
private $shading; private $shading;
/** /**
* Get vertical align * Get vertical align.
*
* @return string
*/ */
public function getVAlign() public function getVAlign()
{ {
@ -116,7 +118,9 @@ class Cell extends Border
} }
/** /**
* Get text direction * Get text direction.
*
* @return string
*/ */
public function getTextDirection() public function getTextDirection()
{ {
@ -163,7 +167,9 @@ class Cell extends Border
} }
/** /**
* Get grid span (colspan) * Get grid span (colspan).
*
* @return integer
*/ */
public function getGridSpan() public function getGridSpan()
{ {
@ -184,7 +190,9 @@ class Cell extends Border
} }
/** /**
* Get vertical merge (rowspan) * Get vertical merge (rowspan).
*
* @return string
*/ */
public function getVMerge() public function getVMerge()
{ {

View File

@ -67,9 +67,10 @@ class TextBox extends Image
private $borderColor; private $borderColor;
/** /**
* Set margin top * Set margin top.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setInnerMarginTop($value = null) public function setInnerMarginTop($value = null)
{ {
@ -87,9 +88,10 @@ class TextBox extends Image
} }
/** /**
* Set margin left * Set margin left.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setInnerMarginLeft($value = null) public function setInnerMarginLeft($value = null)
{ {
@ -107,9 +109,10 @@ class TextBox extends Image
} }
/** /**
* Set margin right * Set margin right.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setInnerMarginRight($value = null) public function setInnerMarginRight($value = null)
{ {
@ -127,9 +130,10 @@ class TextBox extends Image
} }
/** /**
* Set margin bottom * Set margin bottom.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setInnerMarginBottom($value = null) public function setInnerMarginBottom($value = null)
{ {
@ -147,9 +151,10 @@ class TextBox extends Image
} }
/** /**
* Set TLRB cell margin * Set TLRB cell margin.
* *
* @param int $value Margin in twips * @param int $value Margin in twips
* @return void
*/ */
public function setInnerMargin($value = null) public function setInnerMargin($value = null)
{ {
@ -188,9 +193,10 @@ class TextBox extends Image
} }
/** /**
* Set border size * Set border size.
* *
* @param int $value Size in points * @param int $value Size in points
* @return void
*/ */
public function setBorderSize($value = null) public function setBorderSize($value = null)
{ {
@ -208,9 +214,10 @@ class TextBox extends Image
} }
/** /**
* Set border color * Set border color.
* *
* @param string $value * @param string $value
* @return void
*/ */
public function setBorderColor($value = null) public function setBorderColor($value = null)
{ {

View File

@ -181,6 +181,7 @@ class Template
* *
* @param string $search * @param string $search
* @param integer $numberOfClones * @param integer $numberOfClones
* @return void
* @throws \PhpOffice\PhpWord\Exception\Exception * @throws \PhpOffice\PhpWord\Exception\Exception
*/ */
public function cloneRow($search, $numberOfClones) public function cloneRow($search, $numberOfClones)

View File

@ -233,8 +233,9 @@ abstract class AbstractWriter implements WriterInterface
} }
/** /**
* Cleanup temporary file * Cleanup temporary file.
* *
* @return void
* @throws \PhpOffice\PhpWord\Exception\CopyFileException * @throws \PhpOffice\PhpWord\Exception\CopyFileException
*/ */
protected function cleanupTempFile() protected function cleanupTempFile()
@ -253,7 +254,9 @@ abstract class AbstractWriter implements WriterInterface
} }
/** /**
* Clear temporary directory * Clear temporary directory.
*
* @return void
*/ */
protected function clearTempDir() protected function clearTempDir()
{ {
@ -314,11 +317,13 @@ abstract class AbstractWriter implements WriterInterface
} }
/** /**
* Write content to file * Write content to file.
* *
* @param resource $fileHandle
* @param string $content
* @since 0.11.0 * @since 0.11.0
*
* @param resource &$fileHandle
* @param string $content
* @return void
*/ */
protected function writeFile(&$fileHandle, $content) protected function writeFile(&$fileHandle, $content)
{ {
@ -328,10 +333,11 @@ abstract class AbstractWriter implements WriterInterface
} }
/** /**
* Add files to package * Add files to package.
* *
* @param \PhpOffice\PhpWord\Shared\ZipArchive $zip * @param \PhpOffice\PhpWord\Shared\ZipArchive $zip
* @param mixed $elements * @param mixed $elements
* @return void
*/ */
protected function addFilesToPackage(ZipArchive $zip, $elements) protected function addFilesToPackage(ZipArchive $zip, $elements)
{ {
@ -360,13 +366,14 @@ abstract class AbstractWriter implements WriterInterface
} }
/** /**
* Add file to package * Add file to package.
* *
* Get the actual source from an archive image * Get the actual source from an archive image.
* *
* @param \PhpOffice\PhpWord\Shared\ZipArchive $zipPackage * @param \PhpOffice\PhpWord\Shared\ZipArchive $zipPackage
* @param string $source * @param string $source
* @param string $target * @param string $target
* @return void
*/ */
protected function addFileToPackage($zipPackage, $source, $target) protected function addFileToPackage($zipPackage, $source, $target)
{ {
@ -394,9 +401,10 @@ abstract class AbstractWriter implements WriterInterface
} }
/** /**
* Delete directory * Delete directory.
* *
* @param string $dir * @param string $dir
* @return void
*/ */
private function deleteDir($dir) private function deleteDir($dir)
{ {

View File

@ -61,9 +61,10 @@ class HTML extends AbstractWriter implements WriterInterface
} }
/** /**
* Save PhpWord to file * Save PhpWord to file.
* *
* @param string $filename * @param string $filename
* @return void
* @throws \PhpOffice\PhpWord\Exception\Exception * @throws \PhpOffice\PhpWord\Exception\Exception
*/ */
public function save($filename = null) public function save($filename = null)
@ -113,10 +114,11 @@ class HTML extends AbstractWriter implements WriterInterface
} }
/** /**
* Add note * Add note.
* *
* @param int $noteId * @param int $noteId
* @param string $noteMark * @param string $noteMark
* @return void
*/ */
public function addNote($noteId, $noteMark) public function addNote($noteId, $noteMark)
{ {

View File

@ -68,9 +68,10 @@ abstract class AbstractElement
} }
/** /**
* Set without paragraph * Set without paragraph.
* *
* @param bool $value * @param bool $value
* @return void
*/ */
public function setWithoutP($value) public function setWithoutP($value)
{ {

View File

@ -81,9 +81,10 @@ class Text extends AbstractElement
} }
/** /**
* Set opening text * Set opening text.
* *
* @param string $value * @param string $value
* @return void
*/ */
public function setOpeningText($value) public function setOpeningText($value)
{ {
@ -91,9 +92,10 @@ class Text extends AbstractElement
} }
/** /**
* Set closing text * Set closing text.
* *
* @param string $value * @param string $value
* @return void
*/ */
public function setClosingText($value) public function setClosingText($value)
{ {
@ -164,7 +166,9 @@ class Text extends AbstractElement
} }
/** /**
* Get font style * Get font style.
*
* @return void
*/ */
private function getFontStyle() private function getFontStyle()
{ {

View File

@ -42,9 +42,10 @@ abstract class AbstractPart
abstract public function write(); abstract public function write();
/** /**
* Set parent writer * Set parent writer.
* *
* @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer * @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer
* @return void
*/ */
public function setParentWriter(AbstractWriter $writer = null) public function setParentWriter(AbstractWriter $writer = null)
{ {

View File

@ -18,9 +18,9 @@
namespace PhpOffice\PhpWord\Writer\HTML\Part; namespace PhpOffice\PhpWord\Writer\HTML\Part;
use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Settings;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Font;
use PhpOffice\PhpWord\Style\Paragraph; use PhpOffice\PhpWord\Style\Paragraph;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Writer\HTML\Style\Font as FontStyleWriter; use PhpOffice\PhpWord\Writer\HTML\Style\Font as FontStyleWriter;
use PhpOffice\PhpWord\Writer\HTML\Style\Generic as GenericStyleWriter; use PhpOffice\PhpWord\Writer\HTML\Style\Generic as GenericStyleWriter;
use PhpOffice\PhpWord\Writer\HTML\Style\Paragraph as ParagraphStyleWriter; use PhpOffice\PhpWord\Writer\HTML\Style\Paragraph as ParagraphStyleWriter;
@ -71,6 +71,7 @@ class Head extends AbstractPart
return $content; return $content;
} }
/** /**
* Get styles * Get styles
* *

View File

@ -56,9 +56,10 @@ abstract class AbstractStyle
} }
/** /**
* Set parent writer * Set parent writer.
* *
* @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer * @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer
* @return void
*/ */
public function setParentWriter($writer) public function setParentWriter($writer)
{ {

View File

@ -60,9 +60,10 @@ class ODText extends AbstractWriter implements WriterInterface
} }
/** /**
* Save PhpWord to file * Save PhpWord to file.
* *
* @param string $filename * @param string $filename
* @return void
*/ */
public function save($filename = null) public function save($filename = null)
{ {

View File

@ -34,7 +34,10 @@ abstract class AbstractPart extends Word2007AbstractPart
protected $dateFormat = 'Y-m-d\TH:i:s.000'; protected $dateFormat = 'Y-m-d\TH:i:s.000';
/** /**
* Write common root attributes * Write common root attributes.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
protected function writeCommonRootAttributes(XMLWriter $xmlWriter) protected function writeCommonRootAttributes(XMLWriter $xmlWriter)
{ {
@ -68,7 +71,10 @@ abstract class AbstractPart extends Word2007AbstractPart
} }
/** /**
* Write font faces declaration * Write font faces declaration.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
protected function writeFontFaces(XMLWriter $xmlWriter) protected function writeFontFaces(XMLWriter $xmlWriter)
{ {

View File

@ -23,10 +23,10 @@ use PhpOffice\PhpWord\Element\Text;
use PhpOffice\PhpWord\Element\TextRun; use PhpOffice\PhpWord\Element\TextRun;
use PhpOffice\PhpWord\PhpWord; use PhpOffice\PhpWord\PhpWord;
use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Shared\XMLWriter;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Font;
use PhpOffice\PhpWord\Style\Paragraph; use PhpOffice\PhpWord\Style\Paragraph;
use PhpOffice\PhpWord\Style\Table as TableStyle; use PhpOffice\PhpWord\Style\Table as TableStyle;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Writer\ODText\Element\Container; use PhpOffice\PhpWord\Writer\ODText\Element\Container;
use PhpOffice\PhpWord\Writer\ODText\Style\Paragraph as ParagraphStyleWriter; use PhpOffice\PhpWord\Writer\ODText\Style\Paragraph as ParagraphStyleWriter;
@ -106,9 +106,12 @@ class Content extends AbstractPart
} }
/** /**
* Write automatic styles other than fonts and paragraphs * Write automatic styles other than fonts and paragraphs.
* *
* @since 0.11.0 * @since 0.11.0
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writeAutoStyles(XMLWriter $xmlWriter) private function writeAutoStyles(XMLWriter $xmlWriter)
{ {
@ -129,7 +132,10 @@ class Content extends AbstractPart
} }
/** /**
* Write automatic styles * Write automatic styles.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writeTextStyles(XMLWriter $xmlWriter) private function writeTextStyles(XMLWriter $xmlWriter)
{ {
@ -160,7 +166,10 @@ class Content extends AbstractPart
} }
/** /**
* Get automatic styles * Get automatic styles.
*
* @param \PhpOffice\PhpWord\PhpWord $phpWord
* @return void
*/ */
private function getAutoStyles(PhpWord $phpWord) private function getAutoStyles(PhpWord $phpWord)
{ {
@ -183,6 +192,7 @@ class Content extends AbstractPart
* @param \PhpOffice\PhpWord\Element\AbstractContainer $container * @param \PhpOffice\PhpWord\Element\AbstractContainer $container
* @param int $paragraphStyleCount * @param int $paragraphStyleCount
* @param int $fontStyleCount * @param int $fontStyleCount
* @return void
* @todo Simplify the logic * @todo Simplify the logic
*/ */
private function getContainerStyle($container, &$paragraphStyleCount, &$fontStyleCount) private function getContainerStyle($container, &$paragraphStyleCount, &$fontStyleCount)
@ -216,6 +226,7 @@ class Content extends AbstractPart
* @param \PhpOffice\PhpWord\Element\Text $element * @param \PhpOffice\PhpWord\Element\Text $element
* @param int $paragraphStyleCount * @param int $paragraphStyleCount
* @param int $fontStyleCount * @param int $fontStyleCount
* @return void
*/ */
private function getElementStyle(&$element, &$paragraphStyleCount, &$fontStyleCount) private function getElementStyle(&$element, &$paragraphStyleCount, &$fontStyleCount)
{ {

View File

@ -89,6 +89,7 @@ class Meta extends AbstractPart
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $property * @param string $property
* @param string $value * @param string $value
* @return void
* *
* @todo Handle other `$type`: double|date|dateTime|duration|boolean (4th arguments) * @todo Handle other `$type`: double|date|dateTime|duration|boolean (4th arguments)
*/ */

View File

@ -61,7 +61,10 @@ class Styles extends AbstractPart
} }
/** /**
* Write default styles * Write default styles.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writeDefault(XMLWriter $xmlWriter) private function writeDefault(XMLWriter $xmlWriter)
{ {
@ -103,7 +106,10 @@ class Styles extends AbstractPart
} }
/** /**
* Write named styles * Write named styles.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writeNamed(XMLWriter $xmlWriter) private function writeNamed(XMLWriter $xmlWriter)
{ {
@ -122,7 +128,10 @@ class Styles extends AbstractPart
} }
} }
/** /**
* Write page layout styles * Write page layout styles.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writePageLayout(XMLWriter $xmlWriter) private function writePageLayout(XMLWriter $xmlWriter)
{ {
@ -170,8 +179,12 @@ class Styles extends AbstractPart
$xmlWriter->endElement(); // style:page-layout $xmlWriter->endElement(); // style:page-layout
} }
/** /**
* Write master style * Write master style.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writeMaster(XMLWriter $xmlWriter) private function writeMaster(XMLWriter $xmlWriter)
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\ODText\Style;
class Font extends AbstractStyle class Font extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\ODText\Style;
class Image extends AbstractStyle class Image extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\ODText\Style;
class Paragraph extends AbstractStyle class Paragraph extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\ODText\Style;
class Section extends AbstractStyle class Section extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\ODText\Style;
class Table extends AbstractStyle class Table extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -190,6 +190,7 @@ abstract class AbstractRenderer extends HTML
* Save PhpWord to PDF file, post-save * Save PhpWord to PDF file, post-save
* *
* @param resource $fileHandle * @param resource $fileHandle
* @return void
* @throws Exception * @throws Exception
*/ */
protected function restoreStateAfterSave($fileHandle) protected function restoreStateAfterSave($fileHandle)

View File

@ -35,9 +35,10 @@ class DomPDF extends AbstractRenderer implements WriterInterface
protected $includeFile = 'dompdf_config.inc.php'; protected $includeFile = 'dompdf_config.inc.php';
/** /**
* Save PhpWord to file * Save PhpWord to file.
* *
* @param string $filename Name of the file to save as * @param string $filename Name of the file to save as
* @return void
*/ */
public function save($filename = null) public function save($filename = null)
{ {

View File

@ -35,9 +35,10 @@ class MPDF extends AbstractRenderer implements WriterInterface
protected $includeFile = 'mpdf.php'; protected $includeFile = 'mpdf.php';
/** /**
* Save PhpWord to file * Save PhpWord to file.
* *
* @param string $filename Name of the file to save as * @param string $filename Name of the file to save as
* @return void
*/ */
public function save($filename = null) public function save($filename = null)
{ {

View File

@ -35,9 +35,10 @@ class TCPDF extends AbstractRenderer implements WriterInterface
protected $includeFile = 'tcpdf.php'; protected $includeFile = 'tcpdf.php';
/** /**
* Save PhpWord to file * Save PhpWord to file.
* *
* @param string $filename Name of the file to save as * @param string $filename Name of the file to save as
* @return vois
*/ */
public function save($filename = null) public function save($filename = null)
{ {

View File

@ -55,9 +55,10 @@ class RTF extends AbstractWriter implements WriterInterface
} }
/** /**
* Save content to file * Save content to file.
* *
* @param string $filename * @param string $filename
* @return void
* @throws \PhpOffice\PhpWord\Exception\Exception * @throws \PhpOffice\PhpWord\Exception\Exception
*/ */
public function save($filename = null) public function save($filename = null)
@ -86,7 +87,9 @@ class RTF extends AbstractWriter implements WriterInterface
} }
/** /**
* Get font table * Get font table.
*
* @return array
*/ */
public function getFontTable() public function getFontTable()
{ {
@ -94,7 +97,9 @@ class RTF extends AbstractWriter implements WriterInterface
} }
/** /**
* Get color table * Get color table.
*
* @return array
*/ */
public function getColorTable() public function getColorTable()
{ {
@ -102,7 +107,9 @@ class RTF extends AbstractWriter implements WriterInterface
} }
/** /**
* Get last paragraph style * Get last paragraph style.
*
* @return mixed
*/ */
public function getLastParagraphStyle() public function getLastParagraphStyle()
{ {
@ -110,9 +117,10 @@ class RTF extends AbstractWriter implements WriterInterface
} }
/** /**
* Set last paragraph style * Set last paragraph style.
* *
* @param mixed $value * @param mixed $value
* @return void
*/ */
public function setLastParagraphStyle($value = '') public function setLastParagraphStyle($value = '')
{ {

View File

@ -47,7 +47,9 @@ abstract class AbstractElement extends HTMLAbstractElement
private $paragraphStyle; private $paragraphStyle;
/** /**
* Get font and paragraph styles * Get font and paragraph styles.
*
* @return void
*/ */
protected function getStyles() protected function getStyles()
{ {

View File

@ -19,8 +19,8 @@ namespace PhpOffice\PhpWord\Writer\RTF\Part;
use PhpOffice\PhpWord\Settings; use PhpOffice\PhpWord\Settings;
use PhpOffice\PhpWord\Shared\Converter; use PhpOffice\PhpWord\Shared\Converter;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Style\Font; use PhpOffice\PhpWord\Style\Font;
use PhpOffice\PhpWord\Style;
/** /**
* RTF header part writer * RTF header part writer
@ -52,7 +52,9 @@ class Header extends AbstractPart
private $colorTable = array(); private $colorTable = array();
/** /**
* Get font table * Get font table.
*
* @return array
*/ */
public function getFontTable() public function getFontTable()
{ {
@ -60,7 +62,9 @@ class Header extends AbstractPart
} }
/** /**
* Get color table * Get color table.
*
* @return array
*/ */
public function getColorTable() public function getColorTable()
{ {
@ -176,7 +180,9 @@ class Header extends AbstractPart
} }
/** /**
* Register all fonts and colors in both named and inline styles to appropriate header table * Register all fonts and colors in both named and inline styles to appropriate header table.
*
* @return void
*/ */
private function registerFont() private function registerFont()
{ {
@ -204,9 +210,10 @@ class Header extends AbstractPart
} }
/** /**
* Register border colors * Register border colors.
* *
* @param \PhpOffice\PhpWord\Style\Border $style * @param \PhpOffice\PhpWord\Style\Border $style
* @return void
*/ */
private function registerBorderColor($style) private function registerBorderColor($style)
{ {
@ -219,9 +226,10 @@ class Header extends AbstractPart
} }
/** /**
* Register fonts and colors * Register fonts and colors.
* *
* @param \PhpOffice\PhpWord\Style\AbstractStyle $style * @param \PhpOffice\PhpWord\Style\AbstractStyle $style
* @return void
*/ */
private function registerFontItems($style) private function registerFontItems($style)
{ {
@ -236,11 +244,12 @@ class Header extends AbstractPart
} }
/** /**
* Register individual font and color * Register individual font and color.
* *
* @param array $table * @param array $table
* @param string $value * @param string $value
* @param string $default * @param string $default
* @return void
*/ */
private function registerTableItem(&$table, $value, $default = null) private function registerTableItem(&$table, $value, $default = null)
{ {

View File

@ -101,9 +101,10 @@ class Border extends AbstractStyle
} }
/** /**
* Set sizes * Set sizes.
* *
* @param integer[] $value * @param integer[] $value
* @return void
*/ */
public function setSizes($value) public function setSizes($value)
{ {
@ -111,9 +112,10 @@ class Border extends AbstractStyle
} }
/** /**
* Set colors * Set colors.
* *
* @param string[] $value * @param string[] $value
* @return void
*/ */
public function setColors($value) public function setColors($value)
{ {

View File

@ -66,9 +66,11 @@ class Font extends AbstractStyle
} }
/** /**
* Set font name index * Set font name index.
*
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setNameIndex($value = 0) public function setNameIndex($value = 0)
{ {
@ -76,9 +78,10 @@ class Font extends AbstractStyle
} }
/** /**
* Set font color index * Set font color index.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setColorIndex($value = 0) public function setColorIndex($value = 0)
{ {

View File

@ -73,9 +73,10 @@ class Paragraph extends AbstractStyle
} }
/** /**
* Set nested level * Set nested level.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setNestedLevel($value) public function setNestedLevel($value)
{ {

View File

@ -88,9 +88,10 @@ class Word2007 extends AbstractWriter implements WriterInterface
} }
/** /**
* Save document by name * Save document by name.
* *
* @param string $filename * @param string $filename
* @return void
*/ */
public function save($filename = null) public function save($filename = null)
{ {
@ -163,10 +164,11 @@ class Word2007 extends AbstractWriter implements WriterInterface
} }
/** /**
* Add header/footer media files, e.g. footer1.xml.rels * Add header/footer media files, e.g. footer1.xml.rels.
* *
* @param \PhpOffice\PhpWord\Shared\ZipArchive $zip * @param \PhpOffice\PhpWord\Shared\ZipArchive $zip
* @param string $docPart * @param string $docPart
* @return void
*/ */
private function addHeaderFooterMedia(ZipArchive $zip, $docPart) private function addHeaderFooterMedia(ZipArchive $zip, $docPart)
{ {
@ -188,12 +190,13 @@ class Word2007 extends AbstractWriter implements WriterInterface
} }
/** /**
* Add header/footer content * Add header/footer content.
* *
* @param \PhpOffice\PhpWord\Element\Section $section * @param \PhpOffice\PhpWord\Element\Section $section
* @param \PhpOffice\PhpWord\Shared\ZipArchive $zip * @param \PhpOffice\PhpWord\Shared\ZipArchive $zip
* @param string $elmType header|footer * @param string $elmType header|footer
* @param integer $rId * @param integer $rId
* @return void
*/ */
private function addHeaderFooterContent(Section &$section, ZipArchive $zip, $elmType, &$rId) private function addHeaderFooterContent(Section &$section, ZipArchive $zip, $elmType, &$rId)
{ {
@ -220,6 +223,7 @@ class Word2007 extends AbstractWriter implements WriterInterface
* @param \PhpOffice\PhpWord\Shared\ZipArchive $zip * @param \PhpOffice\PhpWord\Shared\ZipArchive $zip
* @param integer $rId * @param integer $rId
* @param string $noteType * @param string $noteType
* @return void
*/ */
private function addNotes(ZipArchive $zip, &$rId, $noteType = 'footnote') private function addNotes(ZipArchive $zip, &$rId, $noteType = 'footnote')
{ {
@ -252,10 +256,11 @@ class Word2007 extends AbstractWriter implements WriterInterface
} }
/** /**
* Add chart * Add chart.
* *
* @param \PhpOffice\PhpWord\Shared\ZipArchive $zip * @param \PhpOffice\PhpWord\Shared\ZipArchive $zip
* @param integer $rId * @param integer $rId
* @return void
*/ */
private function addChart(ZipArchive $zip, &$rId) private function addChart(ZipArchive $zip, &$rId)
{ {
@ -286,9 +291,10 @@ class Word2007 extends AbstractWriter implements WriterInterface
} }
/** /**
* Register content types for each media * Register content types for each media.
* *
* @param array $media * @param array $media
* @return void
*/ */
private function registerContentTypes($media) private function registerContentTypes($media)
{ {

View File

@ -89,9 +89,10 @@ abstract class AbstractElement
} }
/** /**
* Start w:p DOM element * Start w:p DOM element.
* *
* @uses \PhpOffice\PhpWord\Writer\Word2007\Element\PageBreak::write() * @uses \PhpOffice\PhpWord\Writer\Word2007\Element\PageBreak::write()
* @return void
*/ */
protected function startElementP() protected function startElementP()
{ {
@ -105,7 +106,9 @@ abstract class AbstractElement
} }
/** /**
* End w:p DOM element * End w:p DOM element.
*
* @return void
*/ */
protected function endElementP() protected function endElementP()
{ {
@ -115,7 +118,9 @@ abstract class AbstractElement
} }
/** /**
* Write ending * Write ending.
*
* @return void
*/ */
protected function writeParagraphStyle() protected function writeParagraphStyle()
{ {
@ -123,7 +128,9 @@ abstract class AbstractElement
} }
/** /**
* Write ending * Write ending.
*
* @return void
*/ */
protected function writeFontStyle() protected function writeFontStyle()
{ {
@ -132,9 +139,10 @@ abstract class AbstractElement
/** /**
* Write text style * Write text style.
* *
* @param string $styleType Font|Paragraph * @param string $styleType Font|Paragraph
* @return void
*/ */
private function writeTextStyle($styleType) private function writeTextStyle($styleType)
{ {

View File

@ -27,7 +27,9 @@ use PhpOffice\PhpWord\Element\Chart as ChartElement;
class Chart extends AbstractElement class Chart extends AbstractElement
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class CheckBox extends Text class CheckBox extends Text
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -17,8 +17,8 @@
namespace PhpOffice\PhpWord\Writer\Word2007\Element; namespace PhpOffice\PhpWord\Writer\Word2007\Element;
use PhpOffice\PhpWord\Element\AbstractElement as Element;
use PhpOffice\PhpWord\Element\AbstractContainer as ContainerElement; use PhpOffice\PhpWord\Element\AbstractContainer as ContainerElement;
use PhpOffice\PhpWord\Element\AbstractElement as Element;
use PhpOffice\PhpWord\Element\TextBreak as TextBreakElement; use PhpOffice\PhpWord\Element\TextBreak as TextBreakElement;
use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Shared\XMLWriter;
@ -37,7 +37,9 @@ class Container extends AbstractElement
protected $namespace = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Element'; protected $namespace = 'PhpOffice\\PhpWord\\Writer\\Word2007\\Element';
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class Field extends Text class Field extends Text
{ {
/** /**
* Write field element * Write field element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -32,7 +32,9 @@ class Footnote extends Text
protected $referenceType = 'footnoteReference'; protected $referenceType = 'footnoteReference';
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -35,7 +35,9 @@ class FormField extends Text
const FILLER_LENGTH = 30; const FILLER_LENGTH = 30;
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -102,9 +104,12 @@ class FormField extends Text
} }
/** /**
* Write textinput * Write textinput.
* *
* @link http://www.datypic.com/sc/ooxml/t-w_CT_FFTextInput.html * @link http://www.datypic.com/sc/ooxml/t-w_CT_FFTextInput.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\FormField $element
* @return void
*/ */
private function writeTextInput(XMLWriter $xmlWriter, FormFieldElement $element) private function writeTextInput(XMLWriter $xmlWriter, FormFieldElement $element)
{ {
@ -116,9 +121,12 @@ class FormField extends Text
} }
/** /**
* Write checkbox * Write checkbox.
* *
* @link http://www.datypic.com/sc/ooxml/t-w_CT_FFCheckBox.html * @link http://www.datypic.com/sc/ooxml/t-w_CT_FFCheckBox.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\FormField $element
* @return void
*/ */
private function writeCheckBox(XMLWriter $xmlWriter, FormFieldElement $element) private function writeCheckBox(XMLWriter $xmlWriter, FormFieldElement $element)
{ {
@ -137,9 +145,12 @@ class FormField extends Text
} }
/** /**
* Write dropdown * Write dropdown.
* *
* @link http://www.datypic.com/sc/ooxml/t-w_CT_FFDDList.html * @link http://www.datypic.com/sc/ooxml/t-w_CT_FFDDList.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\FormField $element
* @return void
*/ */
private function writeDropDown(XMLWriter $xmlWriter, FormFieldElement $element) private function writeDropDown(XMLWriter $xmlWriter, FormFieldElement $element)
{ {

View File

@ -29,7 +29,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Image as ImageStyleWriter;
class Image extends AbstractElement class Image extends AbstractElement
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -47,7 +49,9 @@ class Image extends AbstractElement
} }
/** /**
* Write image element * Write image element.
*
* @return void
*/ */
private function writeImage(XMLWriter $xmlWriter, ImageElement $element) private function writeImage(XMLWriter $xmlWriter, ImageElement $element)
{ {
@ -78,8 +82,11 @@ class Image extends AbstractElement
$this->endElementP(); $this->endElementP();
} }
/** /**
* Write watermark element * Write watermark element.
*
* @return void
*/ */
private function writeWatermark(XMLWriter $xmlWriter, ImageElement $element) private function writeWatermark(XMLWriter $xmlWriter, ImageElement $element)
{ {

View File

@ -27,7 +27,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Line as LineStyleWriter;
class Line extends AbstractElement class Line extends AbstractElement
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class Link extends Text class Link extends Text
{ {
/** /**
* Write link element * Write link element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -27,7 +27,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter;
class ListItem extends AbstractElement class ListItem extends AbstractElement
{ {
/** /**
* Write list item element * Write list item element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -27,7 +27,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter;
class ListItemRun extends AbstractElement class ListItemRun extends AbstractElement
{ {
/** /**
* Write list item element * Write list item element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -27,7 +27,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Image as ImageStyleWriter;
class Object extends AbstractElement class Object extends AbstractElement
{ {
/** /**
* Write object element * Write object element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,9 +25,10 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class PageBreak extends AbstractElement class PageBreak extends AbstractElement
{ {
/** /**
* Write element * Write element.
* *
* @usedby \PhpOffice\PhpWord\Writer\Word2007\Element\AbstractElement::startElementP() * @usedby \PhpOffice\PhpWord\Writer\Word2007\Element\AbstractElement::startElementP()
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class PreserveText extends Text class PreserveText extends Text
{ {
/** /**
* Write preserve text element * Write preserve text element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -30,7 +30,9 @@ use PhpOffice\PhpWord\Shared\XMLWriter;
class SDT extends Text class SDT extends Text
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -68,9 +70,12 @@ class SDT extends Text
} }
/** /**
* Write combo box * Write combo box.
* *
* @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtComboBox.html * @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtComboBox.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\SDT $element
* @return void
*/ */
private function writeComboBox(XMLWriter $xmlWriter, SDTElement $element) private function writeComboBox(XMLWriter $xmlWriter, SDTElement $element)
{ {
@ -85,9 +90,12 @@ class SDT extends Text
} }
/** /**
* Write drop down list * Write drop down list.
* *
* @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtDropDownList.html * @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtDropDownList.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\SDT $element
* @return void
*/ */
private function writeDropDownList(XMLWriter $xmlWriter, SDTElement $element) private function writeDropDownList(XMLWriter $xmlWriter, SDTElement $element)
{ {
@ -95,9 +103,12 @@ class SDT extends Text
} }
/** /**
* Write date * Write date.
* *
* @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtDate.html * @link http://www.datypic.com/sc/ooxml/t-w_CT_SdtDate.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\SDT $element
* @return void
*/ */
private function writeDate(XMLWriter $xmlWriter, SDTElement $element) private function writeDate(XMLWriter $xmlWriter, SDTElement $element)
{ {

View File

@ -17,8 +17,8 @@
namespace PhpOffice\PhpWord\Writer\Word2007\Element; namespace PhpOffice\PhpWord\Writer\Word2007\Element;
use PhpOffice\PhpWord\Shared\XMLWriter;
use PhpOffice\PhpWord\Element\Shape as ShapeElement; use PhpOffice\PhpWord\Element\Shape as ShapeElement;
use PhpOffice\PhpWord\Shared\XMLWriter;
use PhpOffice\PhpWord\Style\Shape as ShapeStyle; use PhpOffice\PhpWord\Style\Shape as ShapeStyle;
use PhpOffice\PhpWord\Writer\Word2007\Style\Shape as ShapeStyleWriter; use PhpOffice\PhpWord\Writer\Word2007\Style\Shape as ShapeStyleWriter;
@ -31,7 +31,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Shape as ShapeStyleWriter;
class Shape extends AbstractElement class Shape extends AbstractElement
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -74,10 +76,11 @@ class Shape extends AbstractElement
} }
/** /**
* Write arc * Write arc.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\Shape $style * @param \PhpOffice\PhpWord\Style\Shape $style
* @return void
*/ */
private function writeArc(XMLWriter $xmlWriter, ShapeStyle $style) private function writeArc(XMLWriter $xmlWriter, ShapeStyle $style)
{ {
@ -88,10 +91,11 @@ class Shape extends AbstractElement
} }
/** /**
* Write curve * Write curve.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\Shape $style * @param \PhpOffice\PhpWord\Style\Shape $style
* @return void
*/ */
private function writeCurve(XMLWriter $xmlWriter, ShapeStyle $style) private function writeCurve(XMLWriter $xmlWriter, ShapeStyle $style)
{ {
@ -103,10 +107,11 @@ class Shape extends AbstractElement
} }
/** /**
* Write line * Write line.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\Shape $style * @param \PhpOffice\PhpWord\Style\Shape $style
* @return void
*/ */
private function writeLine(XMLWriter $xmlWriter, ShapeStyle $style) private function writeLine(XMLWriter $xmlWriter, ShapeStyle $style)
{ {
@ -117,10 +122,11 @@ class Shape extends AbstractElement
} }
/** /**
* Write polyline * Write polyline.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\Shape $style * @param \PhpOffice\PhpWord\Style\Shape $style
* @return void
*/ */
private function writePolyline(XMLWriter $xmlWriter, ShapeStyle $style) private function writePolyline(XMLWriter $xmlWriter, ShapeStyle $style)
{ {
@ -128,10 +134,11 @@ class Shape extends AbstractElement
} }
/** /**
* Write rectangle * Write rectangle.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\Shape $style * @param \PhpOffice\PhpWord\Style\Shape $style
* @return void
*/ */
private function writeRoundRect(XMLWriter $xmlWriter, ShapeStyle $style) private function writeRoundRect(XMLWriter $xmlWriter, ShapeStyle $style)
{ {

View File

@ -32,7 +32,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Tab as TabStyleWriter;
class TOC extends AbstractElement class TOC extends AbstractElement
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -68,6 +70,7 @@ class TOC extends AbstractElement
* @param \PhpOffice\PhpWord\Element\TOC $element * @param \PhpOffice\PhpWord\Element\TOC $element
* @param \PhpOffice\PhpWord\Element\Title $title * @param \PhpOffice\PhpWord\Element\Title $title
* @param bool $writeFieldMark * @param bool $writeFieldMark
* @return void
*/ */
private function writeTitle(XMLWriter $xmlWriter, TOCElement $element, $title, $writeFieldMark) private function writeTitle(XMLWriter $xmlWriter, TOCElement $element, $title, $writeFieldMark)
{ {
@ -135,6 +138,7 @@ class TOC extends AbstractElement
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\TOC $element * @param \PhpOffice\PhpWord\Element\TOC $element
* @param int $indent * @param int $indent
* @return void
*/ */
private function writeStyle(XMLWriter $xmlWriter, TOCElement $element, $indent) private function writeStyle(XMLWriter $xmlWriter, TOCElement $element, $indent)
{ {
@ -176,7 +180,11 @@ class TOC extends AbstractElement
} }
/** /**
* Write TOC Field * Write TOC Field.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\TOC $element
* @return void
*/ */
private function writeFieldMark(XMLWriter $xmlWriter, TOCElement $element) private function writeFieldMark(XMLWriter $xmlWriter, TOCElement $element)
{ {

View File

@ -35,7 +35,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\Table as TableStyleWriter;
class Table extends AbstractElement class Table extends AbstractElement
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -69,7 +71,11 @@ class Table extends AbstractElement
} }
/** /**
* Write column * Write column.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\Table $element
* @return void
*/ */
private function writeColumns(XMLWriter $xmlWriter, TableElement $element) private function writeColumns(XMLWriter $xmlWriter, TableElement $element)
{ {
@ -102,7 +108,11 @@ class Table extends AbstractElement
} }
/** /**
* Write row * Write row.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\Row $row
* @return void
*/ */
private function writeRow(XMLWriter $xmlWriter, RowElement $row) private function writeRow(XMLWriter $xmlWriter, RowElement $row)
{ {
@ -125,7 +135,11 @@ class Table extends AbstractElement
} }
/** /**
* Write cell * Write cell.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\Cell $cell
* @return void
*/ */
private function writeCell(XMLWriter $xmlWriter, CellElement $cell) private function writeCell(XMLWriter $xmlWriter, CellElement $cell)
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class Text extends AbstractElement class Text extends AbstractElement
{ {
/** /**
* Write text element * Write text element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -27,7 +27,9 @@ use PhpOffice\PhpWord\Writer\Word2007\Style\TextBox as TextBoxStyleWriter;
class TextBox extends Image class TextBox extends Image
{ {
/** /**
* Write element * Write element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class TextBreak extends Text class TextBreak extends Text
{ {
/** /**
* Write text break element * Write text break element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class TextRun extends Text class TextRun extends Text
{ {
/** /**
* Write textrun element * Write textrun element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Element;
class Title extends AbstractElement class Title extends AbstractElement
{ {
/** /**
* Write title element * Write title element.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -46,9 +46,10 @@ abstract class AbstractPart
abstract public function write(); abstract public function write();
/** /**
* Set parent writer * Set parent writer.
* *
* @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer * @param \PhpOffice\PhpWord\Writer\AbstractWriter $writer
* @return void
*/ */
public function setParentWriter(AbstractWriter $writer = null) public function setParentWriter(AbstractWriter $writer = null)
{ {

View File

@ -17,8 +17,8 @@
namespace PhpOffice\PhpWord\Writer\Word2007\Part; namespace PhpOffice\PhpWord\Writer\Word2007\Part;
use PhpOffice\PhpWord\Shared\XMLWriter;
use PhpOffice\PhpWord\Element\Chart as ChartElement; use PhpOffice\PhpWord\Element\Chart as ChartElement;
use PhpOffice\PhpWord\Shared\XMLWriter;
/** /**
* Word2007 chart part writer: word/charts/chartx.xml * Word2007 chart part writer: word/charts/chartx.xml
@ -59,7 +59,10 @@ class Chart extends AbstractPart
private $options = array(); private $options = array();
/** /**
* Set chart element * Set chart element.
*
* @param \PhpOffice\PhpWord\Element\Chart $element
* @return void
*/ */
public function setElement(ChartElement $element) public function setElement(ChartElement $element)
{ {
@ -93,6 +96,8 @@ class Chart extends AbstractPart
* Write chart * Write chart
* *
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_Chart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_Chart.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writeChart(XMLWriter $xmlWriter) private function writeChart(XMLWriter $xmlWriter)
{ {
@ -106,7 +111,7 @@ class Chart extends AbstractPart
} }
/** /**
* Write plot area * Write plot area.
* *
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_PlotArea.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_PlotArea.html
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_PieChart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_PieChart.html
@ -116,6 +121,8 @@ class Chart extends AbstractPart
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_AreaChart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_AreaChart.html
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_RadarChart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_RadarChart.html
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_ScatterChart.html * @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_ScatterChart.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @return void
*/ */
private function writePlotArea(XMLWriter $xmlWriter) private function writePlotArea(XMLWriter $xmlWriter)
{ {
@ -171,10 +178,11 @@ class Chart extends AbstractPart
} }
/** /**
* Write series * Write series.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param bool $scatter * @param bool $scatter
* @return void
*/ */
private function writeSeries(XMLWriter $xmlWriter, $scatter = false) private function writeSeries(XMLWriter $xmlWriter, $scatter = false)
{ {
@ -209,11 +217,12 @@ class Chart extends AbstractPart
} }
/** /**
* Write series items * Write series items.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $type * @param string $type
* @param array $values * @param array $values
* @return void
*/ */
private function writeSeriesItem(XMLWriter $xmlWriter, $type, $values) private function writeSeriesItem(XMLWriter $xmlWriter, $type, $values)
{ {
@ -248,9 +257,10 @@ class Chart extends AbstractPart
/** /**
* Write axis * Write axis
* *
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_CatAx.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $type * @param string $type
* @link http://www.datypic.com/sc/ooxml/t-draw-chart_CT_CatAx.html * @return void
*/ */
private function writeAxis(XMLWriter $xmlWriter, $type) private function writeAxis(XMLWriter $xmlWriter, $type)
{ {
@ -290,9 +300,10 @@ class Chart extends AbstractPart
/** /**
* Write shape * Write shape
* *
* @link http://www.datypic.com/sc/ooxml/t-a_CT_ShapeProperties.html
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param bool $line * @param bool $line
* @link http://www.datypic.com/sc/ooxml/t-a_CT_ShapeProperties.html * @return void
*/ */
private function writeShape(XMLWriter $xmlWriter, $line = false) private function writeShape(XMLWriter $xmlWriter, $line = false)
{ {

View File

@ -82,6 +82,7 @@ class ContentTypes extends AbstractPart
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter XML Writer * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter XML Writer
* @param array $parts * @param array $parts
* @param boolean $isDefault * @param boolean $isDefault
* @return void
*/ */
private function writeContentType(XMLWriter $xmlWriter, $parts, $isDefault) private function writeContentType(XMLWriter $xmlWriter, $parts, $isDefault)
{ {

View File

@ -79,10 +79,11 @@ class Document extends AbstractPart
} }
/** /**
* Write begin section * Write begin section.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\Section $section * @param \PhpOffice\PhpWord\Element\Section $section
* @return void
*/ */
private function writeSection(XMLWriter $xmlWriter, Section $section) private function writeSection(XMLWriter $xmlWriter, Section $section)
{ {
@ -94,10 +95,11 @@ class Document extends AbstractPart
} }
/** /**
* Write end section * Write end section.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\Section $section * @param \PhpOffice\PhpWord\Element\Section $section
* @return void
*/ */
private function writeSectionSettings(XMLWriter $xmlWriter, Section $section) private function writeSectionSettings(XMLWriter $xmlWriter, Section $section)
{ {

View File

@ -26,7 +26,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part;
class FontTable extends AbstractPart class FontTable extends AbstractPart
{ {
/** /**
* Write fontTable.xml * Write fontTable.xml.
*
* @return string
*/ */
public function write() public function write()
{ {

View File

@ -133,10 +133,11 @@ class Footnotes extends AbstractPart
} }
/** /**
* Write note item * Write note item.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Element\Footnote|\PhpOffice\PhpWord\Element\Endnote $element * @param \PhpOffice\PhpWord\Element\Footnote|\PhpOffice\PhpWord\Element\Endnote $element
* @return void
*/ */
protected function writeNote(XMLWriter $xmlWriter, $element) protected function writeNote(XMLWriter $xmlWriter, $element)
{ {

View File

@ -18,9 +18,9 @@
namespace PhpOffice\PhpWord\Writer\Word2007\Part; namespace PhpOffice\PhpWord\Writer\Word2007\Part;
use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Shared\XMLWriter;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Style\Numbering as NumberingStyle; use PhpOffice\PhpWord\Style\Numbering as NumberingStyle;
use PhpOffice\PhpWord\Style\NumberingLevel; use PhpOffice\PhpWord\Style\NumberingLevel;
use PhpOffice\PhpWord\Style;
/** /**
* Word2007 numbering part writer: word/numbering.xml * Word2007 numbering part writer: word/numbering.xml
@ -95,7 +95,11 @@ class Numbering extends AbstractPart
} }
/** /**
* Write level * Write level.
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\NumberingLevel $level
* @return void
*/ */
private function writeLevel(XMLWriter $xmlWriter, NumberingLevel $level) private function writeLevel(XMLWriter $xmlWriter, NumberingLevel $level)
{ {
@ -129,9 +133,13 @@ class Numbering extends AbstractPart
} }
/** /**
* Write level paragraph * Write level paragraph.
* *
* @since 0.11.0 * @since 0.11.0
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\NumberingLevel $level
* @return void
* @todo Use paragraph style writer * @todo Use paragraph style writer
*/ */
private function writeParagraph(XMLWriter $xmlWriter, NumberingLevel $level) private function writeParagraph(XMLWriter $xmlWriter, NumberingLevel $level)
@ -158,9 +166,13 @@ class Numbering extends AbstractPart
} }
/** /**
* Write level font * Write level font.
* *
* @since 0.11.0 * @since 0.11.0
*
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\NumberingLevel $level
* @return void
* @todo Use font style writer * @todo Use font style writer
*/ */
private function writeFont(XMLWriter $xmlWriter, NumberingLevel $level) private function writeFont(XMLWriter $xmlWriter, NumberingLevel $level)

View File

@ -47,12 +47,13 @@ class Rels extends AbstractPart
} }
/** /**
* Write relationships * Write relationships.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param array $xmlRels * @param array $xmlRels
* @param array $mediaRels * @param array $mediaRels
* @param int $relId * @param int $relId
* @return void
*/ */
protected function writeRels(XMLWriter $xmlWriter, $xmlRels = array(), $mediaRels = array(), $relId = 1) protected function writeRels(XMLWriter $xmlWriter, $xmlRels = array(), $mediaRels = array(), $relId = 1)
{ {
@ -74,11 +75,12 @@ class Rels extends AbstractPart
} }
/** /**
* Write media relationships * Write media relationships.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param int $relId * @param int $relId
* @param array $mediaRel * @param array $mediaRel
* @return void
*/ */
private function writeMediaRel(XMLWriter $xmlWriter, $relId, $mediaRel) private function writeMediaRel(XMLWriter $xmlWriter, $relId, $mediaRel)
{ {
@ -96,7 +98,7 @@ class Rels extends AbstractPart
} }
/** /**
* Write individual rels entry * Write individual rels entry.
* *
* Format: * Format:
* <Relationship Id="rId..." Type="http://..." Target="....xml" TargetMode="..." /> * <Relationship Id="rId..." Type="http://..." Target="....xml" TargetMode="..." />
@ -106,6 +108,7 @@ class Rels extends AbstractPart
* @param string $type Relationship type * @param string $type Relationship type
* @param string $target Relationship target * @param string $target Relationship target
* @param string $targetMode Relationship target mode * @param string $targetMode Relationship target mode
* @return void
* @throws \PhpOffice\PhpWord\Exception\Exception * @throws \PhpOffice\PhpWord\Exception\Exception
*/ */
private function writeRel(XMLWriter $xmlWriter, $relId, $type, $target, $targetMode = '') private function writeRel(XMLWriter $xmlWriter, $relId, $type, $target, $targetMode = '')

View File

@ -62,11 +62,12 @@ class Settings extends AbstractPart
} }
/** /**
* Write indivual setting, recursive to any child settings * Write indivual setting, recursive to any child settings.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $settingKey * @param string $settingKey
* @param array|string $settingValue * @param array|string $settingValue
* @return void
*/ */
protected function writeSetting($xmlWriter, $settingKey, $settingValue) protected function writeSetting($xmlWriter, $settingKey, $settingValue)
{ {
@ -90,7 +91,9 @@ class Settings extends AbstractPart
} }
/** /**
* Get settings * Get settings.
*
* @return void
*/ */
private function getSettings() private function getSettings()
{ {
@ -141,7 +144,9 @@ class Settings extends AbstractPart
} }
/** /**
* Get protection settings * Get protection settings.
*
* @return void
*/ */
private function getProtection() private function getProtection()
{ {
@ -157,7 +162,9 @@ class Settings extends AbstractPart
} }
/** /**
* Get compatibility setting * Get compatibility setting.
*
* @return void
*/ */
private function getCompatibility() private function getCompatibility()
{ {

View File

@ -19,9 +19,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Part;
use PhpOffice\PhpWord\Settings as PhpWordSettings; use PhpOffice\PhpWord\Settings as PhpWordSettings;
use PhpOffice\PhpWord\Shared\XMLWriter; use PhpOffice\PhpWord\Shared\XMLWriter;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Style\Font as FontStyle; use PhpOffice\PhpWord\Style\Font as FontStyle;
use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle; use PhpOffice\PhpWord\Style\Paragraph as ParagraphStyle;
use PhpOffice\PhpWord\Style;
use PhpOffice\PhpWord\Style\Table as TableStyle; use PhpOffice\PhpWord\Style\Table as TableStyle;
use PhpOffice\PhpWord\Writer\Word2007\Style\Font as FontStyleWriter; use PhpOffice\PhpWord\Writer\Word2007\Style\Font as FontStyleWriter;
use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter; use PhpOffice\PhpWord\Writer\Word2007\Style\Paragraph as ParagraphStyleWriter;
@ -75,10 +75,11 @@ class Styles extends AbstractPart
} }
/** /**
* Write default font and other default styles * Write default font and other default styles.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param \PhpOffice\PhpWord\Style\AbstractStyle[] $styles * @param \PhpOffice\PhpWord\Style\AbstractStyle[] $styles
* @return void
*/ */
private function writeDefaultStyles(XMLWriter $xmlWriter, $styles) private function writeDefaultStyles(XMLWriter $xmlWriter, $styles)
{ {
@ -139,11 +140,12 @@ class Styles extends AbstractPart
} }
/** /**
* Write font style * Write font style.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $styleName * @param string $styleName
* @param \PhpOffice\PhpWord\Style\Font $style * @param \PhpOffice\PhpWord\Style\Font $style
* @return void
*/ */
private function writeFontStyle(XMLWriter $xmlWriter, $styleName, FontStyle $style) private function writeFontStyle(XMLWriter $xmlWriter, $styleName, FontStyle $style)
{ {
@ -192,11 +194,12 @@ class Styles extends AbstractPart
} }
/** /**
* Write paragraph style * Write paragraph style.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $styleName * @param string $styleName
* @param \PhpOffice\PhpWord\Style\Paragraph $style * @param \PhpOffice\PhpWord\Style\Paragraph $style
* @return void
*/ */
private function writeParagraphStyle(XMLWriter $xmlWriter, $styleName, ParagraphStyle $style) private function writeParagraphStyle(XMLWriter $xmlWriter, $styleName, ParagraphStyle $style)
{ {
@ -224,11 +227,12 @@ class Styles extends AbstractPart
} }
/** /**
* Write table style * Write table style.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $styleName * @param string $styleName
* @param \PhpOffice\PhpWord\Style\Table $style * @param \PhpOffice\PhpWord\Style\Table $style
* @return void
*/ */
private function writeTableStyle(XMLWriter $xmlWriter, $styleName, TableStyle $style) private function writeTableStyle(XMLWriter $xmlWriter, $styleName, TableStyle $style)
{ {

View File

@ -47,7 +47,7 @@ abstract class AbstractStyle
abstract public function write(); abstract public function write();
/** /**
* Create new instance * Create new instance.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string|\PhpOffice\PhpWord\Style\AbstractStyle $style * @param string|\PhpOffice\PhpWord\Style\AbstractStyle $style
@ -104,11 +104,12 @@ abstract class AbstractStyle
} }
/** /**
* Write child style * Write child style.
* *
* @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter * @param \PhpOffice\PhpWord\Shared\XMLWriter $xmlWriter
* @param string $name * @param string $name
* @param mixed $value * @param mixed $value
* @return void
*/ */
protected function writeChildStyle(XMLWriter $xmlWriter, $name, $value) protected function writeChildStyle(XMLWriter $xmlWriter, $name, $value)
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style;
class Alignment extends AbstractStyle class Alignment extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -32,7 +32,9 @@ class Cell extends AbstractStyle
private $width; private $width;
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -88,9 +90,10 @@ class Cell extends AbstractStyle
} }
/** /**
* Set width * Set width.
* *
* @param int $value * @param int $value
* @return void
*/ */
public function setWidth($value = null) public function setWidth($value = null)
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style;
class Extrusion extends AbstractStyle class Extrusion extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -25,7 +25,9 @@ namespace PhpOffice\PhpWord\Writer\Word2007\Style;
class Fill extends AbstractStyle class Fill extends AbstractStyle
{ {
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {

View File

@ -32,7 +32,9 @@ class Font extends AbstractStyle
private $isInline = false; private $isInline = false;
/** /**
* Write style * Write style.
*
* @return void
*/ */
public function write() public function write()
{ {
@ -51,7 +53,9 @@ class Font extends AbstractStyle
} }
/** /**
* Write full style * Write full style.
*
* @return void
*/ */
private function writeStyle() private function writeStyle()
{ {
@ -130,9 +134,10 @@ class Font extends AbstractStyle
} }
/** /**
* Set is inline * Set is inline.
* *
* @param bool $value * @param bool $value
* @return void
*/ */
public function setIsInline($value) public function setIsInline($value)
{ {

Some files were not shown because too many files have changed in this diff Show More