Completed
Push — master ( d7572d...1eca1b )
by Ivan
02:05
created
examples/header.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require getcwd() . '/vendor/autoload.php';
2
+require getcwd().'/vendor/autoload.php';
3 3
 session_start();
4 4
 
5 5
 /**
6 6
  * Define Directory Separator Short Code if not defined
7 7
  */
8
-if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
8
+if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
9 9
 
10 10
 /**
11 11
  * Define Project Folder Short Code if not defined
12 12
  */
13
-if(!defined('PROJECT_FOLDER')) define('PROJECT_FOLDER', getcwd());
13
+if (!defined('PROJECT_FOLDER')) define('PROJECT_FOLDER', getcwd());
14 14
 
15 15
 /**
16 16
  * Define Content Folder Short Code if not defined
17 17
  */
18
-if(!defined('CONTENT_FOLDER')) define('CONTENT_FOLDER', PROJECT_FOLDER . DS . 'Content' . DS);
18
+if (!defined('CONTENT_FOLDER')) define('CONTENT_FOLDER', PROJECT_FOLDER.DS.'Content'.DS);
19 19
 
20 20
 $dataArray = [
21 21
     'key'       =>  '',
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 ];
24 24
 
25 25
 
26
-if(isset($_SESSION['access_token'])){
27
-    $dataArray['token'] = $_SESSION['access_token'];
28
-    $VKObject = new FreedomCore\VK\VKBase($dataArray['key'], $dataArray['secret'], $dataArray['token']);
26
+if (isset($_SESSION[ 'access_token' ])) {
27
+    $dataArray[ 'token' ] = $_SESSION[ 'access_token' ];
28
+    $VKObject = new FreedomCore\VK\VKBase($dataArray[ 'key' ], $dataArray[ 'secret' ], $dataArray[ 'token' ]);
29 29
     $VKObject->setAPIVersion('5.50');
30 30
 } else {
31
-    $VKObject = new \FreedomCore\VK\VKBase($dataArray['key'], $dataArray['secret']);
31
+    $VKObject = new \FreedomCore\VK\VKBase($dataArray[ 'key' ], $dataArray[ 'secret' ]);
32 32
     $VKObject->setAPIVersion('5.50');
33 33
 }
Please login to merge, or discard this patch.
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,17 +5,23 @@
 block discarded – undo
5 5
 /**
6 6
  * Define Directory Separator Short Code if not defined
7 7
  */
8
-if(!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
8
+if(!defined('DS')) {
9
+    define('DS', DIRECTORY_SEPARATOR);
10
+}
9 11
 
10 12
 /**
11 13
  * Define Project Folder Short Code if not defined
12 14
  */
13
-if(!defined('PROJECT_FOLDER')) define('PROJECT_FOLDER', getcwd());
15
+if(!defined('PROJECT_FOLDER')) {
16
+    define('PROJECT_FOLDER', getcwd());
17
+}
14 18
 
15 19
 /**
16 20
  * Define Content Folder Short Code if not defined
17 21
  */
18
-if(!defined('CONTENT_FOLDER')) define('CONTENT_FOLDER', PROJECT_FOLDER . DS . 'Content' . DS);
22
+if(!defined('CONTENT_FOLDER')) {
23
+    define('CONTENT_FOLDER', PROJECT_FOLDER . DS . 'Content' . DS);
24
+}
19 25
 
20 26
 $dataArray = [
21 27
     'key'       =>  '',
Please login to merge, or discard this patch.
examples/index.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
         print_r($searchUsers);
10 10
         echo "</pre>";
11 11
     } else {
12
-       header('Location: /login.php'); 
12
+        header('Location: /login.php'); 
13 13
     }
14 14
 } else {
15 15
     header('Location: /login.php');
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 require('header.php');
3 3
 
4
-if(isset($_SESSION['access_token'])) {
5
-    if($VKObject->isAuthorized()){
4
+if (isset($_SESSION[ 'access_token' ])) {
5
+    if ($VKObject->isAuthorized()) {
6 6
         $VKUsers = new \FreedomCore\VK\API\VKUsers($VKObject);
7
-        $searchUsers = $VKUsers->get(['{ID_ONE}', '{ID_TWO'}, '{ID_N}'])
7
+        $searchUsers = $VKUsers->get([ '{ID_ONE}', '{ID_TWO'}, '{ID_N}' ])
8 8
         echo "<pre>";
9 9
         print_r($searchUsers);
10 10
         echo "</pre>";
Please login to merge, or discard this patch.