PhpOffice\PhpPresentation\Style\Alignment::getMarginRight PHP Method

getMarginRight() public method

Get margin right
public getMarginRight ( ) : integer
return integer
    public function getMarginRight()
    {
        return $this->marginRight;
    }

Usage Example

コード例 #1
0
 /**
  * Test get/set margin right
  */
 public function testSetGetMarginRight()
 {
     $object = new Alignment();
     // != Alignment::HORIZONTAL_GENERAL
     $object->setHorizontal(Alignment::HORIZONTAL_CENTER);
     $value = rand(1, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->setMarginRight($value));
     $this->assertEquals(0, $object->getMarginRight());
     $value = rand(-100, 0);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->setMarginRight($value));
     $this->assertEquals($value, $object->getMarginRight());
     $object->setHorizontal(Alignment::HORIZONTAL_GENERAL);
     $value = rand(1, 100);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->setMarginRight($value));
     $this->assertEquals($value, $object->getMarginRight());
     $value = rand(-100, 0);
     $this->assertInstanceOf('PhpOffice\\PhpPresentation\\Style\\Alignment', $object->setMarginRight($value));
     $this->assertEquals($value, $object->getMarginRight());
 }