Skip to content

Commit

Permalink
Rename Exec namespace into Executor (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry authored Dec 16, 2022
1 parent bc4d88b commit fcd320c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions infection.json5
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"CastString": {
"ignore": [
// I can't find a case in practice where this would happen
"Fidry\\CpuCoreCounter\\Exec\\ProcOpen::execute"
"Fidry\\CpuCoreCounter\\Executor\\ProcOpen::execute"
]
},
"FalseValue": {
"ignore": [
// This is from thecodingmachine/safe – leave it alone
"Fidry\\CpuCoreCounter\\Exec\\ShellExec::execute"
"Fidry\\CpuCoreCounter\\Executor\\ShellExec::execute"
]
},
"FunctionCallRemoval": {
"ignore": [
// I can't find a case in practice where this would happen
"Fidry\\CpuCoreCounter\\Exec\\ProcOpen::execute",
"Fidry\\CpuCoreCounter\\Executor\\ProcOpen::execute",
// This is from thecodingmachine/safe – leave it alone
"Fidry\\CpuCoreCounter\\Exec\\ShellExec::execute"
"Fidry\\CpuCoreCounter\\Executor\\ShellExec::execute"
]
},
"PublicVisibility": false
Expand Down
2 changes: 1 addition & 1 deletion src/Exec/ProcOpen.php → src/Executor/ProcOpen.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace Fidry\CpuCoreCounter\Exec;
namespace Fidry\CpuCoreCounter\Executor;

use function fclose;
use function is_resource;
Expand Down
2 changes: 1 addition & 1 deletion src/Finder/ProcOpenBasedFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace Fidry\CpuCoreCounter\Finder;

use Fidry\CpuCoreCounter\Exec\ProcOpen;
use Fidry\CpuCoreCounter\Executor\ProcOpen;
use function filter_var;
use function function_exists;
use function is_int;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

declare(strict_types=1);

namespace Fidry\CpuCoreCounter\Test\Exec;
namespace Fidry\CpuCoreCounter\Test\Executor;

use Fidry\CpuCoreCounter\Exec\ProcOpen;
use Fidry\CpuCoreCounter\Executor\ProcOpen;
use PHPUnit\Framework\TestCase;
use const PHP_EOL;

/**
* @covers \Fidry\CpuCoreCounter\Exec\ProcOpen
* @covers \Fidry\CpuCoreCounter\Executor\ProcOpen
*
* @internal
*/
Expand Down Expand Up @@ -49,7 +49,7 @@ public function test_it_can_execute_a_command_writing_output_to_the_stdout_inste
$command = 'echoerr() { echo "$@" 1>&2; }; echoerr "Hello world!" 2>&1';

$expected = ['Hello world!'.PHP_EOL, ''];
$actual = ProcOpen::execute($command);
$actual = \Fidry\CpuCoreCounter\Executor\ProcOpen::execute($command);

self::assertSame($expected, $actual);
}
Expand Down

0 comments on commit fcd320c

Please sign in to comment.