Skip to content

Commit

Permalink
Merge pull request #82 from koriym/strict
Browse files Browse the repository at this point in the history
declare(strict_types=1)
  • Loading branch information
koriym authored Mar 2, 2018
2 parents f908124 + 9b9667c commit 38822b0
Show file tree
Hide file tree
Showing 79 changed files with 327 additions and 45 deletions.
10 changes: 5 additions & 5 deletions .php_cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ return \PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(array(
'@PSR2' => true,
// 'header_comment' => ['header' => $header, 'commentType' => 'PHPDoc', 'separate' => 'none'],
'header_comment' => ['header' => $header, 'commentType' => 'PHPDoc', 'separate' => 'none'],
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['align_equals' => false, 'align_double_arrow' => false],
'blank_line_after_opening_tag' => true,
Expand All @@ -21,16 +21,16 @@ return \PhpCsFixer\Config::create()
'combine_consecutive_unsets' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => true,
'declare_strict_types' => false,
'declare_strict_types' => true,
'dir_constant' => true,
'ereg_to_preg' => true,
'function_typehint_space' => true,
'general_phpdoc_annotation_remove' => true,
'general_phpdoc_annotation_remove' => ['author', 'category', 'package', 'copyright', 'version'],
'hash_to_slash_comment' => true,
'heredoc_to_nowdoc' => true,
'include' => true,
'indentation_type' => true,
'is_null' => ['use_yoda_style' => false],
// 'is_null' => ['use_yoda_style' => false],
'linebreak_after_opening_tag' => true,
'lowercase_cast' => true,
// 'mb_str_functions' => true,
Expand Down Expand Up @@ -78,7 +78,7 @@ return \PhpCsFixer\Config::create()
'php_unit_dedicate_assert' => true,
'php_unit_fqcn_annotation' => true,
'php_unit_strict' => true,
'phpdoc_add_missing_param_annotation' => true,
// 'phpdoc_add_missing_param_annotation' => true,
'phpdoc_align' => true,
'phpdoc_annotation_without_dot' => true,
'phpdoc_indent' => true,
Expand Down
7 changes: 7 additions & 0 deletions demo/01-explicit-bind.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

require __DIR__ . '/bootstrap.php';
Expand Down
7 changes: 7 additions & 0 deletions demo/02-matcher-bind.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\Bind;
Expand Down
7 changes: 7 additions & 0 deletions demo/03-annotation-bind.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\Bind;
Expand Down
7 changes: 7 additions & 0 deletions demo/04-my-matcher.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\Bind;
Expand Down
7 changes: 7 additions & 0 deletions demo/05-cache.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

require __DIR__ . '/bootstrap.php';
Expand Down
6 changes: 6 additions & 0 deletions demo/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
use Doctrine\Common\Annotations\AnnotationRegistry;

/** @var $loader \Composer\Autoload\ClassLoader */
Expand Down
6 changes: 6 additions & 0 deletions demo/run.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
passthru('php ' . __DIR__ . '/01-explicit-bind.php');
passthru('php ' . __DIR__ . '/02-matcher-bind.php');
passthru('php ' . __DIR__ . '/03-annotation-bind.php');
Expand Down
7 changes: 7 additions & 0 deletions demo/src/AnnotationRealBillingService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

class AnnotationRealBillingService implements BillingService
Expand Down
7 changes: 7 additions & 0 deletions demo/src/BillingService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

interface BillingService
Expand Down
7 changes: 7 additions & 0 deletions demo/src/EmptyInterceptor.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\MethodInterceptor;
Expand Down
7 changes: 7 additions & 0 deletions demo/src/IsContainsMatcher.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\AbstractMatcher;
Expand Down
7 changes: 7 additions & 0 deletions demo/src/ManualAdvice.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

class ManualAdvice
Expand Down
7 changes: 7 additions & 0 deletions demo/src/RealBillingService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

class RealBillingService implements BillingService
Expand Down
7 changes: 7 additions & 0 deletions demo/src/Timer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\MethodInterceptor;
Expand Down
7 changes: 7 additions & 0 deletions demo/src/WeekendBlock.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

/**
Expand Down
7 changes: 7 additions & 0 deletions demo/src/WeekendBlocker.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\MethodInterceptor;
Expand Down
7 changes: 7 additions & 0 deletions demo/src/interceptorA.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\MethodInterceptor;
Expand Down
7 changes: 7 additions & 0 deletions demo/src/interceptorB.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop\Demo;

use Ray\Aop\MethodInterceptor;
Expand Down
2 changes: 1 addition & 1 deletion src/AbstractMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
7 changes: 7 additions & 0 deletions src/AbstractWeave.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
namespace Ray\Aop;

abstract class AbstractWeave implements WeavedInterface
Expand Down
4 changes: 3 additions & 1 deletion src/Advice.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/AnnotatedMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Annotation/AbstractAssisted.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Arguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Bind.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
4 changes: 3 additions & 1 deletion src/BindInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/BuiltinMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CodeGen.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
4 changes: 3 additions & 1 deletion src/CodeGenInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CodeGenMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/CodeGenVisitor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
4 changes: 3 additions & 1 deletion src/CompilerInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

declare(strict_types=1);
/**
* This file is part of the Ray.Aop package
* This file is part of the Ray.Aop package.
*
* @license http://opensource.org/licenses/MIT MIT
*/
Expand Down
Loading

0 comments on commit 38822b0

Please sign in to comment.