Browse Source

Code formatting

tags/v3.1.0
Cédric Belin 1 month ago
parent
commit
0e99853e1c
10 changed files with 20 additions and 20 deletions
  1. +1
    -1
      RoboFile.php
  2. +2
    -2
      doc/usage.md
  3. +1
    -1
      example/RoboFile.php
  4. +2
    -2
      src/FastTransformer.php
  5. +7
    -7
      src/Minifier.php
  6. +1
    -1
      src/Tasks.php
  7. +1
    -1
      src/TransformMode.php
  8. +1
    -1
      src/index.php
  9. +3
    -3
      test/MinifierTest.php
  10. +1
    -1
      tool/robo.php

+ 1
- 1
RoboFile.php View File

@@ -1,7 +1,7 @@
<?php declare(strict_types=1);

use Robo\{Result, Tasks};
use Robo\PhpMinify\{TransformMode};
use Robo\PhpMinify\TransformMode;

// Load the dependencies.
require_once __DIR__."/vendor/autoload.php";


+ 2
- 2
doc/usage.md View File

@@ -38,7 +38,7 @@ If the resulting file tree does not meet your expectations, or if you want to cu

``` php
<?php
use Robo\{Tasks};
use Robo\Tasks;

class RoboFile extends Tasks {
use \Robo\PhpMinify\Tasks;
@@ -88,7 +88,7 @@ The `PhpMinify` task can work in two manners, which can be selected using the `m
``` php
<?php
use Robo\{Result, Tasks};
use Robo\PhpMinify\{TransformMode};
use Robo\PhpMinify\TransformMode;

class RoboFile extends Tasks {
use \Robo\PhpMinify\Tasks;


+ 1
- 1
example/RoboFile.php View File

@@ -1,7 +1,7 @@
<?php declare(strict_types=1);

use Robo\{Result, Tasks};
use Robo\PhpMinify\{TransformMode};
use Robo\PhpMinify\TransformMode;

// Load the dependencies.
require_once __DIR__."/vendor/autoload.php";


+ 2
- 2
src/FastTransformer.php View File

@@ -1,8 +1,8 @@
<?php declare(strict_types=1);
namespace Robo\PhpMinify;

use Symfony\Component\HttpClient\{Psr18Client};
use Symfony\Component\Process\{Process};
use Symfony\Component\HttpClient\Psr18Client;
use Symfony\Component\Process\Process;

/** Removes comments and whitespace from a PHP script, by calling a Web service. */
class FastTransformer implements Transformer {


+ 7
- 7
src/Minifier.php View File

@@ -1,13 +1,13 @@
<?php declare(strict_types=1);
namespace Robo\PhpMinify;

use Robo\{Result};
use Robo\Contract\{TaskInterface};
use Robo\Task\{BaseTask};
use Symfony\Component\Finder\{Finder};
use Symfony\Component\Finder\Exception\{DirectoryNotFoundException};
use Webmozart\PathUtil\{Path};
use function Which\{which};
use Robo\Result;
use Robo\Contract\TaskInterface;
use Robo\Task\BaseTask;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\Exception\DirectoryNotFoundException;
use Webmozart\PathUtil\Path;
use function Which\which;

/** Removes PHP comments and whitespace by applying the `php_strip_whitespace()` function. */
class Minifier extends BaseTask implements TaskInterface {


+ 1
- 1
src/Tasks.php View File

@@ -1,7 +1,7 @@
<?php declare(strict_types=1);
namespace Robo\PhpMinify;

use Robo\Collection\{CollectionBuilder};
use Robo\Collection\CollectionBuilder;

/** Provides a set of [Robo](https://robo.li) tasks. */
trait Tasks {


+ 1
- 1
src/TransformMode.php View File

@@ -1,7 +1,7 @@
<?php declare(strict_types=1);
namespace Robo\PhpMinify;

use Enum\{EnumTrait};
use Enum\EnumTrait;

/** Defines the type of transformation applied by a minifier. */
final class TransformMode {


+ 1
- 1
src/index.php View File

@@ -1,5 +1,5 @@
<?php declare(strict_types=1);
use Robo\PhpMinify\{Server};
use Robo\PhpMinify\Server;

// Start the application.
require_once __DIR__."/Server.php";


+ 3
- 3
test/MinifierTest.php View File

@@ -2,10 +2,10 @@
namespace Robo\PhpMinify;

use League\Container\{ContainerAwareInterface, ContainerAwareTrait};
use PHPUnit\Framework\{TestCase};
use PHPUnit\Framework\TestCase;
use Robo\{Robo, TaskAccessor};
use Robo\Collection\{CollectionBuilder};
use Symfony\Component\Console\Output\{NullOutput};
use Robo\Collection\CollectionBuilder;
use Symfony\Component\Console\Output\NullOutput;
use function PHPUnit\Framework\{assertThat, fileExists, logicalAnd, stringContains};

/** @testdox Robo\PhpMinify\Minifier */


+ 1
- 1
tool/robo.php View File

@@ -1,7 +1,7 @@
<?php declare(strict_types=1);

use Robo\{Result, Tasks};
use Robo\PhpMinify\{TransformMode};
use Robo\PhpMinify\TransformMode;

// Load the dependencies.
require_once __DIR__."/../vendor/autoload.php";


Loading…
Cancel
Save