Skip to content

Commit

Permalink
fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Jun 4, 2020
1 parent 8c9186e commit 711074f
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 21 deletions.
11 changes: 0 additions & 11 deletions demo/benchmark.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@
use Ray\Aop\Compiler;
use Ray\Aop\NullInterceptor;

class FooClass
{
public function intercepted()
{
}

public function noInterceptor()
{
}
}

require __DIR__ . '/bootstrap.php';
require __DIR__ . '/src/FooClass_Optimized.php';

Expand Down
2 changes: 1 addition & 1 deletion demo/src/AnnotationRealBillingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ class AnnotationRealBillingService implements BillingService
*/
public function chargeOrder()
{
echo 'Charged.' . PHP_EOL;
echo 'Charged.' . PHP_EOL;
}
}
16 changes: 16 additions & 0 deletions demo/src/FooClass.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Ray\Aop\Demo;

class FooClass
{
public function intercepted()
{
}

public function noInterceptor()
{
}
}
4 changes: 2 additions & 2 deletions demo/src/ManualAdvice.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ class ManualAdvice
{
public function before()
{
echo 'before A' . PHP_EOL;
echo 'before A' . PHP_EOL;
}

public function after()
{
echo 'after A' . PHP_EOL;
echo 'after A' . PHP_EOL;
}
}
2 changes: 1 addition & 1 deletion demo/src/RealBillingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class RealBillingService implements BillingService
{
public function chargeOrder()
{
echo 'Charged.' . PHP_EOL;
echo 'Charged.' . PHP_EOL;
}
}
4 changes: 2 additions & 2 deletions demo/src/Timer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Timer implements MethodInterceptor
{
public function invoke(MethodInvocation $invocation)
{
echo 'Timer start' . PHP_EOL;
echo 'Timer start' . PHP_EOL;
$mTime = microtime(true);
$invocation->proceed();
$time = microtime(true) - $mTime;
echo sprintf('Time stop, time is =[%01.6f] sec', $time) . PHP_EOL;
echo sprintf('Time stop, time is =[%01.6f] sec', $time) . PHP_EOL;
}
}
4 changes: 2 additions & 2 deletions demo/src/interceptorA.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class interceptorA implements MethodInterceptor
{
public function invoke(MethodInvocation $invocation)
{
echo 'before A' . PHP_EOL;
echo 'before A' . PHP_EOL;
$invocation->proceed();
echo 'after A' . PHP_EOL;
echo 'after A' . PHP_EOL;
}
}
4 changes: 2 additions & 2 deletions demo/src/interceptorB.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class interceptorB implements MethodInterceptor
{
public function invoke(MethodInvocation $invocation)
{
echo 'before B' . PHP_EOL;
echo 'before B' . PHP_EOL;
$invocation->proceed();
echo 'after B' . PHP_EOL;
echo 'after B' . PHP_EOL;
}
}

0 comments on commit 711074f

Please sign in to comment.