Completed
Push — master ( f394ee...499a1d )
by Korotkov
12s
created
app/Http/Supports/TwigFunctions.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,32 +13,32 @@
 block discarded – undo
13 13
     {
14 14
         parent::templateEngine($config);
15 15
 
16
-        $d = new Twig_SimpleFunction('d', function ($var) {
16
+        $d = new Twig_SimpleFunction('d', function($var) {
17 17
             return d($var);
18 18
         });
19 19
 
20 20
         $this->getTwig()->addFunction($d);
21 21
 
22
-        $date = new Twig_SimpleFunction('date', function ($var) {
22
+        $date = new Twig_SimpleFunction('date', function($var) {
23 23
             return date($var);
24 24
         });
25 25
 
26 26
         $this->getTwig()->addFunction($date);
27 27
 
28
-        $auth = new Twig_SimpleFunction('auth', function () {
28
+        $auth = new Twig_SimpleFunction('auth', function() {
29 29
             return $this->container()->get('auth')->access(true);
30 30
         });
31 31
 
32 32
         $this->getTwig()->addFunction($auth);
33 33
 
34 34
 
35
-        $active = new Twig_SimpleFunction('active', function ($var) {
35
+        $active = new Twig_SimpleFunction('active', function($var) {
36 36
             return $this->container()->get('pagination')->activeClass($var);
37 37
         });
38 38
 
39 39
         $this->getTwig()->addFunction($active);
40 40
 
41
-        $strstr = new Twig_SimpleFunction('strstr', function ($var) {
41
+        $strstr = new Twig_SimpleFunction('strstr', function($var) {
42 42
             return strstr($var, '<a id="strstr" name="strstr"></a>', true);
43 43
         });
44 44
 
Please login to merge, or discard this patch.
app/route.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
      */
18 18
     public function run(Router $router)
19 19
     {
20
-        $router->annotation('MainController');              // mainpage
20
+        $router->annotation('MainController'); // mainpage
21 21
 
22 22
         $router->middleware('get', [
23 23
             'pattern'     => '123/123',
Please login to merge, or discard this patch.
app/app.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,9 +17,9 @@
 block discarded – undo
17 17
         'annotation' => ['Rudra\Annotations'],
18 18
         'validation' => ['Rudra\Validation'],
19 19
         'auth'       => ['Rudra\Auth'],
20
-        'redirect'   => ['Rudra\Redirect',  ['config'    => Container::$app->config('uri')]],
20
+        'redirect'   => ['Rudra\Redirect', ['config'    => Container::$app->config('uri')]],
21 21
         'dbClass'    => ['Rudra\ConnectDB', ['config'    => Container::$app->config('database')]],
22
-        'router'     => ['Rudra\Router',    ['namespace' => Container::$app->config('default.namespace'), 'templateEngine' => Container::$app->config('template.engine')]],
22
+        'router'     => ['Rudra\Router', ['namespace' => Container::$app->config('default.namespace'), 'templateEngine' => Container::$app->config('template.engine')]],
23 23
         'route'      => ['App\Route']
24 24
     ]
25 25
 ];
Please login to merge, or discard this patch.
app/Http/Supports/CommonHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
     /**
65 65
      * @param $value
66 66
      *
67
-     * @return int
67
+     * @return string
68 68
      */
69 69
     public function checkbox($value)
70 70
     {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
      */
13 13
     protected function getIdFromSlug(string $slug) :string
14 14
     {
15
-      $slug = strip_tags($slug);
15
+        $slug = strip_tags($slug);
16 16
 
17
-      return (strpos($slug, '_') !== false) ? strstr($slug, '_', true) : $slug;
17
+        return (strpos($slug, '_') !== false) ? strstr($slug, '_', true) : $slug;
18 18
     }
19 19
 
20 20
     /**
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected function redirectToSelf(string $uri)
26 26
     {
27
-      $page = $this->validation()->sanitize($this->post('page'))->required()->run();
27
+        $page = $this->validation()->sanitize($this->post('page'))->required()->run();
28 28
 
29
-      if ($this->validation()->access($page)) {
29
+        if ($this->validation()->access($page)) {
30 30
         return $this->redirect($uri . '/page/' . $page[0]);
31
-      }
31
+        }
32 32
 
33
-      return $this->redirect($uri);
33
+        return $this->redirect($uri);
34 34
     }
35 35
 
36 36
     /**
Please login to merge, or discard this patch.