Skip to content

Commit

Permalink
Clean up FQCN
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Sep 12, 2023
1 parent 80b4ae2 commit 8ff38e5
Show file tree
Hide file tree
Showing 84 changed files with 191 additions and 176 deletions.
10 changes: 5 additions & 5 deletions src/PhpSpreadsheet/Calculation/Calculation.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class Calculation
/**
* Instance of the spreadsheet this Calculation Engine is using.
*/
private ?\PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet;
private ?Spreadsheet $spreadsheet;

/**
* Calculation cache.
Expand All @@ -91,7 +91,7 @@ class Calculation
*/
private $calculationCacheEnabled = true;

private \PhpOffice\PhpSpreadsheet\Calculation\Engine\BranchPruner $branchPruner;
private BranchPruner $branchPruner;

/**
* @var bool
Expand Down Expand Up @@ -123,7 +123,7 @@ class Calculation
/**
* The debug log generated by the calculation engine.
*/
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\Logger $debugLog;
private Logger $debugLog;

/**
* Flag to determine how formula errors should be handled
Expand All @@ -149,12 +149,12 @@ class Calculation
/**
* Reference Helper.
*/
private static \PhpOffice\PhpSpreadsheet\ReferenceHelper $referenceHelper;
private static ReferenceHelper $referenceHelper;

/**
* An array of the nested cell references accessed by the calculation engine, used for the debug log.
*/
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack $cyclicReferenceStack;
private CyclicReferenceStack $cyclicReferenceStack;

/** @var array */
private $cellStack = [];
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Calculation/Engine/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Logger
/**
* The calculation engine cell reference stack.
*/
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\CyclicReferenceStack $cellStack;
private CyclicReferenceStack $cellStack;

/**
* Instantiate a Calculation engine logger.
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Calculation/Token/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class Stack
{
private \PhpOffice\PhpSpreadsheet\Calculation\Engine\BranchPruner $branchPruner;
private BranchPruner $branchPruner;

/**
* The parser stack for formulae.
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Cell/CellAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

class CellAddress
{
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
protected ?Worksheet $worksheet;

protected string $cellAddress;

Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Cell/ColumnRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class ColumnRange implements AddressRange
{
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
protected ?Worksheet $worksheet;

protected int $from;

Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Cell/RowRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class RowRange implements AddressRange
{
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
protected ?Worksheet $worksheet;

protected int $from;

Expand Down
8 changes: 4 additions & 4 deletions src/PhpSpreadsheet/Chart/Axis.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ public function __construct()
/**
* Chart Major Gridlines as.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\GridLines $majorGridlines = null;
private ?GridLines $majorGridlines = null;

/**
* Chart Minor Gridlines as.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\GridLines $minorGridlines = null;
private ?GridLines $minorGridlines = null;

/**
* Axis Number.
Expand All @@ -47,7 +47,7 @@ public function __construct()

private string $axisType = '';

private ?\PhpOffice\PhpSpreadsheet\Chart\AxisText $axisText = null;
private ?AxisText $axisText = null;

/**
* Axis Options.
Expand Down Expand Up @@ -75,7 +75,7 @@ public function __construct()
/**
* Fill Properties.
*/
private \PhpOffice\PhpSpreadsheet\Chart\ChartColor $fillColor;
private ChartColor $fillColor;

