Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Added adding file headers to cs fixer rule
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Mar 3, 2019
1 parent aedb900 commit 7c3f680
Show file tree
Hide file tree
Showing 12 changed files with 110 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

$fileHeaderComment = <<<COMMENT
This file is part of the App Insights PHP project.
(c) Norbert Orzechowicz <norbert@orzechowicz.pl>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
COMMENT;

$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/']);

Expand All @@ -11,6 +20,7 @@ return PhpCsFixer\Config::create()
'php_unit_no_expectation_annotation' => false,
'array_syntax' => ['syntax' => 'short'],
'protected_to_private' => false,
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
])
->setRiskyAllowed(true)
->setFinder($finder);
9 changes: 9 additions & 0 deletions AppInsightsPHPBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle;

use AppInsightsPHP\Symfony\AppInsightsPHPBundle\DependencyInjection\Compiler\DoctrineDependencyPassPass;
Expand Down
9 changes: 9 additions & 0 deletions DependencyInjection/AppInsightsPHPExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\DependencyInjection;

use AppInsightsPHP\Client\Client;
Expand Down
9 changes: 9 additions & 0 deletions DependencyInjection/Compiler/DoctrineDependencyPassPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
Expand Down
9 changes: 9 additions & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\DependencyInjection;

use Monolog\Logger;
Expand Down
9 changes: 9 additions & 0 deletions Listener/ExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Listener;

use AppInsightsPHP\Client\Client;
Expand Down
9 changes: 9 additions & 0 deletions Listener/HttpRequestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Listener;

use AppInsightsPHP\Client\Client;
Expand Down
9 changes: 9 additions & 0 deletions Listener/KernelTerminateListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Listener;

use AppInsightsPHP\Client\Client;
Expand Down
9 changes: 9 additions & 0 deletions Tests/DependencyInjection/AppInsightsPHPExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Tests\DependencyInjection;

use AppInsightsPHP\Client\Client;
Expand Down
9 changes: 9 additions & 0 deletions Tests/DependencyInjection/ConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Tests\DependencyInjection;

use AppInsightsPHP\Symfony\AppInsightsPHPBundle\DependencyInjection\Configuration;
Expand Down
9 changes: 9 additions & 0 deletions Tests/Twig/TelemetryExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Tests\Twig;

use AppInsightsPHP\Client\ClientFactory;
Expand Down
11 changes: 10 additions & 1 deletion Twig/TelemetryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

declare(strict_types=1);

/*
* This file is part of the App Insights PHP project.
*
* (c) Norbert Orzechowicz <norbert@orzechowicz.pl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace AppInsightsPHP\Symfony\AppInsightsPHPBundle\Twig;

use AppInsightsPHP\Client\Client;
Expand Down Expand Up @@ -40,7 +49,7 @@ function b(a){c[a]=function(){var b=arguments;c.queue.push(function(){c[a].apply
window.appInsights.queue.push(function () {
appInsights.context.operation.id = '%s';
});
});\n
JS
, $this->client->getContext()->getInstrumentationKey(), $this->client->getContext()->getOperationContext()->getId()
);
Expand Down

0 comments on commit 7c3f680

Please sign in to comment.