Skip to content

Commit

Permalink
unused vars, undefined vars,phpdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Klap-in committed Jun 10, 2015
1 parent 5b1fb1d commit d684e40
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions renderer.php
Expand Up @@ -1191,7 +1191,7 @@ function doublequoteclosing() {
*
* @param string $text The PHP code
*/
function php($text, $wrapper='dummy') {
function php($text) {
$this->monospace_open();
$this->doc .= $this->_xmlEntities($text);
$this->monospace_close();
Expand All @@ -1211,7 +1211,7 @@ function phpblock($text) {
*
* @param string $text The HTML
*/
function html($text, $wrapper='dummy') {
function html($text) {
$this->monospace_open();
$this->doc .= $this->_xmlEntities($text);
$this->monospace_close();
Expand Down Expand Up @@ -1703,6 +1703,7 @@ function rss ($url,$params){
$feed->feed_url($url);

//disable warning while fetching
$elvl = null;
if (!defined('DOKU_E_LEVEL')) { $elvl = error_reporting(E_ERROR); }
$rc = $feed->init();
if (!defined('DOKU_E_LEVEL')) { error_reporting($elvl); }
Expand Down Expand Up @@ -1823,10 +1824,12 @@ function _addStringAsSVGImage($string, $width = NULL, $height = NULL, $align = N
* in the odt frame and image tag which can not be changed using the function _odtAddImage.
*
* @author LarsDW223
*
* @param string $src
* @return string
*/
function _odtAddImageAsFileOnly($src){
$name = '';
if (file_exists($src)) {
list($ext,$mime) = mimetype($src);
$name = 'Pictures/'.md5($src).'.'.$ext;
Expand Down Expand Up @@ -2196,6 +2199,9 @@ function _odtDivOpenAsFrameUseCSS (helper_plugin_odt_cssimport $import, $classes

$min_height = $properties ['min-height'];

$pic_link = '';
$pic_width = '';
$pic_height = '';
if ( !empty ($picture) ) {
// If a picture/background-image is set in the CSS, than we insert it manually here.
// This is a workaround because ODT does not support the background-image attribute in a span.
Expand Down Expand Up @@ -2743,6 +2749,10 @@ protected function _odtTableCellOpenUsePropertiesInternal ($properties, $inHeade
* Simple helper function for creating a style $name setting the specfied font size $size.
*
* @author LarsDW223
*
* @param string $name
* @param string $size
* @return string
*/
protected function _odtBuildSizeStyle ($name, $size) {
$style = '<style:style style:name="'.$name.'" style:display-name="'.$name.'" style:family="text"><style:text-properties fo:font-size="'.$size.'" style:font-size-asian="'.$size.'" style:font-size-complex="'.$size.'"/></style:style>';
Expand All @@ -2765,7 +2775,7 @@ protected function _odtBuildSizeStyle ($name, $size) {
*
* @param array $properties
* @param array $disabled_props
* @return null
* @return null|string
*/
protected function _createTextStyle($properties, $disabled_props = NULL){
$save = $disabled_props ['font-size'];
Expand All @@ -2774,7 +2784,7 @@ protected function _createTextStyle($properties, $disabled_props = NULL){
if ( empty ($disabled_props ['font-size']) ) {
$odt_fo_size = $properties ['font-size'];
}
unset ($parent);
$parent = '';
$length = strlen ($odt_fo_size);
if ( $length > 0 && $odt_fo_size [$length-1] == '%' ) {
// A font-size in percent is only supported in common style definitions, not in automatic
Expand Down Expand Up @@ -2815,7 +2825,7 @@ protected function _createParagraphStyle($properties, $disabled_props = NULL){
if ( empty ($disabled_props ['font-size']) ) {
$odt_fo_size = $properties ['font-size'];
}
unset ($parent);
$parent = '';
$length = strlen ($odt_fo_size);
if ( $length > 0 && $odt_fo_size [$length-1] == '%' ) {
// A font-size in percent is only supported in common style definitions, not in automatic
Expand Down Expand Up @@ -2956,6 +2966,8 @@ function _odtCloseMultiColumnFrame () {
* The div should be closed by calling '_odtDivCloseAsFrame'.
*
* @author LarsDW223
*
* @param array $properties
*/
function _odtOpenTextBoxUseProperties ($properties) {
$this->in_div_as_frame++;
Expand Down Expand Up @@ -2989,6 +3001,9 @@ function _odtOpenTextBoxUseProperties ($properties) {
$width = $properties ['width'];
$horiz_pos = $properties ['float'];

$pic_link = '';
$pic_width = '';
$pic_height = '';
if ( !empty ($picture) ) {
// If a picture/background-image is set in the CSS, than we insert it manually here.
// This is a workaround because ODT does not support the background-image attribute in a span.
Expand Down Expand Up @@ -3183,7 +3198,7 @@ public function getCSSProperties (&$dest, $element, $classString, $inlineStyle)
}

/**
* @param $dest
* @param array $dest
* @param $element
* @param $classString
* @param $inlineStyle
Expand Down

0 comments on commit d684e40

Please sign in to comment.