PhpOffice\PhpPresentation\Style\Font::setSize PHP Method

setSize() public method

Set Size
public setSize ( float | integer $pValue = 10 ) : Font
$pValue float | integer
return Font
    public function setSize($pValue = 10)
    {
        if ($pValue == '') {
            $pValue = 10;
        }
        $this->size = $pValue;
        return $this;
    }

Usage Example

Esempio n. 1
0
 /**
  * Test get/set size
  */
 public function testSetGetSize()
 {
     $object = new Font();
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setSize());
     $this->assertEquals(10, $object->getSize());
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setSize(''));
     $this->assertEquals(10, $object->getSize());
     $value = rand(1, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Font', $object->setSize($value));
     $this->assertEquals($value, $object->getSize());
 }
All Usage Examples Of PhpOffice\PhpPresentation\Style\Font::setSize