Completed
Push — dev ( c9c9d6...81d69f )
by Zach
05:21
created
src/Helpers/helpers.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      */
11 11
     function dd()
12 12
     {
13
-        array_map(function ($x) {
13
+        array_map(function($x) {
14 14
             $string = (new Dump(null, true))->variable($x);
15 15
 
16 16
             echo PHP_SAPI == 'cli' ? strip_tags($string).PHP_EOL : $string;
Please login to merge, or discard this patch.
src/Migrations/Repositories/DatabaseMigrationRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $ran = $this->getRan($ran, $steps);
83 83
 
84
-        return array_map(function ($item) {
84
+        return array_map(function($item) {
85 85
             return $item['migration'];
86 86
         }, $ran);
87 87
     }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $ran = $this->getRan($ran);
99 99
 
100
-        return array_map(function ($item) {
100
+        return array_map(function($item) {
101 101
             return $item['batch'];
102 102
         }, $ran);
103 103
     }
Please login to merge, or discard this patch.
src/Migrations/FileDate/FileDateMigrator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,11 +99,11 @@
 block discarded – undo
99 99
     {
100 100
         $files = scandir($this->config->getMigrationDirectory());
101 101
 
102
-        $files = array_filter($files, function ($file) {
102
+        $files = array_filter($files, function($file) {
103 103
             return strpos($file, '.php') !== false;
104 104
         });
105 105
 
106
-        $files = array_map(function ($file) {
106
+        $files = array_map(function($file) {
107 107
             return str_replace('.php', '', $file);
108 108
         }, $files);
109 109
 
Please login to merge, or discard this patch.
src/DB/Factories/ModelFactoryBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         }
97 97
 
98 98
         if (is_array($made)) {
99
-            return array_map(function (Model $model) {
99
+            return array_map(function(Model $model) {
100 100
                 $model->save();
101 101
 
102 102
                 return $model;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     protected function callClosureAttributes(array $attributes)
156 156
     {
157
-        return array_map(function ($attribute) use ($attributes) {
157
+        return array_map(function($attribute) use ($attributes) {
158 158
             if ($attribute instanceof \Closure) {
159 159
                 return $attribute($attributes);
160 160
             }
Please login to merge, or discard this patch.
app/config/services.php 3 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -3,10 +3,7 @@
 block discarded – undo
3 3
 use Yarak\Kernel;
4 4
 use Phalcon\Mvc\View;
5 5
 use Phalcon\Security;
6
-use Sonohini\Acl\Acl;
7
-use Sonohini\Auth\Auth;
8 6
 use Phalcon\Mvc\Dispatcher;
9
-use Elasticsearch\ClientBuilder;
10 7
 use Phalcon\Flash\Direct as Flash;
11 8
 use Phalcon\Mvc\Url as UrlResolver;
12 9
 use Phalcon\Mvc\View\Engine\Php as PhpEngine;
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -110,9 +110,9 @@
 block discarded – undo
110 110
     return new Security();
111 111
 });
112 112
 
113
- $di->set('modelsManager', function() {
114
-      return new ModelsManager();
115
- });
113
+    $di->set('modelsManager', function() {
114
+        return new ModelsManager();
115
+    });
116 116
 
117 117
 $di->setShared('yarak', function () {
118 118
     $config = $this->getConfig();
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
 use Phalcon\Session\Adapter\Files as SessionAdapter;
16 16
 use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;
17 17
 
18
-$di->setShared('config', function () {
18
+$di->setShared('config', function() {
19 19
     return include APP_PATH.'/config/config.php';
20 20
 });
21 21
 
22
-$di->setShared('url', function () {
22
+$di->setShared('url', function() {
23 23
     $config = $this->getConfig();
24 24
 
25 25
     $url = new UrlResolver();
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     return $url;
29 29
 });
30 30
 
31
-$di->setShared('view', function () {
31
+$di->setShared('view', function() {
32 32
     $config = $this->getConfig();
33 33
 
34 34
     $view = new View();
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     $view->setViewsDir($config->application->viewsDir);
37 37
 
38 38
     $view->registerEngines([
39
-        '.volt' => function ($view) {
39
+        '.volt' => function($view) {
40 40
             $config = $this->getConfig();
41 41
 
42 42
             $volt = new VoltEngine($view, $this);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     return $view;
56 56
 });
57 57
 
58
-$di->setShared('db', function () {
58
+$di->setShared('db', function() {
59 59
     $config = $this->getConfig();
60 60
 
61 61
     $class = 'Phalcon\Db\Adapter\Pdo\\'.$config->database->adapter;
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
     return $connection;
80 80
 });
81 81
 
82
-$di->setShared('modelsMetadata', function () {
82
+$di->setShared('modelsMetadata', function() {
83 83
     return new MetaDataAdapter();
84 84
 });
85 85
 
86
-$di->set('flash', function () {
86
+$di->set('flash', function() {
87 87
     return new Flash([
88 88
         'error' => 'alert alert-danger',
89 89
         'success' => 'alert alert-success',
@@ -92,21 +92,21 @@  discard block
 block discarded – undo
92 92
     ]);
93 93
 });
94 94
 
95
-$di->set('session', function () {
95
+$di->set('session', function() {
96 96
     $session = new SessionAdapter();
97 97
     $session->start();
98 98
 
99 99
     return $session;
100 100
 });
101 101
 
102
-$di->set('dispatcher', function () {
102
+$di->set('dispatcher', function() {
103 103
     $dispatcher = new Dispatcher();
104 104
     $dispatcher->setDefaultNamespace('Sonohini\Controllers');
105 105
 
106 106
     return $dispatcher;
107 107
 });
108 108
 
109
-$di->set('security', function () {
109
+$di->set('security', function() {
110 110
     return new Security();
111 111
 });
112 112
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
       return new ModelsManager();
115 115
  });
116 116
 
117
-$di->setShared('yarak', function () {
117
+$di->setShared('yarak', function() {
118 118
     $config = $this->getConfig();
119 119
 
120 120
     return new Kernel([
Please login to merge, or discard this patch.
app/database/migrations/2017_03_13_224917_create_test_table.php 1 patch
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -1,8 +1,5 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-use Phalcon\Db\Index;
4
-use Phalcon\Db\Column;
5
-use Phalcon\Db\Reference;
6 3
 use Phalcon\Db\Adapter\Pdo;
7 4
 use Yarak\Migrations\Migration;
8 5
 
Please login to merge, or discard this patch.
app/config/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,12 +4,12 @@
 block discarded – undo
4 4
  * This file bootstraps the Codeception test suite.
5 5
  */
6 6
 
7
-$config = include __DIR__ . '/config.php';
7
+$config = include __DIR__.'/config.php';
8 8
 
9
-include __DIR__ . '/loader.php';
9
+include __DIR__.'/loader.php';
10 10
 
11 11
 $di = new \Phalcon\DI\FactoryDefault();
12 12
 
13
-include __DIR__ . '/services.php';
13
+include __DIR__.'/services.php';
14 14
 
15 15
 return new \Phalcon\Mvc\Application($di);
Please login to merge, or discard this patch.
app/config/config.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
  * Modified: prepend directory path of current file, because of this file own different ENV under between Apache and command line.
4 4
  * NOTE: please remove this comment.
5 5
  */
6
-defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__) . '/../..'));
7
-defined('APP_PATH') || define('APP_PATH', BASE_PATH . '/app');
6
+defined('BASE_PATH') || define('BASE_PATH', getenv('BASE_PATH') ?: realpath(dirname(__FILE__).'/../..'));
7
+defined('APP_PATH') || define('APP_PATH', BASE_PATH.'/app');
8 8
 
9 9
 return new \Phalcon\Config([
10 10
     'database' => [
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
         'charset'     => 'utf8',
17 17
     ],
18 18
     'application' => [
19
-        'appDir'         => APP_PATH . '/',
20
-        'controllersDir' => APP_PATH . '/controllers/',
21
-        'modelsDir'      => APP_PATH . '/models/',
22
-        'migrationsDir'  => APP_PATH . '/database/migrations/',
23
-        'viewsDir'       => APP_PATH . '/views/',
24
-        'pluginsDir'     => APP_PATH . '/plugins/',
25
-        'servicesDir'    => APP_PATH . '/services/',
26
-        'cacheDir'       => BASE_PATH . '/cache/',
27
-        'formsDir'       => APP_PATH . '/forms',
19
+        'appDir'         => APP_PATH.'/',
20
+        'controllersDir' => APP_PATH.'/controllers/',
21
+        'modelsDir'      => APP_PATH.'/models/',
22
+        'migrationsDir'  => APP_PATH.'/database/migrations/',
23
+        'viewsDir'       => APP_PATH.'/views/',
24
+        'pluginsDir'     => APP_PATH.'/plugins/',
25
+        'servicesDir'    => APP_PATH.'/services/',
26
+        'cacheDir'       => BASE_PATH.'/cache/',
27
+        'formsDir'       => APP_PATH.'/forms',
28 28
         'baseUri'        => '/',
29 29
     ]
30 30
 ]);
Please login to merge, or discard this patch.