Move OptionManager from Common/Manager to Manager (#428)

This commit is contained in:
Adrien Loison 2017-05-29 22:34:25 +02:00 committed by GitHub
parent bc17311f5f
commit 69b091b37c
13 changed files with 23 additions and 20 deletions

View File

@ -3,6 +3,7 @@
namespace Box\Spout\Writer\CSV\Manager;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Manager\OptionsManagerAbstract;
/**
* Class OptionsManager
@ -10,7 +11,7 @@ use Box\Spout\Writer\Common\Options;
*
* @package Box\Spout\Writer\CSV\Manager
*/
class OptionsManager extends \Box\Spout\Writer\Common\Manager\OptionsManager
class OptionsManager extends OptionsManagerAbstract
{
/**
* @inheritdoc

View File

@ -2,7 +2,7 @@
namespace Box\Spout\Writer\Factory;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\WorkbookManagerInterface;
/**

View File

@ -1,14 +1,14 @@
<?php
namespace Box\Spout\Writer\Common\Manager;
namespace Box\Spout\Writer\Manager;
/**
* Class OptionsManager
* Writer' options manager
*
* @package Box\Spout\Writer\Common\Manager
* @package Box\Spout\Writer\Manager
*/
abstract class OptionsManager implements OptionsManagerInterface
abstract class OptionsManagerAbstract implements OptionsManagerInterface
{
const PREFIX_OPTION = 'OPTION_';

View File

@ -1,12 +1,12 @@
<?php
namespace Box\Spout\Writer\Common\Manager;
namespace Box\Spout\Writer\Manager;
/**
* Interface OptionsManagerInterface
* Writer' options interface
*
* @package Box\Spout\Writer\Common\Manager
* @package Box\Spout\Writer\Manager
*/
interface OptionsManagerInterface
{

View File

@ -5,7 +5,7 @@ namespace Box\Spout\Writer\Manager;
use Box\Spout\Common\Exception\IOException;
use Box\Spout\Writer\Common\Helper\FileSystemWithRootFolderHelperInterface;
use Box\Spout\Writer\Common\Helper\StyleHelperInterface;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Common\Sheet;
use Box\Spout\Writer\Entity\Workbook;

View File

@ -3,7 +3,7 @@
namespace Box\Spout\Writer\ODS\Factory;
use Box\Spout\Common\Helper\StringHelper;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Factory\EntityFactory;
use Box\Spout\Writer\Factory\InternalFactoryInterface;

View File

@ -3,6 +3,7 @@
namespace Box\Spout\Writer\ODS\Manager;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Manager\OptionsManagerAbstract;
use Box\Spout\Writer\Style\StyleBuilder;
/**
@ -11,7 +12,7 @@ use Box\Spout\Writer\Style\StyleBuilder;
*
* @package Box\Spout\Writer\ODS\Manager
*/
class OptionsManager extends \Box\Spout\Writer\Common\Manager\OptionsManager
class OptionsManager extends OptionsManagerAbstract
{
/** @var StyleBuilder Style builder */
protected $styleBuilder;

View File

@ -6,7 +6,7 @@ use Box\Spout\Common\Exception\InvalidArgumentException;
use Box\Spout\Common\Exception\IOException;
use Box\Spout\Common\Exception\SpoutException;
use Box\Spout\Common\Helper\FileSystemHelper;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Exception\WriterAlreadyOpenedException;
use Box\Spout\Writer\Exception\WriterNotOpenedException;
@ -31,7 +31,7 @@ abstract class WriterAbstract implements WriterInterface
/** @var \Box\Spout\Common\Helper\GlobalFunctionsHelper Helper to work with global functions */
protected $globalFunctionsHelper;
/** @var \Box\Spout\Writer\Common\Manager\OptionsManagerInterface Writer options manager */
/** @var \Box\Spout\Writer\Manager\OptionsManagerInterface Writer options manager */
protected $optionsManager;
/** @var Style\Style Style to be applied to the next written row(s) */
@ -66,7 +66,7 @@ abstract class WriterAbstract implements WriterInterface
abstract protected function closeWriter();
/**
* @param \Box\Spout\Writer\Common\Manager\OptionsManagerInterface $optionsManager
* @param \Box\Spout\Writer\Manager\OptionsManagerInterface $optionsManager
*/
public function __construct(OptionsManagerInterface $optionsManager)
{

View File

@ -2,7 +2,7 @@
namespace Box\Spout\Writer;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Entity\Worksheet;
use Box\Spout\Writer\Exception\WriterNotOpenedException;

View File

@ -4,7 +4,7 @@ namespace Box\Spout\Writer\XLSX\Factory;
use Box\Spout\Common\Escaper;
use Box\Spout\Common\Helper\StringHelper;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Factory\EntityFactory;
use Box\Spout\Writer\Factory\InternalFactoryInterface;

View File

@ -3,6 +3,7 @@
namespace Box\Spout\Writer\XLSX\Manager;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Manager\OptionsManagerAbstract;
use Box\Spout\Writer\Style\StyleBuilder;
/**
@ -11,7 +12,7 @@ use Box\Spout\Writer\Style\StyleBuilder;
*
* @package Box\Spout\Writer\XLSX\Manager
*/
class OptionsManager extends \Box\Spout\Writer\Common\Manager\OptionsManager
class OptionsManager extends OptionsManagerAbstract
{
/** Default style font values */
const DEFAULT_FONT_SIZE = 12;

View File

@ -7,7 +7,7 @@ use Box\Spout\Common\Exception\IOException;
use Box\Spout\Common\Helper\StringHelper;
use Box\Spout\Writer\Common\Cell;
use Box\Spout\Writer\Common\Helper\CellHelper;
use Box\Spout\Writer\Common\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Manager\OptionsManagerInterface;
use Box\Spout\Writer\Common\Options;
use Box\Spout\Writer\Entity\Worksheet;
use Box\Spout\Writer\Manager\WorksheetManagerInterface;

View File

@ -1,11 +1,11 @@
<?php
namespace Box\Spout\Writer\Common\Manager;
namespace Box\Spout\Writer\Manager;
/**
* Class OptionsManagerTest
*
* @package Box\Spout\Writer\Common\Manager
* @package Box\Spout\Writer\Manager
*/
class OptionsManagerTest extends \PHPUnit_Framework_TestCase
{
@ -51,7 +51,7 @@ class OptionsManagerTest extends \PHPUnit_Framework_TestCase
// TODO: Convert this to anonymous class when PHP < 7 support is dropped
class FakeOptionsManager extends OptionsManager
class FakeOptionsManager extends OptionsManagerAbstract
{
protected function getSupportedOptions()
{