Skip to content

Commit

Permalink
Fix PHP Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jean-Baptiste Noblot committed Oct 23, 2018
1 parent 97da2d9 commit d07784c
Show file tree
Hide file tree
Showing 60 changed files with 243 additions and 86 deletions.
3 changes: 2 additions & 1 deletion src/PhpPresentation/AbstractShape.php
Expand Up @@ -143,7 +143,7 @@ public function __clone()
/**
* Get Container, Slide or Group
*
* @return \PhpOffice\PhpPresentation\Container
* @return \PhpOffice\PhpPresentation\ShapeContainerInterface
*/
public function getContainer()
{
Expand Down Expand Up @@ -385,6 +385,7 @@ public function hasHyperlink()
* Get Hyperlink
*
* @return \PhpOffice\PhpPresentation\Shape\Hyperlink
* @throws \Exception
*/
public function getHyperlink()
{
Expand Down
7 changes: 5 additions & 2 deletions src/PhpPresentation/IOFactory.php
Expand Up @@ -35,6 +35,7 @@ class IOFactory
* @param PhpPresentation $phpPresentation
* @param string $name
* @return \PhpOffice\PhpPresentation\Writer\WriterInterface
* @throws \Exception
*/
public static function createWriter(PhpPresentation $phpPresentation, $name = 'PowerPoint2007')
{
Expand All @@ -47,6 +48,7 @@ public static function createWriter(PhpPresentation $phpPresentation, $name = 'P
*
* @param string $name
* @return \PhpOffice\PhpPresentation\Reader\ReaderInterface
* @throws \Exception
*/
public static function createReader($name = '')
{
Expand Down Expand Up @@ -81,8 +83,8 @@ public static function load($pFilename)
* @param string $name
* @param string $type
* @param \PhpOffice\PhpPresentation\PhpPresentation $phpPresentation
* @throws \Exception
* @return
* @return mixed
* @throws \ReflectionException
*/
private static function loadClass($class, $name, $type, PhpPresentation $phpPresentation = null)
{
Expand All @@ -102,6 +104,7 @@ private static function loadClass($class, $name, $type, PhpPresentation $phpPres
*
* @param string $class
* @return bool
* @throws \ReflectionException
*/
private static function isConcreteClass($class)
{
Expand Down
9 changes: 6 additions & 3 deletions src/PhpPresentation/PhpPresentation.php
Expand Up @@ -190,6 +190,7 @@ public function getActiveSlide()
* Create slide and add it to this presentation
*
* @return \PhpOffice\PhpPresentation\Slide
* @throws \Exception
*/
public function createSlide()
{
Expand Down Expand Up @@ -340,6 +341,7 @@ public function getSlideIterator()
* Create a masterslide and add it to this presentation
*
* @return \PhpOffice\PhpPresentation\Slide\SlideMaster
* @throws \Exception
*/
public function createMasterSlide()
{
Expand All @@ -366,6 +368,7 @@ public function addMasterSlide(SlideMaster $slide = null)
* Copy presentation (!= clone!)
*
* @return PhpPresentation
* @throws \Exception
*/
public function copy()
{
Expand All @@ -383,7 +386,7 @@ public function copy()
/**
* Mark a document as final
* @param bool $state
* @return PhpPresentation
* @return PresentationProperties
* @deprecated for getPresentationProperties()->markAsFinal()
*/
public function markAsFinal($state = true)
Expand All @@ -403,8 +406,8 @@ public function isMarkedAsFinal()

/**
* Set the zoom of the document (in percentage)
* @param float $zoom
* @return PhpPresentation
* @param int $zoom
* @return PresentationProperties
* @deprecated for getPresentationProperties()->setZoom()
*/
public function setZoom($zoom = 1)
Expand Down
6 changes: 3 additions & 3 deletions src/PhpPresentation/PresentationProperties.php
Expand Up @@ -118,7 +118,7 @@ public function setThumbnailPath($path = '')
/**
* Mark a document as final
* @param bool $state
* @return PhpPresentation
* @return PresentationProperties
*/
public function markAsFinal($state = true)
{
Expand All @@ -139,8 +139,8 @@ public function isMarkedAsFinal()

/**
* Set the zoom of the document (in percentage)
* @param float $zoom
* @return PhpPresentation
* @param int $zoom
* @return PresentationProperties
*/
public function setZoom($zoom = 1)
{
Expand Down
23 changes: 17 additions & 6 deletions src/PhpPresentation/Reader/ODPresentation.php
Expand Up @@ -118,8 +118,9 @@ public function load($pFilename)
/**
* Load PhpPresentation Serialized file
*
* @param string $pFilename
* @param string $pFilename
* @return \PhpOffice\PhpPresentation\PhpPresentation
* @throws \Exception
*/
protected function loadFile($pFilename)
{
Expand Down Expand Up @@ -191,10 +192,12 @@ protected function loadSlides()
}
}
}

/**
* Extract style
* @param \DOMElement $nodeStyle
* @return bool
* @throws \Exception
*/
protected function loadStyle(\DOMElement $nodeStyle)
{
Expand Down Expand Up @@ -350,6 +353,8 @@ protected function loadStyle(\DOMElement $nodeStyle)
* Read Slide
*
* @param \DOMElement $nodeSlide
* @return bool
* @throws \Exception
*/
protected function loadSlide(\DOMElement $nodeSlide)
{
Expand Down Expand Up @@ -377,11 +382,12 @@ protected function loadSlide(\DOMElement $nodeSlide)
}
return true;
}

/**
* Read Shape Drawing
*
* @param \DOMElement $oNodeFrame
* @throws \Exception
*/
protected function loadShapeDrawing(\DOMElement $oNodeFrame)
{
Expand Down Expand Up @@ -428,6 +434,7 @@ protected function loadShapeDrawing(\DOMElement $oNodeFrame)
* Read Shape RichText
*
* @param \DOMElement $oNodeFrame
* @throws \Exception
*/
protected function loadShapeRichText(\DOMElement $oNodeFrame)
{
Expand Down Expand Up @@ -456,11 +463,12 @@ protected function loadShapeRichText(\DOMElement $oNodeFrame)
}

protected $levelParagraph = 0;

/**
* Read Paragraph
* @param RichText $oShape
* @param \DOMElement $oNodeParent
* @throws \Exception
*/
protected function readParagraph(RichText $oShape, \DOMElement $oNodeParent)
{
Expand All @@ -477,11 +485,12 @@ protected function readParagraph(RichText $oShape, \DOMElement $oNodeParent)
$this->readParagraphItem($oParagraph, $oNodeRichTextElement);
}
}

/**
* Read Paragraph Item
* @param Paragraph $oParagraph
* @param \DOMElement $oNodeParent
* @throws \Exception
*/
protected function readParagraphItem(Paragraph $oParagraph, \DOMElement $oNodeParent)
{
Expand Down Expand Up @@ -512,6 +521,7 @@ protected function readParagraphItem(Paragraph $oParagraph, \DOMElement $oNodePa
*
* @param RichText $oShape
* @param \DOMElement $oNodeParent
* @throws \Exception
*/
protected function readList(RichText $oShape, \DOMElement $oNodeParent)
{
Expand All @@ -526,12 +536,13 @@ protected function readList(RichText $oShape, \DOMElement $oNodeParent)
}
}
}

/**
* Read List Item
* @param RichText $oShape
* @param \DOMElement $oNodeParent
* @param \DOMElement $oNodeParagraph
* @throws \Exception
*/
protected function readListItem(RichText $oShape, \DOMElement $oNodeParent, \DOMElement $oNodeParagraph)
{
Expand Down
14 changes: 13 additions & 1 deletion src/PhpPresentation/Reader/PowerPoint2007.php
Expand Up @@ -131,6 +131,7 @@ public function load($pFilename)
*
* @param string $pFilename
* @return \PhpOffice\PhpPresentation\PhpPresentation
* @throws \Exception
*/
protected function loadFile($pFilename)
{
Expand Down Expand Up @@ -265,6 +266,8 @@ protected function loadViewProperties($sPart)

/**
* Extract all slides
* @param $sPart
* @throws \Exception
*/
protected function loadSlides($sPart)
{
Expand Down Expand Up @@ -302,6 +305,7 @@ protected function loadSlides($sPart)
* Extract all MasterSlides
* @param XMLReader $xmlReader
* @param string $fileRels
* @throws \Exception
*/
protected function loadMasterSlides(XMLReader $xmlReader, $fileRels)
{
Expand All @@ -328,6 +332,7 @@ protected function loadMasterSlides(XMLReader $xmlReader, $fileRels)
* Extract data from slide
* @param string $sPart
* @param string $baseFile
* @throws \Exception
*/
protected function loadSlide($sPart, $baseFile)
{
Expand Down Expand Up @@ -416,6 +421,7 @@ protected function loadSlide($sPart, $baseFile)
/**
* @param string $sPart
* @param string $baseFile
* @throws \Exception
*/
protected function loadMasterSlide($sPart, $baseFile)
{
Expand Down Expand Up @@ -559,6 +565,7 @@ protected function loadMasterSlide($sPart, $baseFile)
* @param string $baseFile
* @param SlideMaster $oSlideMaster
* @return SlideLayout|null
* @throws \Exception
*/
protected function loadLayoutSlide($sPart, $baseFile, SlideMaster $oSlideMaster)
{
Expand Down Expand Up @@ -632,6 +639,7 @@ protected function loadTheme($sPart, SlideMaster $oSlideMaster)
* @param XMLReader $xmlReader
* @param \DOMElement $oElement
* @param AbstractSlide $oSlide
* @throws \Exception
*/
protected function loadSlideBackground(XMLReader $xmlReader, \DOMElement $oElement, AbstractSlide $oSlide)
{
Expand Down Expand Up @@ -692,6 +700,7 @@ protected function loadSlideBackground(XMLReader $xmlReader, \DOMElement $oEleme
/**
* @param string $baseFile
* @param Slide $oSlide
* @throws \Exception
*/
protected function loadSlideNote($baseFile, Slide $oSlide)
{
Expand All @@ -711,6 +720,7 @@ protected function loadSlideNote($baseFile, Slide $oSlide)
* @param XMLReader $document
* @param \DOMElement $node
* @param AbstractSlide $oSlide
* @throws \Exception
*/
protected function loadShapeDrawing(XMLReader $document, \DOMElement $node, AbstractSlide $oSlide)
{
Expand Down Expand Up @@ -1150,6 +1160,7 @@ protected function loadParagraph(XMLReader $document, \DOMElement $oElement, $oS
* @param XMLReader $xmlReader
* @param \DOMElement $oElement
* @param Border $oBorder
* @throws \Exception
*/
protected function loadStyleBorder(XMLReader $xmlReader, \DOMElement $oElement, Border $oBorder)
{
Expand Down Expand Up @@ -1197,6 +1208,7 @@ protected function loadStyleColor(XMLReader $xmlReader, \DOMElement $oElement)
* @param XMLReader $xmlReader
* @param \DOMElement $oElement
* @return null|Fill
* @throws \Exception
*/
protected function loadStyleFill(XMLReader $xmlReader, \DOMElement $oElement)
{
Expand Down Expand Up @@ -1240,7 +1252,6 @@ protected function loadStyleFill(XMLReader $xmlReader, \DOMElement $oElement)

/**
* @param string $fileRels
* @return string
*/
protected function loadRels($fileRels)
{
Expand All @@ -1265,6 +1276,7 @@ protected function loadRels($fileRels)
* @param $oSlide
* @param \DOMNodeList $oElements
* @param XMLReader $xmlReader
* @throws \Exception
* @internal param $baseFile
*/
protected function loadSlideShapes($oSlide, $oElements, $xmlReader)
Expand Down

0 comments on commit d07784c

Please sign in to comment.