Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
patinthehat authored and actions-user committed Jul 30, 2021
1 parent 1baf5c1 commit 9a81f0e
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion src/Results/Nodes/ClassMethodNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Permafrost\PhpCodeSearch\Results\Nodes;

use Permafrost\PhpCodeSearch\Code\GenericCodeLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\BootsTraits;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasName;
Expand Down
1 change: 0 additions & 1 deletion src/Results/Nodes/ClassPropertyNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Permafrost\PhpCodeSearch\Results\Nodes;

use Permafrost\PhpCodeSearch\Code\GenericCodeLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\BootsTraits;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasName;
Expand Down
2 changes: 0 additions & 2 deletions src/Results/Nodes/FunctionCallNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

namespace Permafrost\PhpCodeSearch\Results\Nodes;

use Permafrost\PhpCodeSearch\Code\GenericCodeLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\BootsTraits;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasName;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\TransformsArguments;
use Permafrost\PhpCodeSearch\Support\ExpressionTransformer;
use PhpParser\Node;

Expand Down
1 change: 0 additions & 1 deletion src/Results/Nodes/FunctionDefinitionNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Permafrost\PhpCodeSearch\Results\Nodes;

use Permafrost\PhpCodeSearch\Code\GenericCodeLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\BootsTraits;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasLocation;
use Permafrost\PhpCodeSearch\Results\Nodes\Traits\HasName;
Expand Down
5 changes: 3 additions & 2 deletions src/Results/Nodes/Traits/BootsTraits.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ protected function bootTraits($node): void
$reflectionObject = new \ReflectionObject($this);

collect($reflectionObject->getTraitNames())
->map(function(string $name){
->map(function (string $name) {
if (strpos($name, __NAMESPACE__) === false) {
return null;
}

return Arr::last(explode('\\', $name));
})
->filter()
->each(function(string $name) use ($node) {
->each(function (string $name) use ($node) {
$bootMethodName = 'boot'.$name;

if (method_exists($this, $bootMethodName)) {
Expand Down
6 changes: 4 additions & 2 deletions src/Results/Nodes/Traits/HasVisibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

namespace Permafrost\PhpCodeSearch\Results\Nodes\Traits;

trait HasVisibility {
trait HasVisibility
{

/** @var string */
public $visibility = 'unknown';
Expand All @@ -20,9 +21,10 @@ protected function initVisibilityAttribute($node): void
'isProtected' => 'protected',
];

foreach($visibilityMap as $method => $visibility) {
foreach ($visibilityMap as $method => $visibility) {
if ($node->$method()) {
$this->visibility = $visibility;

return;
}
}
Expand Down
1 change: 0 additions & 1 deletion src/Support/Collections/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public function first(callable $callback = null, $default = null)
return Arr::first($this->items, $callback, $default);
}


public function get($key, $default = null)
{
if (array_key_exists($key, $this->items)) {
Expand Down
2 changes: 1 addition & 1 deletion src/Support/NameResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function resolve($node)

public static function resolveAll(array $nodes): array
{
return collect($nodes)->each(function($node) {
return collect($nodes)->each(function ($node) {
return self::resolve($node);
})->filter()->all();
}
Expand Down

0 comments on commit 9a81f0e

Please sign in to comment.