Skip to content

Commit

Permalink
replace Nette\Object with Nette\SmartObject
Browse files Browse the repository at this point in the history
  • Loading branch information
dakorpar committed Mar 31, 2018
1 parent 1db03d8 commit c634759
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 30 deletions.
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/DI/AdviceDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class AdviceDefinition extends Nette\Object
class AdviceDefinition
{

use Nette\SmartObject;

/**
* @var Method
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/DI/AspectsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class AspectsConfig extends Nette\Object
class AspectsConfig
{

use Nette\SmartObject;

/**
* @var array
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/JoinPoint/MethodInvocation.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
abstract class MethodInvocation extends Nette\Object
abstract class MethodInvocation
{

use Nette\SmartObject;

/**
* @var object
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/PhpGenerator/AdvisedClassType.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class AdvisedClassType extends Nette\Object
class AdvisedClassType
{

use Nette\SmartObject;

const CG_INJECT_METHOD = '__injectAopContainer';
const CG_PUBLIC_PROXY_PREFIX = '__publicAopProxy_';

Expand Down
3 changes: 2 additions & 1 deletion src/Kdyby/Aop/Pointcut/AspectAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
/**
* @author Filip Procházka <[email protected]>
*/
class AspectAnalyzer extends Nette\Object
class AspectAnalyzer
{
use Nette\SmartObject;

/**
* @var \Doctrine\Common\Annotations\Reader
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/ClassAnnotateWithMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class ClassAnnotateWithMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class ClassAnnotateWithMatcher implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var string
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/Criteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class Criteria extends Nette\Object
class Criteria
{

use Nette\SmartObject;

const TYPE_AND = 'AND';
const TYPE_OR = 'OR';

Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/EvaluateMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class EvaluateMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter, Kdyby\Aop\Pointcut\RuntimeFilter
class EvaluateMatcher implements Kdyby\Aop\Pointcut\Filter, Kdyby\Aop\Pointcut\RuntimeFilter
{

use Nette\SmartObject;

/**
* @var Criteria
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/FilterMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class FilterMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class FilterMatcher implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var \Kdyby\Aop\Pointcut\Filter
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/Inverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class Inverse extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class Inverse implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var \Kdyby\Aop\Pointcut\Filter
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/MethodAnnotateWithMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class MethodAnnotateWithMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class MethodAnnotateWithMatcher implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var string
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/MethodMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class MethodMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class MethodMatcher implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var string
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/SettingMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class SettingMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class SettingMatcher implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var Criteria
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Matcher/WithinMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class WithinMatcher extends Nette\Object implements Kdyby\Aop\Pointcut\Filter
class WithinMatcher implements Kdyby\Aop\Pointcut\Filter
{

use Nette\SmartObject;

/**
* @var string
*/
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/MatcherFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class MatcherFactory extends Nette\Object
class MatcherFactory
{

use Nette\SmartObject;

/**
* @var \Nette\DI\ContainerBuilder
*/
Expand Down
5 changes: 4 additions & 1 deletion src/Kdyby/Aop/Pointcut/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
* @property array|string[] $typesWithin
* @property-read array|string[] $typesWithin
*/
class Method extends Nette\Object
class Method
{

use Nette\SmartObject;

const VISIBILITY_PUBLIC = 'public';
const VISIBILITY_PROTECTED = 'protected';
const VISIBILITY_PRIVATE = 'private';
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@
/**
* @author Filip Procházka <[email protected]>
*/
class Parser extends Nette\Object
class Parser
{
use Nette\SmartObject;

const TOK_BRACKET = 'bracket';
const TOK_VISIBILITY = 'visibility';
const TOK_KEYWORD = 'keyword';
Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
/**
* @author Filip Procházka <[email protected]>
*/
class Rules extends Nette\Object implements Filter, RuntimeFilter
class Rules implements Filter, RuntimeFilter
{

use Nette\SmartObject;

const OP_AND = 'AND';
const OP_OR = 'OR';

Expand Down
4 changes: 3 additions & 1 deletion src/Kdyby/Aop/Pointcut/ServiceDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
* @property Nette\Reflection\ClassType $typeReflection
* @property-read Nette\Reflection\ClassType $typeReflection
*/
class ServiceDefinition extends Nette\Object
class ServiceDefinition
{

use Nette\SmartObject;

/**
* @var \Nette\DI\ServiceDefinition
*/
Expand Down
43 changes: 32 additions & 11 deletions tests/KdybyTests/Aop/files/aspect-examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ function create();



class BeforeAspect extends Nette\Object
class BeforeAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\BeforeMethod[]
*/
Expand Down Expand Up @@ -84,8 +86,9 @@ public function log(Aop\JoinPoint\BeforeMethod $before)



class ConditionalBeforeAspect extends Nette\Object
class ConditionalBeforeAspect
{
use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\BeforeMethod[]
Expand Down Expand Up @@ -121,9 +124,11 @@ class SecondBeforeAspect extends BeforeAspect



class AroundAspect extends Nette\Object
class AroundAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AroundMethod[]
*/
Expand Down Expand Up @@ -161,9 +166,11 @@ public function log(Aop\JoinPoint\AroundMethod $around)



class ConditionalAroundAspect extends Nette\Object
class ConditionalAroundAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AroundMethod[]
*/
Expand Down Expand Up @@ -208,9 +215,11 @@ class SecondAroundAspect extends AroundAspect



class AroundBlockingAspect extends Nette\Object
class AroundBlockingAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AroundMethod[]
*/
Expand Down Expand Up @@ -261,9 +270,11 @@ class SecondAroundBlockingAspect extends AroundBlockingAspect



class AfterReturningAspect extends Nette\Object
class AfterReturningAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AfterReturning[]
*/
Expand All @@ -289,9 +300,11 @@ public function log(Aop\JoinPoint\AfterReturning $after)



class ConditionalAfterReturningAspect extends Nette\Object
class ConditionalAfterReturningAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AfterReturning[]
*/
Expand Down Expand Up @@ -324,9 +337,11 @@ class SecondAfterReturningAspect extends AfterReturningAspect



class AfterThrowingAspect extends Nette\Object
class AfterThrowingAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AfterThrowing[]
*/
Expand All @@ -353,9 +368,11 @@ class SecondAfterThrowingAspect extends AfterThrowingAspect



class AfterAspect extends Nette\Object
class AfterAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\AfterMethod[]
*/
Expand All @@ -380,9 +397,11 @@ class SecondAfterAspect extends AfterAspect

}

class AspectWithArguments extends Nette\Object
class AspectWithArguments
{

use Nette\SmartObject;

public $args;


Expand All @@ -405,9 +424,11 @@ public function log(Aop\JoinPoint\AfterMethod $after)
}


class ConstructorBeforeAspect extends Nette\Object
class ConstructorBeforeAspect
{

use Nette\SmartObject;

/**
* @var array|Aop\JoinPoint\BeforeMethod[]
*/
Expand Down

0 comments on commit c634759

Please sign in to comment.