diff --git a/src/Callbacks/OnErrorCallback.php b/src/Callbacks/OnErrorCallback.php index e7ea64c..08cd64b 100644 --- a/src/Callbacks/OnErrorCallback.php +++ b/src/Callbacks/OnErrorCallback.php @@ -6,6 +6,7 @@ class OnErrorCallback extends \Nette\Object { + /** * @param \Nette\Application\Application * @param \Exception @@ -26,4 +27,5 @@ public function register(Application $application) { $application->onError[] = $this; } + } diff --git a/src/Callbacks/OnRequestCallback.php b/src/Callbacks/OnRequestCallback.php index d755952..6642d46 100644 --- a/src/Callbacks/OnRequestCallback.php +++ b/src/Callbacks/OnRequestCallback.php @@ -9,10 +9,13 @@ class OnRequestCallback extends \Nette\Object { + /** @var array */ private $map; + /** @var string */ private $license; + /** @var string */ private $actionKey; @@ -74,4 +77,5 @@ public function register(Application $application) { $application->onRequest[] = $this; } + } diff --git a/src/Extension.php b/src/Extension.php index 3d934d9..6d87ae7 100644 --- a/src/Extension.php +++ b/src/Extension.php @@ -9,8 +9,10 @@ class Extension extends \Nette\DI\CompilerExtension { + /** @var bool */ private $skipIfIsDisabled; + /** @var bool */ private $enabled = TRUE; @@ -95,20 +97,22 @@ public function afterCompile(ClassType $class) // AppName and license if (isset($config['appName']) && !is_array($config['appName'])) { $initialize->addBody('\VrtakCZ\NewRelic\Tracy\Bootstrap::setup(?, ?);', array( - $config['appName'], isset($config['license']) ? $config['license'] : NULL + $config['appName'], + isset($config['license']) ? $config['license'] : NULL, )); } elseif (isset($config['appName']) && is_array($config['appName'])) { if (!isset($config['appName']['*'])) { throw new \RuntimeException('Missing default app name as "*"'); } $initialize->addBody('\VrtakCZ\NewRelic\Tracy\Bootstrap::setup(?, ?);', array( - $config['appName']['*'], isset($config['license']) ? $config['license'] : NULL + $config['appName']['*'], + isset($config['license']) ? $config['license'] : NULL, )); } // Logger $initialize->addBody('\Tracy\Debugger::setLogger(new \VrtakCZ\NewRelic\Tracy\Logger(?));', array( - array_unique($config['logLevel']) + array_unique($config['logLevel']), )); $this->setupCustom($initialize); @@ -144,7 +148,7 @@ public function afterCompile(ClassType $class) $initialize->addBody("ini_set('newrelic.error_collector.record_database_errors', ?);", array( (string) $config['errorCollector']['recordDatabaseErrors'], )); - $initialize->addBody("newrelic_capture_params(?);", array( + $initialize->addBody('newrelic_capture_params(?);', array( $config['parameters']['capture'], )); $initialize->addBody("ini_set('newrelic.ignored_params', ?);", array( @@ -162,7 +166,9 @@ private function setupApplicationOnRequest() $builder->addDefinition($this->prefix('onRequestCallback')) ->setClass('VrtakCZ\NewRelic\Nette\Callbacks\OnRequestCallback', array( - $map, $license, isset($config['actionKey']) ? $config['actionKey'] : Presenter::ACTION_KEY, + $map, + $license, + isset($config['actionKey']) ? $config['actionKey'] : Presenter::ACTION_KEY, )) ->addSetup('register', array('@\Nette\Application\Application')) ->addTag('run', TRUE); @@ -189,7 +195,8 @@ private function setupCustom(Method $initialize) foreach ($config['custom']['parameters'] as $name => $value) { $initialize->addBody('\VrtakCZ\NewRelic\Tracy\Custom\Parameters::addParameter(?, ?);', array( - $name, $value + $name, + $value, )); } } @@ -221,4 +228,5 @@ private function setupRUM() $builder->addDefinition($this->prefix('rum.footerControl')) ->setClass('VrtakCZ\NewRelic\Nette\RUM\FooterControl', array($rumEnabled)); } + } diff --git a/src/RUM/FooterControl.php b/src/RUM/FooterControl.php index 3909921..2eb733d 100644 --- a/src/RUM/FooterControl.php +++ b/src/RUM/FooterControl.php @@ -4,8 +4,10 @@ class FooterControl extends \Nette\Application\UI\Control { + /** @var bool */ private $enabled; + /** @var bool */ private $withScriptTag = TRUE; @@ -33,4 +35,5 @@ public function render() echo newrelic_get_browser_timing_footer($this->withScriptTag); } } + } diff --git a/src/RUM/HeaderControl.php b/src/RUM/HeaderControl.php index a504193..b3d2ea1 100644 --- a/src/RUM/HeaderControl.php +++ b/src/RUM/HeaderControl.php @@ -4,8 +4,10 @@ class HeaderControl extends \Nette\Application\UI\Control { + /** @var bool */ private $enabled; + /** @var bool */ private $withScriptTag = TRUE; @@ -33,4 +35,5 @@ public function render() echo newrelic_get_browser_timing_header($this->withScriptTag); } } + } diff --git a/src/RUM/User.php b/src/RUM/User.php index d3f117c..6377b95 100644 --- a/src/RUM/User.php +++ b/src/RUM/User.php @@ -4,6 +4,7 @@ class User extends \Nette\Object { + /** @var bool */ private $enabled; @@ -29,4 +30,5 @@ public function setAttributes($user, $account, $product) } return $this; } + }