private const NUMERIC_FORMAT = [
Properties::FORMAT_CODE_NUMBER,
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Chart/AxisText.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AxisText extends Properties
{
private ?int $rotation = null;

private \PhpOffice\PhpSpreadsheet\Style\Font $font;
private Font $font;

public function __construct()
{
Expand Down
20 changes: 10 additions & 10 deletions src/PhpSpreadsheet/Chart/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@ class Chart
/**
* Worksheet.
*/
private ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet = null;
private ?Worksheet $worksheet = null;

/**
* Chart Title.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Title $title;
private ?Title $title;

/**
* Chart Legend.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Legend $legend;
private ?Legend $legend;

/**
* X-Axis Label.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Title $xAxisLabel;
private ?Title $xAxisLabel;

/**
* Y-Axis Label.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Title $yAxisLabel;
private ?Title $yAxisLabel;

/**
* Chart Plot Area.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\PlotArea $plotArea;
private ?PlotArea $plotArea;

/**
* Plot Visible Only.
Expand All @@ -61,12 +61,12 @@ class Chart
/**
* Chart Asix Y as.
*/
private \PhpOffice\PhpSpreadsheet\Chart\Axis $yAxis;
private Axis $yAxis;

/**
* Chart Asix X as.
*/
private \PhpOffice\PhpSpreadsheet\Chart\Axis $xAxis;
private Axis $xAxis;

/**
* Top-Left Cell Position.
Expand Down Expand Up @@ -128,9 +128,9 @@ class Chart
/** @var bool */
private $roundedCorners = false;

private \PhpOffice\PhpSpreadsheet\Chart\GridLines $borderLines;
private GridLines $borderLines;

private \PhpOffice\PhpSpreadsheet\Chart\ChartColor $fillColor;
private ChartColor $fillColor;

/**
* Create a new Chart.
Expand Down
6 changes: 3 additions & 3 deletions src/PhpSpreadsheet/Chart/DataSeriesValues.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ class DataSeriesValues extends Properties
*/
private $pointMarker;

private \PhpOffice\PhpSpreadsheet\Chart\ChartColor $markerFillColor;
private ChartColor $markerFillColor;

private \PhpOffice\PhpSpreadsheet\Chart\ChartColor $markerBorderColor;
private ChartColor $markerBorderColor;

/**
* Series Point Size.
Expand Down Expand Up @@ -83,7 +83,7 @@ class DataSeriesValues extends Properties
/** @var bool */
private $bubble3D = false;

private ?\PhpOffice\PhpSpreadsheet\Chart\Layout $labelLayout = null;
private ?Layout $labelLayout = null;

/** @var TrendLine[] */
private $trendLines = [];
Expand Down
8 changes: 4 additions & 4 deletions src/PhpSpreadsheet/Chart/Legend.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ class Legend
/**
* Legend Layout.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Layout $layout;
private ?Layout $layout;

private \PhpOffice\PhpSpreadsheet\Chart\GridLines $borderLines;
private GridLines $borderLines;

private \PhpOffice\PhpSpreadsheet\Chart\ChartColor $fillColor;
private ChartColor $fillColor;

private ?\PhpOffice\PhpSpreadsheet\Chart\AxisText $legendText = null;
private ?AxisText $legendText = null;

/**
* Create a new Legend.
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Chart/PlotArea.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class PlotArea
/**
* PlotArea Layout.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Layout $layout;
private ?Layout $layout;

/**
* Plot Series.
Expand Down
6 changes: 3 additions & 3 deletions src/PhpSpreadsheet/Chart/Properties.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ abstract class Properties
/** @var ?float */
protected $glowSize;

protected \PhpOffice\PhpSpreadsheet\Chart\ChartColor $glowColor;
protected ChartColor $glowColor;

/** @var array */
protected $softEdges = [
Expand All @@ -135,7 +135,7 @@ abstract class Properties
/** @var array */
protected $shadowProperties = self::PRESETS_OPTIONS[0];

protected \PhpOffice\PhpSpreadsheet\Chart\ChartColor $shadowColor;
protected ChartColor $shadowColor;

public function __construct()
{
Expand Down Expand Up @@ -730,7 +730,7 @@ public function getShadowArray(): array
return $array;
}

protected \PhpOffice\PhpSpreadsheet\Chart\ChartColor $lineColor;
protected ChartColor $lineColor;

/** @var array */
protected $lineStyleProperties = [
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ abstract class JpGraphRendererBase implements IRenderer

private static array $markSet;

private \PhpOffice\PhpSpreadsheet\Chart\Chart $chart;
private Chart $chart;

private $graph;

Expand Down
4 changes: 3 additions & 1 deletion src/PhpSpreadsheet/Chart/Renderer/MtJpGraphRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace PhpOffice\PhpSpreadsheet\Chart\Renderer;

use mitoteam\jpgraph\MtJpGraph;

/**
* Jpgraph is not officially maintained by Composer at packagist.org.
*
Expand All @@ -19,7 +21,7 @@ protected static function init(): void
return;
}

\mitoteam\jpgraph\MtJpGraph::load([
MtJpGraph::load([
'bar',
'contour',
'line',
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Chart/Title.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Title
/**
* Title Layout.
*/
private ?\PhpOffice\PhpSpreadsheet\Chart\Layout $layout;
private ?Layout $layout;

/**
* Create a new Title.
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Collection/Cells.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Cells
{
protected const MAX_COLUMN_ID = 16384;

private \Psr\SimpleCache\CacheInterface $cache;
private CacheInterface $cache;

/**
* Parent worksheet.
Expand Down
6 changes: 3 additions & 3 deletions src/PhpSpreadsheet/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Comment implements IComparable
/**
* Rich text comment.
*/
private \PhpOffice\PhpSpreadsheet\RichText\RichText $text;
private RichText $text;

/**
* Comment width (CSS style, i.e. XXpx or YYpt).
Expand Down Expand Up @@ -52,7 +52,7 @@ class Comment implements IComparable
/**
* Comment fill color.
*/
private \PhpOffice\PhpSpreadsheet\Style\Color $fillColor;
private Color $fillColor;

/**
* Alignment.
Expand All @@ -62,7 +62,7 @@ class Comment implements IComparable
/**
* Background image in comment.
*/
private \PhpOffice\PhpSpreadsheet\Worksheet\Drawing $backgroundImage;
private Drawing $backgroundImage;

/**
* Create a new Comment.
Expand Down
4 changes: 2 additions & 2 deletions src/PhpSpreadsheet/DefinedName.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class DefinedName
/**
* Worksheet on which the defined name can be resolved.
*/
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $worksheet;
protected ?Worksheet $worksheet;

/**
* Value of the named object.
Expand All @@ -31,7 +31,7 @@ abstract class DefinedName
/**
* Scope.
*/
protected ?\PhpOffice\PhpSpreadsheet\Worksheet\Worksheet $scope;
protected ?Worksheet $scope;

/**
* Whether this is a named range or a named formula.
Expand Down
3 changes: 2 additions & 1 deletion src/PhpSpreadsheet/Helper/Sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace PhpOffice\PhpSpreadsheet\Helper;

use PhpOffice\PhpSpreadsheet\Chart\Chart;
use PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Settings;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
Expand Down Expand Up @@ -195,7 +196,7 @@ public function renderChart(Chart $chart, string $fileName): void
return;
}

Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class);
Settings::setChartRenderer(MtJpGraphRenderer::class);

$fileName = $this->getFilename($fileName, 'png');

Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Reader/BaseReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract class BaseReader implements IReader
/** @var resource */
protected $fileHandle;

protected ?\PhpOffice\PhpSpreadsheet\Reader\Security\XmlScanner $securityScanner = null;
protected ?XmlScanner $securityScanner = null;

public function __construct()
{
Expand Down
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Reader/Gnumeric.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Gnumeric extends BaseReader
*/
private $spreadsheet;

private \PhpOffice\PhpSpreadsheet\ReferenceHelper $referenceHelper;
private ReferenceHelper $referenceHelper;

/** @var array */
public static $mappings = [
Expand Down
Loading

0 comments on commit 8ff38e5

Please sign in to comment.