Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBernskiold committed Dec 29, 2023
2 parents d2195a1 + 1006816 commit a644356
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 38 deletions.
5 changes: 3 additions & 2 deletions src/Branding/Branding.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace BernskioldMedia\LaravelPpt\Branding;

use function array_merge;
use BernskioldMedia\LaravelPpt\Concerns\Makeable;
use function collect;
use Illuminate\Support\Str;
use PhpOffice\PhpPresentation\Style\Color;
use ReflectionClass;

use function array_merge;
use function collect;

class Branding
{
use Makeable;
Expand Down
1 change: 1 addition & 0 deletions src/Branding/ParagraphStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use BernskioldMedia\LaravelPpt\Concerns\Makeable;
use BernskioldMedia\LaravelPpt\Concerns\Slides\WithFontSettings;
use Illuminate\Contracts\Support\Arrayable;

use function method_exists;

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Branding/SlideTheme.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class SlideTheme
WithBackgroundColor,
WithBackgroundImage,
WithChartBackground,
WithTextColor,
WithLogo;
WithLogo,
WithTextColor;

/**
* The class name of the custom master slide to use.
Expand Down
3 changes: 2 additions & 1 deletion src/Commands/CreateNewSlideCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

namespace BernskioldMedia\LaravelPpt\Commands;

use Illuminate\Console\Command;

use function config;
use function file_put_contents;
use Illuminate\Console\Command;
use function is_dir;
use function mkdir;

Expand Down
3 changes: 2 additions & 1 deletion src/Commands/CreateNewSlideDeckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace BernskioldMedia\LaravelPpt\Commands;

use Illuminate\Console\Command;

use function array_keys;
use function array_map;
use function array_values;
use function config;
use function file_get_contents;
use function file_put_contents;
use Illuminate\Console\Command;
use function is_dir;
use function mkdir;
use function str;
Expand Down
4 changes: 2 additions & 2 deletions src/Components/ChartShape.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*/
class ChartShape extends Component
{
use WithShape,
WithBackgroundColor;
use WithBackgroundColor,
WithShape;

public function __construct(
protected ChartComponent $chartComponent,
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Charts/Bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@

class Bar extends ChartComponent
{
use WithYAxis,
use WithLegend,
WithXAxis,
WithLegend;
WithYAxis;

protected bool $stacked = false;

Expand Down
4 changes: 2 additions & 2 deletions src/Components/Charts/Line.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

class Line extends ChartComponent
{
use WithYAxis,
use WithLegend,
WithXAxis,
WithLegend;
WithYAxis;

public bool $smooth = false;

Expand Down
6 changes: 3 additions & 3 deletions src/Components/Charts/Radar.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

class Radar extends ChartComponent
{
use WithXAxis,
WithYAxis,
WithLegend;
use WithLegend,
WithXAxis,
WithYAxis;

protected function initializeChart(): void
{
Expand Down
4 changes: 2 additions & 2 deletions src/Components/Charts/Scatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@

class Scatter extends ChartComponent
{
use WithYAxis,
use WithLegend,
WithXAxis,
WithLegend;
WithYAxis;

protected function initializeChart(): void
{
Expand Down
8 changes: 4 additions & 4 deletions src/Components/MultiTextBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
*/
class MultiTextBox extends Component
{
use WithUrl,
use WithAlignment,
WithBackgroundColor,
WithFontSettings,
WithAlignment,
WithRotation,
WithBackgroundColor,
WithShape;
WithShape,
WithUrl;

public function __construct(
protected ?array $texts = []
Expand Down
6 changes: 3 additions & 3 deletions src/Components/Shape.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
*/
class Shape extends Component
{
use WithUrl,
use WithBackgroundColor,
WithBorder,
WithRotation,
WithBackgroundColor,
WithShape,
WithBorder;
WithUrl;

protected string $type = AutoShape::TYPE_RECTANGLE;

Expand Down
4 changes: 2 additions & 2 deletions src/Components/Table/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
class Table extends Component
{
use WithShape,
WithFontSettings;
use WithFontSettings,
WithShape;

public function __construct(
protected int $columns = 1,
Expand Down
8 changes: 4 additions & 4 deletions src/Components/TextBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
*/
class TextBox extends Component
{
use WithUrl,
use WithAlignment,
WithBackgroundColor,
WithFontSettings,
WithAlignment,
WithParagraphStyle,
WithRotation,
WithBackgroundColor,
WithShape,
WithParagraphStyle;
WithUrl;

public ?Run $textRun = null;

Expand Down
13 changes: 7 additions & 6 deletions src/Presentation/BaseSlide.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,26 @@
use BernskioldMedia\LaravelPpt\Concerns\Slides\WithTextColor;
use BernskioldMedia\LaravelPpt\Contracts\Slide as SlideContract;
use Closure;
use function config;
use Illuminate\Support\Traits\Conditionable;
use PhpOffice\PhpPresentation\Slide;
use PhpOffice\PhpPresentation\Slide\Background\Color;

use function config;
use function tap;

abstract class BaseSlide implements SlideContract
{
use Makeable,
WithPadding,
use Conditionable,
Makeable,
WithBackgroundColor,
WithBackgroundImage,
WithChartBackground,
WithDataSource,
WithTextColor,
WithEdgeImages,
WithLogo,
WithPadding,
WithSize,
Conditionable;
WithTextColor;

public const EDGE_IMAGE_POSITION_TOP_LEFT = 'topLeft';

Expand Down Expand Up @@ -147,7 +148,7 @@ protected function applyBackgroundImage(): void

protected function applyLogo(): void
{
if (true === $this->withoutLogo) {
if ($this->withoutLogo === true) {
return;
}

Expand Down
5 changes: 3 additions & 2 deletions src/Presentation/Presentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
use BernskioldMedia\LaravelPpt\Concerns\Slides\WithPadding;
use BernskioldMedia\LaravelPpt\Concerns\Slides\WithSize;
use BernskioldMedia\LaravelPpt\Contracts\CustomizesPowerpointBranding;
use function config;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Support\Facades\Storage;
use function method_exists;
use PhpOffice\PhpPresentation\DocumentLayout;
use PhpOffice\PhpPresentation\Exception\OutOfBoundsException;
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\PhpPresentation;

use function config;
use function method_exists;

/**
* @method static static make(string $title, ?int $width = null, ?int $height = null, ?string $branding = null)
*/
Expand Down
1 change: 1 addition & 0 deletions src/SlideMasters/BlankWithTitleSubtitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use BernskioldMedia\LaravelPpt\Concerns\Slides\WithCustomContents;
use BernskioldMedia\LaravelPpt\Concerns\Slides\WithSlideTitle;
use BernskioldMedia\LaravelPpt\Presentation\BaseSlide;

use function config;

/**
Expand Down

0 comments on commit a644356

Please sign in to comment.