Passed
Pull Request — master (#23)
by Nikolay
09:42 queued 03:08
created
src/Core/Asterisk/Configs/SipNotifyConf.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,23 +22,23 @@
 block discarded – undo
22 22
         // CLI> sip notify yealink-reboot autoprovision_user
23 23
         // autoprovision_user - id sip учетной записи.
24 24
         $conf = '';
25
-        $conf .= "[yealink-reboot]\n" .
26
-            "Event=>check-sync\;reboot=true\n" .
25
+        $conf .= "[yealink-reboot]\n".
26
+            "Event=>check-sync\;reboot=true\n".
27 27
             "Content-Length=>0\n".
28 28
             "Content=>\n\n";
29 29
 
30
-        $conf .= "[snom-reboot]\n" .
31
-            "Event=>check-sync\;reboot=true\n" .
30
+        $conf .= "[snom-reboot]\n".
31
+            "Event=>check-sync\;reboot=true\n".
32 32
             "Content=>\n\n";
33 33
         // Пример
34 34
         // CLI> sip notify yealink-action-ok autoprovision_user
35 35
         // http://support.yealink.com/faq/faqInfo?id=173
36
-        $conf .= "[yealink-action-ok]\n" .
37
-            "Content-Type=>message/sipfrag\n" .
38
-            "Event=>ACTION-URI\n" .
36
+        $conf .= "[yealink-action-ok]\n".
37
+            "Content-Type=>message/sipfrag\n".
38
+            "Event=>ACTION-URI\n".
39 39
             "Content=>key=SPEAKER\n".
40 40
             "Content=>\n\n";
41 41
 
42
-        Util::fileWriteContent($this->config->path('asterisk.astetcdir') . '/pjsip_notify.conf', $conf);
42
+        Util::fileWriteContent($this->config->path('asterisk.astetcdir').'/pjsip_notify.conf', $conf);
43 43
     }
44 44
 }
45 45
\ No newline at end of file
Please login to merge, or discard this patch.
sites/admin-cabinet/index.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 /**
22 22
  * Auto-loader configuration
23 23
  */
24
-require_once __DIR__ . '/../../src/Common/Config/ClassLoader.php';
24
+require_once __DIR__.'/../../src/Common/Config/ClassLoader.php';
25 25
 
