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

force strict types #196

Merged
merged 1 commit into from
Nov 16, 2018
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
2 changes: 2 additions & 0 deletions src/AstRunner/AstMap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner;

use SensioLabs\Deptrac\AstRunner\AstMap\AstInheritInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstMap/AstInherit.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstMap;

class AstInherit implements AstInheritInterface
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstMap/AstInheritInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstMap;

interface AstInheritInterface
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstMap/FlattenAstInherit.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstMap;

class FlattenAstInherit implements AstInheritInterface
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/AstClassReferenceInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser;

interface AstClassReferenceInterface extends AstReferenceInterface
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/AstFileReferenceInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser;

interface AstFileReferenceInterface
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/AstParserInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser;

use SensioLabs\Deptrac\AstRunner\AstMap\AstInheritInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/AstReferenceInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser;

interface AstReferenceInterface
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/NikicPhpParser/AstClassReference.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser;

use SensioLabs\Deptrac\AstRunner\AstParser\AstClassReferenceInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/NikicPhpParser/AstHelper.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser;

use PhpParser\Node;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstParser/NikicPhpParser/NikicPhpParser.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser;

use PhpParser\Node;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/AstRunner.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner;

use SensioLabs\Deptrac\AstRunner\AstParser\AstParserInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/Event/AstFileAnalyzedEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\Event;

use Symfony\Component\EventDispatcher\Event;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/Event/AstFileSyntaxErrorEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\Event;

use Symfony\Component\EventDispatcher\Event;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/Event/PostCreateAstMapEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\Event;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/AstRunner/Event/PreCreateAstMapEvent.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\Event;

use Symfony\Component\EventDispatcher\Event;
Expand Down
2 changes: 2 additions & 0 deletions src/ClassNameLayerResolver.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/ClassNameLayerResolverCacheDecorator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac;

class ClassNameLayerResolverCacheDecorator implements ClassNameLayerResolverInterface
Expand Down
2 changes: 2 additions & 0 deletions src/ClassNameLayerResolverInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac;

interface ClassNameLayerResolverInterface
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/BoolCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/ClassNameCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/ClassNameRegexCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/CollectorInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/DirectoryCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/InheritanceLevelCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/MethodCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

use PhpParser\Node\Stmt\ClassMethod;
Expand Down
2 changes: 2 additions & 0 deletions src/Collector/Registry.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Collector;

class Registry
Expand Down
4 changes: 3 additions & 1 deletion src/Command/AnalyzeCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Command;

use SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser\NikicPhpParser;
Expand Down Expand Up @@ -68,7 +70,7 @@ protected function configure(): void

protected function execute(InputInterface $input, OutputInterface $output): int
{
ini_set('memory_limit', -1);
ini_set('memory_limit', '-1');

$this->printBanner($output);

Expand Down
2 changes: 2 additions & 0 deletions src/Command/InitCommand.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Command;

use SensioLabs\Deptrac\Configuration\Dumper as ConfigurationDumper;
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/Configuration.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration;

use Symfony\Component\OptionsResolver\OptionsResolver;
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/ConfigurationCollector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration;

class ConfigurationCollector
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/ConfigurationLayer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration;

use Symfony\Component\OptionsResolver\OptionsResolver;
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/ConfigurationRuleset.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration;

class ConfigurationRuleset
Expand Down
2 changes: 2 additions & 0 deletions src/Dependency/InheritanceFlatter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Dependency;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Dependency/Result.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\Dependency;

use SensioLabs\Deptrac\DependencyResult\Dependency;
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyContext.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
4 changes: 3 additions & 1 deletion src/DependencyEmitter/BasicDependencyEmitter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyEmitter;

use PhpParser\Node\Expr\Closure;
Expand Down Expand Up @@ -156,7 +158,7 @@ private function getReturnTypes(NikicPhpParser $astParser, AstClassReferenceInte
}

$buffer[] = new EmittedDependency(
$node->returnType->type,
$node->returnType->type->toString(),
$node->returnType->getLine(),
'returntype'
);
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyEmitter/DependencyEmitterInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyEmitter;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyEmitter/EmittedDependency.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyEmitter;

class EmittedDependency
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyEmitter/InheritanceDependencyEmitter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyEmitter;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyResult/Dependency.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyResult;

class Dependency implements DependencyInterface
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyResult/DependencyInterface.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyResult;

interface DependencyInterface
Expand Down
2 changes: 2 additions & 0 deletions src/DependencyResult/InheritDependency.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\DependencyResult;

use SensioLabs\Deptrac\AstRunner\AstMap\AstInheritInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/OutputFormatter/ConsoleOutputFormatter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\OutputFormatter;

use SensioLabs\Deptrac\AstRunner\AstMap\AstInheritInterface;
Expand Down
2 changes: 2 additions & 0 deletions src/OutputFormatter/GraphVizOutputFormatter.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace SensioLabs\Deptrac\OutputFormatter;

use Fhaculty\Graph\Vertex;
Expand Down
Loading