Completed
Push — master ( f0bac9...571456 )
by Aleksandar
79:09 queued 61:01
created
src/Core/Middleware/AdminAuth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
         if (!$user) {
55 55
             return $response->withStatus(302)->withHeader(
56 56
                 'Location',
57
-                $this->router->generateUri('auth', ['action' => 'login'])
57
+                $this->router->generateUri('auth', [ 'action' => 'login' ])
58 58
             );
59 59
         }
60 60
 
Please login to merge, or discard this patch.
data/phinx/migrations/20161229132343_discussions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function up()
12 12
     {
13
-        $this->table('article_discussions', ['id' => false])
14
-            ->addColumn('article_uuid', 'binary', ['limit' => 16])
13
+        $this->table('article_discussions', [ 'id' => false ])
14
+            ->addColumn('article_uuid', 'binary', [ 'limit' => 16 ])
15 15
             ->addColumn('title', 'text')
16 16
             ->addColumn('body', 'text')
17
-            ->addForeignKey('article_uuid', 'articles', 'article_uuid', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])
17
+            ->addForeignKey('article_uuid', 'articles', 'article_uuid', [ 'delete' => 'NO_ACTION', 'update' => 'NO_ACTION' ])
18 18
             ->create();
19 19
 
20 20
 //        $this->insertDummyData();
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
 
28 28
     private function insertDummyData()
