Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Exec namespace into Executor #91

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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