Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
ofbeaton committed Aug 20, 2015
1 parent c4e8868 commit a07fcae
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 56 deletions.
30 changes: 15 additions & 15 deletions src/Running.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ class Running
* @since 2015-07-30
*/
protected $supportedOs = [
self::OS_LINUX,
self::OS_WINDOWS,
];
self::OS_LINUX,
self::OS_WINDOWS,
];

/**
* @var null
Expand Down Expand Up @@ -271,12 +271,12 @@ protected function getPidsWindows(array $filters, $ignoreCase = true)
*/

$details = [
'os' => $this->os,
'user' => $splitLine[6],
'command' => $splitLine[0].' '.$splitLine[8],
'pid' => intval($splitLine[1]),
'group' => intval($splitLine[1]), // fake it
];
'os' => $this->os,
'user' => $splitLine[6],
'command' => $splitLine[0].' '.$splitLine[8],
'pid' => intval($splitLine[1]),
'group' => intval($splitLine[1]), // fake it
];

$ok = true;
foreach ($filters as $filter) {
Expand Down Expand Up @@ -335,12 +335,12 @@ protected function getPidsLinux(array $filters, $ignoreCase = true)
*/

$details = [
'os' => $this->os,
'pid' => intval(trim($splitLine[0])),
'group' => intval(trim($splitLine[1])),
'user' => trim($splitLine[2]),
'command' => $splitLine[3],
];
'os' => $this->os,
'pid' => intval(trim($splitLine[0])),
'group' => intval(trim($splitLine[1])),
'user' => trim($splitLine[2]),
'command' => $splitLine[3],
];

$ok = true;
foreach ($filters as $filter) {
Expand Down
82 changes: 41 additions & 41 deletions src/RunningFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,65 +27,65 @@ class RunningFilter
* @since 2015-07-30
*/
protected $validFields = [
'os',
'pid',
'group',
'user',
'command',
];
'os',
'pid',
'group',
'user',
'command',
];

/**
* @var array
* @since 2015-07-30
*/
protected $validMods = [
'os' => [
'=',
'!',
],
'pid' => [
'=',
'!',
],
'group' => [
'=',
'!',
],
'user' => [
'=',
'!',
],
'command' => [
'=',
'!',
'~=',
'~!',
],
];
'os' => [
'=',
'!',
],
'pid' => [
'=',
'!',
],
'group' => [
'=',
'!',
],
'user' => [
'=',
'!',
],
'command' => [
'=',
'!',
'~=',
'~!',
],
];

/**
* @var array
* @since 2015-07-30
*/
protected $defaultMods = [
'os' => '=',
'pid' => '=',
'group' => '=',
'user' => '=',
'command' => '~=',
];
'os' => '=',
'pid' => '=',
'group' => '=',
'user' => '=',
'command' => '~=',
];

/**
* @var array
* @since 2015-07-30
*/
protected $autoRegEx = [
'os' => true,
'pid' => true,
'group' => true,
'user' => true,
'command' => false,
];
'os' => true,
'pid' => true,
'group' => true,
'user' => true,
'command' => false,
];


/**
Expand Down

0 comments on commit a07fcae

Please sign in to comment.