29 29
     {
30
-        $ids  = [];
30
+        $ids  = [ ];
31 31
         $rows = $this->fetchAll('select admin_user_uuid from admin_users;');
32
-        foreach($rows as $r){
33
-            $ids[] = $r['admin_user_uuid'];
32
+        foreach ($rows as $r) {
33
+            $ids[ ] = $r[ 'admin_user_uuid' ];
34 34
         }
35 35
 
36 36
         $faker = Faker\Factory::create();
37 37
         $count = rand(250, 300);
38
-        for($i = 0; $i < $count; $i++){
38
+        for ($i = 0; $i < $count; $i++) {
39 39
             $id        = $faker->uuid;
40 40
             $mysqluuid = (new Uuid($id))->toFormat(new Binary());
41 41
             $title     = $faker->sentence(5, 15);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 'article_id'      => $id,
46 46
                 'slug'            => strtolower(trim(preg_replace('~[^\pL\d]+~u', '-', $title), '-')),
47 47
                 'status'          => 1,
48
-                'admin_user_uuid' => $ids[array_rand($ids)],
48
+                'admin_user_uuid' => $ids[ array_rand($ids) ],
49 49
                 'type'            => ArticleType::DISCUSSION
50 50
             ];
51 51
 
Please login to merge, or discard this patch.
data/phinx/migrations/20161229132350_events.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function up()
12 12
     {
13
-        $this->table('article_events', ['id' => false])
14
-            ->addColumn('article_uuid', 'binary', ['limit' => 16])
13
+        $this->table('article_events', [ 'id' => false ])
14
+            ->addColumn('article_uuid', 'binary', [ 'limit' => 16 ])
15 15
             ->addColumn('title', 'text')
16
-            ->addColumn('sub_title', 'text', ['null' => true])
16
+            ->addColumn('sub_title', 'text', [ 'null' => true ])
17 17
             ->addColumn('place_name', 'text')
18 18
             ->addColumn('body', 'text')
19 19
             ->addColumn('longitude', 'text')
20 20
             ->addColumn('latitude', 'text')
21
-            ->addColumn('featured_img', 'text', ['null' => true])
22
-            ->addColumn('main_img', 'text', ['null' => true])
21
+            ->addColumn('featured_img', 'text', [ 'null' => true ])
22
+            ->addColumn('main_img', 'text', [ 'null' => true ])
23 23
             ->addColumn('start_at', 'datetime')
24 24
             ->addColumn('end_at', 'datetime')
25
-            ->addForeignKey('article_uuid', 'articles', 'article_uuid', ['delete' => 'NO_ACTION', 'update' => 'NO_ACTION'])
25
+            ->addForeignKey('article_uuid', 'articles', 'article_uuid', [ 'delete' => 'NO_ACTION', 'update' => 'NO_ACTION' ])
26 26
             ->create();
27 27
 
28 28
 //        $this->insertDummyData();
@@ -35,10 +35,10 @@  discard block
 block discarded – undo
35 35
 
36 36
     private function insertDummyData()
37 37
     {
38
-        $ids  = [];
38
+        $ids  = [ ];
39 39
         $rows = $this->fetchAll('select admin_user_uuid from admin_users;');
40
-        foreach($rows as $r){
41
-            $ids[] = $r['admin_user_uuid'];
40
+        foreach ($rows as $r) {
41
+            $ids[ ] = $r[ 'admin_user_uuid' ];
42 42
         }
43 43
 
44 44
         $faker  = Faker\Factory::create();
@@ -46,19 +46,19 @@  discard block
 block discarded – undo
46 46
         $count  = rand(25, 300);
47 47
 
48 48
         // Download N images and set it randomly to the events
49
-        for($i = 0; $i < 5; $i++){
49
+        for ($i = 0; $i < 5; $i++) {
50 50
             $image       = $faker->image();
51 51
             $destination = $upload->getPath(basename($image));
52 52
             rename($image, $destination);
53
-            $mainImg[] = substr($destination, strlen('/var/www/unfinished/public'));
53
+            $mainImg[ ] = substr($destination, strlen('/var/www/unfinished/public'));
54 54
 
55 55
             $image       = $faker->image();
56 56
             $destination = $upload->getPath(basename($image));
57 57
             rename($image, $destination);
58
-            $featuredImg[] = substr($destination, strlen('/var/www/unfinished/public'));
58
+            $featuredImg[ ] = substr($destination, strlen('/var/www/unfinished/public'));
59 59
         }
60 60
 
61
-        for($i = 0; $i < $count; $i++){
61
+        for ($i = 0; $i < $count; $i++) {
62 62
             $start     = rand(1, 20);
63 63
             $id        = $faker->uuid;
64 64
             $mysqluuid = (new Uuid($id))->toFormat(new Binary());
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 'article_id'      => $id,
70 70
                 'slug'            => strtolower(trim(preg_replace('~[^\pL\d]+~u', '-', $title), '-')),
71 71
                 'status'          => 1,
72
-                'admin_user_uuid' => $ids[array_rand($ids)],
72
+                'admin_user_uuid' => $ids[ array_rand($ids) ],
73 73
                 'type'            => ArticleType::EVENT
74 74
             ];
75 75
 
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
                 'longitude'    => $faker->longitude,
81 81
                 'latitude'     => $faker->latitude,
82 82
                 'place_name'   => $faker->sentence(1),
83
-                'main_img'     => $mainImg[array_rand($mainImg)],
84
-                'featured_img' => $featuredImg[array_rand($featuredImg)],
83
+                'main_img'     => $mainImg[ array_rand($mainImg) ],
84
+                'featured_img' => $featuredImg[ array_rand($featuredImg) ],
85 85
                 'start_at'     => date("Y-m-d H:i:s", strtotime("+$start  day +$start hours")),
86 86
                 'end_at'       => date("Y-m-d H:i:s", strtotime("+$start  day +" . ($start + rand(1, 5)) . " hours"))
87 87
             ];
Please login to merge, or discard this patch.
public/admin_assets/vendors/bootstrap-wysiwyg/examples/php/upload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-	header ( 'Content-type: text/plain');
3
+	header('Content-type: text/plain');
4 4
 	echo "
5 5
 		Now see here, you will see the output of the param most 
6 6
 		interesting to PHP. \$_POST.
Please login to merge, or discard this patch.
vendors/jQuery-Smart-Wizard/more_examples/smartwizard2-validation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
 <table align="center" border="0" cellpadding="0" cellspacing="0">
156 156
 <tr><td>
157 157
 <?
158
-   if(isset($_REQUEST['issubmit'])){
158
+   if (isset($_REQUEST[ 'issubmit' ])) {
159 159
       echo "<strong>form is sumbitted</strong>";
160 160
    }
161 161
 
Please login to merge, or discard this patch.
admin_assets/vendors/jQuery-Smart-Wizard/more_examples/services/service.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?
2
-  $action = $_REQUEST["action"];
3
-  switch($action){
2
+  $action = $_REQUEST[ "action" ];
3
+  switch ($action) {
4 4
       case "1":
5 5
           getContent();
6 6
         break;                     
@@ -8,19 +8,19 @@  discard block
 block discarded – undo
8 8
         break;
9 9
   }
10 10
 
11
- function getContent(){
11
+ function getContent() {
12 12
    //sleep(1); 
13
-   $step_number = $_REQUEST["step_number"]; 
14
-   $html = '<h2 class="StepTitle">Step '.$step_number.' Content</h2>';
15
-   if($step_number == 1){
16
-      $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
13
+   $step_number = $_REQUEST[ "step_number" ]; 
14
+   $html = '<h2 class="StepTitle">Step ' . $step_number . ' Content</h2>';
15
+   if ($step_number == 1) {
16
+      $html .= '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
17 17
             sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
18 18
             quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
19 19
             Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
20 20
             Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
21 21
             </p>';
22
-   }elseif($step_number == 2){
23
-      $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
22
+   }elseif ($step_number == 2) {
23
+      $html .= '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
24 24
             sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
25 25
             quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
26 26
             Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
@@ -32,8 +32,8 @@  discard block
 block discarded – undo
32 32
             Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
33 33
             Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
34 34
             </p>';
35
-   }elseif($step_number == 3){
36
-      $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
35
+   }elseif ($step_number == 3) {
36
+      $html .= '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
37 37
             sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
38 38
             quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
39 39
             Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
             Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
52 52
             Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
53 53
             </p>';
54
-   }else{
55
-      $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
54
+   } else {
55
+      $html .= '<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, 
56 56
             sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
57 57
             quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
58 58
             Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. 
Please login to merge, or discard this patch.
config/container.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 use Zend\ServiceManager\Config;
4 4
 use Zend\ServiceManager\ServiceManager;
5 5
 
6
-$config    = require __DIR__ . '/config.php';                                   // Load configuration
7
-$container = new ServiceManager();                                              // Build container
8
-(new Config($config['dependencies']))->configureServiceManager($container);
9
-$container->setService('config', $config);                        // Inject config
6
+$config    = require __DIR__ . '/config.php'; // Load configuration
7
+$container = new ServiceManager(); // Build container
8
+(new Config($config[ 'dependencies' ]))->configureServiceManager($container);
9
+$container->setService('config', $config); // Inject config
10 10
 
11 11
 return $container;
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
config/autoload/templates.global.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
             'error/404'      => 'templates/error/404.phtml',
10 10
         ],
11 11
         'paths'  => [
12
-            'layout' => ['templates/layout'],
13
-            'error'  => ['templates/error'],
12
+            'layout' => [ 'templates/layout' ],
13
+            'error'  => [ 'templates/error' ],
14 14
         ],
15 15
     ],
16 16
 ];
17 17
\ No newline at end of file
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 
4
-if(php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH))) {
4
+if (php_sapi_name() === 'cli-server' && is_file(__DIR__ . parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH))) {
5 5
     return false;
6 6
 }
7 7
 
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 require 'vendor/autoload.php';
10 10
 
11 11
 // Self-called anonymous function that creates its own scope and keep the global namespace clean.
12
-(function () {
12
+(function() {
13 13
     /** @var \Interop\Container\ContainerInterface $container */
14 14
     $container = require 'config/container.php';
15 15
 
Please login to merge, or discard this patch.