26 26
 /**
27 27
  * Load application services
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 // register_shutdown_function([PhpError::class,'runtimeShutdown']);
37 37
 // set_error_handler([PhpError::class,'errorHandler']);
38 38
 
39
-if (class_exists(PrettyPageHandler::class)){
39
+if (class_exists(PrettyPageHandler::class)) {
40 40
     $whoops = new Run();
41 41
     $whoops->pushHandler(new PrettyPageHandler());
42 42
     $whoops->register();
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@
 block discarded – undo
44 44
 
45 45
 try {
46 46
     $application = new Application($di);
47
-	echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
47
+    echo $application->handle($_SERVER['REQUEST_URI'])->getContent();
48 48
 } catch (Throwable $e) {
49
-	$errorLogger->captureException($e);
50
-	PhpError::exceptionHandler($e);
51
-	echo $e->getMessage();
49
+    $errorLogger->captureException($e);
50
+    PhpError::exceptionHandler($e);
51
+    echo $e->getMessage();
52 52
 }
53 53
\ No newline at end of file
Please login to merge, or discard this patch.
src/PBXCoreREST/Controllers/Syslog/PostController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
             $response = json_decode($response, true);
66 66
 
67 67
             $filename = $response['data']['filename'] ?? '';
68
-            if ( ! file_exists($filename)) {
68
+            if (!file_exists($filename)) {
69 69
                 $response['messages'][] = 'Log file not found';
70 70
             } else {
71 71
                 $response['data']['filename'] = $filename;
72
-                $response['data']['content']  = mb_convert_encoding('' . file_get_contents($filename), 'UTF-8', 'UTF-8');
72
+                $response['data']['content']  = mb_convert_encoding(''.file_get_contents($filename), 'UTF-8', 'UTF-8');
73 73
                 unlink($filename);
74 74
             }
75 75
 
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
             if (array_key_exists('filename', $response['data'])) {
102 102
                 $di           = Di::getDefault();
103 103
                 $downloadLink = $di->getShared('config')->path('www.downloadCacheDir');
104
-                $filename     = $downloadLink . "/" . $response['data']['filename'] ?? '';
105
-                if ( ! file_exists($filename)) {
104
+                $filename     = $downloadLink."/".$response['data']['filename'] ?? '';
105
+                if (!file_exists($filename)) {
106 106
                     $response['messages'][] = 'File not found';
107 107
                 } else {
108 108
                     $scheme                       = $this->request->getScheme();
Please login to merge, or discard this patch.
src/PBXCoreREST/Providers/ResponseProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     {
31 31
         $di->setShared(
32 32
             self::SERVICE_NAME,
33
-            function () {
33
+            function() {
34 34
                 $response = new Response();
35 35
 
36 36
                 /**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
     {
31 31
         $di->setShared(
32 32
             self::SERVICE_NAME,
33
-            function () {
33
+            function ()
34
+            {
34 35
                 $response = new Response();
35 36
 
36 37
                 /**
Please login to merge, or discard this patch.
src/PBXCoreREST/Providers/DispatcherProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $di->setShared(
37 37
             self::SERVICE_NAME,
38
-            function () {
38
+            function() {
39 39
                 // Create a events manager
40 40
                 $eventsManager = new EventsManager();
41 41
                 $dispatcher = new Dispatcher();
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@
 block discarded – undo
35 35
     {
36 36
         $di->setShared(
37 37
             self::SERVICE_NAME,
38
-            function () {
38
+            function ()
39
+            {
39 40
                 // Create a events manager
40 41
                 $eventsManager = new EventsManager();
41 42
                 $dispatcher = new Dispatcher();
Please login to merge, or discard this patch.
src/Common/Models/FirewallRules.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -129,14 +129,14 @@
 block discarded – undo
129 129
 
130 130
         //Add modules firewall rules
131 131
         $di = Di::getDefault();
132
-        if ($di!==null) {
132
+        if ($di !== null) {
133 133
             $pbxConfModules = $di->get('pbxConfModules');
134
-            foreach ($pbxConfModules as $pbxConfModule){
134
+            foreach ($pbxConfModules as $pbxConfModule) {
135 135
                 $additionalRules = $pbxConfModule->getDefaultFirewallRules();
136
-                if ($additionalRules!==[]){
136
+                if ($additionalRules !== []) {
137 137
                     $additionalRules = array_change_key_case($additionalRules, CASE_UPPER);
138
-                    foreach ($additionalRules as $key=>$rule){
139
-                        $template[$key]=$rule;
138
+                    foreach ($additionalRules as $key=>$rule) {
139
+                        $template[$key] = $rule;
140 140
                     }
141 141
                 }
142 142
             }
Please login to merge, or discard this patch.
src/Common/Providers/NatsConnectionProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
         $gnatsConfig = $di->getShared('config')->get('gnats');
35 35
         $di->setShared(
36 36
             self::SERVICE_NAME,
37
-            function () use ($gnatsConfig) {
37
+            function() use ($gnatsConfig) {
38 38
                 $connectionOptions = new NatsConnectionOptions();
39 39
                 $host              = $gnatsConfig->host;
40 40
                 $port              = $gnatsConfig->port;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,8 @@
 block discarded – undo
34 34
         $gnatsConfig = $di->getShared('config')->get('gnats');
35 35
         $di->setShared(
36 36
             self::SERVICE_NAME,
37
-            function () use ($gnatsConfig) {
37
+            function () use ($gnatsConfig)
38
+            {
38 39
                 $connectionOptions = new NatsConnectionOptions();
39 40
                 $host              = $gnatsConfig->host;
40 41
                 $port              = $gnatsConfig->port;
Please login to merge, or discard this patch.
src/Common/Providers/UrlProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $baseUri = $di->getShared('config')->path('adminApplication.baseUri');
41 41
         $di->setShared(
42 42
             self::SERVICE_NAME,
43
-            function () use ($baseUri) {
43
+            function() use ($baseUri) {
44 44
                 $url = new Url();
45 45
                 $url->setBaseUri($baseUri);
46 46
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,8 @@
 block discarded – undo
40 40
         $baseUri = $di->getShared('config')->path('adminApplication.baseUri');
41 41
         $di->setShared(
42 42
             self::SERVICE_NAME,
43
-            function () use ($baseUri) {
43
+            function () use ($baseUri)
44
+            {
44 45
                 $url = new Url();
45 46
                 $url->setBaseUri($baseUri);
46 47
 
Please login to merge, or discard this patch.
src/Common/Providers/RegistryProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         $di->setShared(
40 40
             self::SERVICE_NAME,
41
-            function () {
41
+            function() {
42 42
                 return new Registry();
43 43
             }
44 44
         );
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,8 @@
 block discarded – undo
38 38
     {
39 39
         $di->setShared(
40 40
             self::SERVICE_NAME,
41
-            function () {
41
+            function ()
42
+            {
42 43
                 return new Registry();
43 44
             }
44 45
         );
Please login to merge, or discard this patch.