Browse Source

Code formatting

tags/v9.1.0
Cédric Belin 3 weeks ago
parent
commit
8af3278a7a
7 changed files with 14 additions and 14 deletions
  1. +2
    -2
      bin/which
  2. +1
    -1
      doc/installation.md
  3. +2
    -2
      doc/usage/api.md
  4. +2
    -2
      example/main.php
  5. +5
    -5
      src/Cli/Command.php
  6. +1
    -1
      src/Finder.php
  7. +1
    -1
      test/FinderTest.php

+ 2
- 2
bin/which View File

@@ -1,8 +1,8 @@
#!/usr/bin/env php
<?php declare(strict_types=1);

use Symfony\Component\Console\{Application};
use Which\Cli\{Command};
use Symfony\Component\Console\Application;
use Which\Cli\Command;

// Load the dependencies.
$autoloader = new SplFileInfo(__DIR__."/../../../autoload.php");


+ 1
- 1
doc/installation.md View File

@@ -32,6 +32,6 @@ Now in your [PHP](https://www.php.net) code, you can use:

``` php
<?php
use function Which\{which};
use function Which\which;
use Which\{Finder, FinderException};
```

+ 2
- 2
doc/usage/api.md View File

@@ -8,8 +8,8 @@ This package provides a single function, `Which\which()`, allowing to locate a c

``` php
<?php
use function Which\{which};
use Which\{FinderException};
use function Which\which;
use Which\FinderException;

try {
// `$path` is the absolute path to the executable.


+ 2
- 2
example/main.php View File

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

use Which\{FinderException};
use function Which\{which};
use Which\FinderException;
use function Which\which;

/** Finds the instances of an executable. */
function main(): void {


+ 5
- 5
src/Cli/Command.php View File

@@ -1,15 +1,15 @@
<?php declare(strict_types=1);
namespace Which\Cli;

use Symfony\Component\Console\Exception\{RuntimeException};
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Input\{InputArgument, InputInterface, InputOption};
use Symfony\Component\Console\Output\{OutputInterface};
use Which\{FinderException};
use function Which\{which};
use Symfony\Component\Console\Output\OutputInterface;
use Which\FinderException;
use function Which\which;

/** The console command. */
class Command extends \Symfony\Component\Console\Command\Command {
/** @var string The command name. */
protected static $defaultName = "which";



+ 1
- 1
src/Finder.php View File

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

use Webmozart\PathUtil\{Path};
use Webmozart\PathUtil\Path;

/** Finds the instances of an executable in the system path. */
class Finder {


+ 1
- 1
test/FinderTest.php View File

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

use PHPUnit\Framework\{TestCase};
use PHPUnit\Framework\TestCase;
use function PHPUnit\Framework\{assertThat, countOf, equalTo, isFalse, logicalNot, stringEndsWith};

/** @testdox Which\Finder */