Skip to content

Commit

Permalink
force strict types
Browse files Browse the repository at this point in the history
  • Loading branch information
smoench committed Nov 16, 2018
1 parent c40b502 commit 61b1dad
Show file tree
Hide file tree
Showing 62 changed files with 136 additions and 12 deletions.
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/AstFileReference.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\AstRunner\AstParser\NikicPhpParser;

use SensioLabs\Deptrac\AstRunner\AstParser\AstFileReferenceInterface;
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/Configuration/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration;

use SensioLabs\Deptrac\Configuration\Exception\FileExistsException;
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/Exception/FileExistsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration\Exception;

final class FileExistsException extends \Exception
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/Exception/MissingFileException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration\Exception;

final class MissingFileException extends \Exception
Expand Down
2 changes: 2 additions & 0 deletions src/Configuration/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Configuration;

use SensioLabs\Deptrac\Configuration\Exception\MissingFileException;
Expand Down
2 changes: 2 additions & 0 deletions src/Dependency/Analyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Dependency;

use SensioLabs\Deptrac\AstRunner\AstMap;
Expand Down
2 changes: 2 additions & 0 deletions src/Dependency/Events.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Dependency;

final class Events
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/PreEmitEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

declare(strict_types=1);

declare(strict_types=1);

namespace SensioLabs\Deptrac\Dependency;

use Symfony\Component\EventDispatcher\Event;
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
Loading

0 comments on commit 61b1dad

Please sign in to comment.