Passed
Pull Request — main (#1)
by Roman
02:09
created
src/lang/kz/mdp.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -1,42 +1,42 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 return [
4
-    'labels' => [
5
-        'fixed-plugin' => [
6
-            'sidebar_filter' => 'Бүйірлік тақта сүзгісі',
7
-            'sidebar_background' => 'Бүйірлік тақтаның фоны',
8
-            'images' => 'Суреттер',
9
-        ],
10
-        'nav_bar' => [
11
-            'toggle_nav' => 'Навигацияны ауыстыру',
12
-            'search' => [
13
-                'placeholder' => 'Іздеу...',
14
-            ],
15
-            'profile' => 'Профиль',
16
-            'settings' => 'Параметрлер',
17
-            'log_out' => 'Жүйеден шығу',
18
-        ]
19
-    ],
20
-    'layouts' => [
21
-        'user' => [
22
-            'auth-v1' => [
23
-                'sign_up' => 'Тіркелу',
24
-                'sign_in' => 'Кіру',
25
-            ]
26
-        ]
27
-    ],
28
-    'forms' => [
29
-        'user' => [
30
-            'labels' => [
31
-                'sign_in' => 'Логин',
32
-                'submit' => 'Жүйеге кіру'
33
-            ],
34
-            'sign_in' => [
35
-                'placeholders' => [
36
-                    'email' => '[email protected]',
37
-                    'password' => '********'
38
-                ]
39
-            ]
40
-        ]
41
-    ]
4
+	'labels' => [
5
+		'fixed-plugin' => [
6
+			'sidebar_filter' => 'Бүйірлік тақта сүзгісі',
7
+			'sidebar_background' => 'Бүйірлік тақтаның фоны',
8
+			'images' => 'Суреттер',
9
+		],
10
+		'nav_bar' => [
11
+			'toggle_nav' => 'Навигацияны ауыстыру',
12
+			'search' => [
13
+				'placeholder' => 'Іздеу...',
14
+			],
15
+			'profile' => 'Профиль',
16
+			'settings' => 'Параметрлер',
17
+			'log_out' => 'Жүйеден шығу',
18
+		]
19
+	],
20
+	'layouts' => [
21
+		'user' => [
22
+			'auth-v1' => [
23
+				'sign_up' => 'Тіркелу',
24
+				'sign_in' => 'Кіру',
25
+			]
26
+		]
27
+	],
28
+	'forms' => [
29
+		'user' => [
30
+			'labels' => [
31
+				'sign_in' => 'Логин',
32
+				'submit' => 'Жүйеге кіру'
33
+			],
34
+			'sign_in' => [
35
+				'placeholders' => [
36
+					'email' => '[email protected]',
37
+					'password' => '********'
38
+				]
39
+			]
40
+		]
41
+	]
42 42
 ];
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
src/Providers/CoreServiceProvider.php 2 patches
Indentation   +134 added lines, -134 removed lines patch added patch discarded remove patch
@@ -13,138 +13,138 @@
 block discarded – undo
13 13
 
14 14
 class CoreServiceProvider extends ServiceProvider
15 15
 {
16
-    public const VIEWS_NAMESPACE = 'mdp';
17
-
18
-    public function register(): void
19
-    {
20
-    }
21
-
22
-    public function boot(Factory $view): void
23
-    {
24
-        $this->registerPublishableConfigs();
25
-        $this->registerPublishableAssets();
26
-        $this->registerViews();
27
-        $this->registerViewComposers($view);
28
-        $this->registerRoutes();
29
-        $this->registerLocales();
30
-        $this->registerComponents();
31
-    }
32
-
33
-    /**
34
-     * @return void
35
-     */
36
-    public function registerComponents(): void
37
-    {
38
-        /** @var ComponentRegistrar $registrar */
39
-        $registrar = resolve(ComponentRegistrar::class);
40
-        $registrar->register();
41
-    }
42
-
43
-    public function registerPublishableConfigs(): void
44
-    {
45
-        $baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..';
46
-        $configs = sprintf('%s%s%s', $baseDir, DIRECTORY_SEPARATOR, 'config');
47
-        $mdpCoreConfig = sprintf(
48
-            '%s%s%s%s%s',
49
-            $configs,
50
-            DIRECTORY_SEPARATOR,
51
-            'mdp',
52
-            DIRECTORY_SEPARATOR,
53
-            'core.php'
54
-        );
55
-
56
-        $mdpMenuConfig = sprintf(
57
-            '%s%s%s%s%s',
58
-            $configs,
59
-            DIRECTORY_SEPARATOR,
60
-            'mdp',
61
-            DIRECTORY_SEPARATOR,
62
-            'menu.php'
63
-        );
64
-
65
-        $this->publishes(
66
-            [
67
-                $mdpCoreConfig => config_path(
68
-                    sprintf(
69
-                        '%s%s%s',
70
-                        'mdp',
71
-                        DIRECTORY_SEPARATOR,
72
-                        'core.php'
73
-                    )
74
-                ),
75
-                $mdpMenuConfig => config_path(
76
-                    sprintf(
77
-                        '%s%s%s',
78
-                        'mdp',
79
-                        DIRECTORY_SEPARATOR,
80
-                        'menu.php'
81
-                    )
82
-                ),
83
-            ]
84
-        );
85
-    }
86
-
87
-    public function registerPublishableAssets(): void
88
-    {
89
-        $packagePublic = __DIR__ . DIRECTORY_SEPARATOR .
90
-            '..' . DIRECTORY_SEPARATOR .
91
-            'resources' . DIRECTORY_SEPARATOR .
92
-            'assets';
93
-
94
-        $this->publishes(
95
-            [
96
-                $packagePublic => public_path('assets/mdp'),
97
-            ]
98
-        );
99
-    }
100
-
101
-    public function registerViews(): void
102
-    {
103
-        $this->loadViewsFrom(
104
-            __DIR__ . DIRECTORY_SEPARATOR .
105
-            '..' . DIRECTORY_SEPARATOR .
106
-            'resources' . DIRECTORY_SEPARATOR .
107
-            'views',
108
-            static::VIEWS_NAMESPACE
109
-        );
110
-    }
111
-
112
-    public function registerViewComposers(Factory $view): void
113
-    {
114
-        $view->composer('mdp::layouts.user.auth-v1', MdpViewComposer::class);
115
-        $view->composer('mdp::layouts.main', MdpViewComposer::class);
116
-    }
117
-
118
-    public function registerRoutes(): void
119
-    {
120
-        if (Config::get('mdp.core.module.routes.enabled', false)) {
121
-            $this->loadRoutesFrom(
122
-                __DIR__ . DIRECTORY_SEPARATOR .
123
-                '..' . DIRECTORY_SEPARATOR .
124
-                'routes' . DIRECTORY_SEPARATOR .
125
-                'mdp' . DIRECTORY_SEPARATOR .
126
-                'auth.php'
127
-            );
128
-
129
-            $this->loadRoutesFrom(
130
-                __DIR__ . DIRECTORY_SEPARATOR .
131
-                '..' . DIRECTORY_SEPARATOR .
132
-                'routes' . DIRECTORY_SEPARATOR .
133
-                'mdp' . DIRECTORY_SEPARATOR .
134
-                'dashboard.php'
135
-            );
136
-        }
137
-    }
138
-
139
-    public function registerLocales(): void
140
-    {
141
-        $baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..';
142
-        $locales = sprintf('%s%s%s', $baseDir, DIRECTORY_SEPARATOR, 'lang');
143
-
144
-        $this->publishes([
145
-            sprintf('%s/%s/mdp.php', $locales, 'ua') => lang_path(sprintf('%s/mdp.php', 'ua')),
146
-            sprintf('%s/%s/mdp.php', $locales, 'en') => lang_path(sprintf('%s/mdp.php', 'en')),
147
-            sprintf('%s/%s/mdp.php', $locales, 'kz') => lang_path(sprintf('%s/mdp.php', 'kz')),
148
-        ]);
149
-    }
16
+	public const VIEWS_NAMESPACE = 'mdp';
17
+
18
+	public function register(): void
19
+	{
20
+	}
21
+
22
+	public function boot(Factory $view): void
23
+	{
24
+		$this->registerPublishableConfigs();
25
+		$this->registerPublishableAssets();
26
+		$this->registerViews();
27
+		$this->registerViewComposers($view);
28
+		$this->registerRoutes();
29
+		$this->registerLocales();
30
+		$this->registerComponents();
31
+	}
32
+
33
+	/**
34
+	 * @return void
35
+	 */
36
+	public function registerComponents(): void
37
+	{
38
+		/** @var ComponentRegistrar $registrar */
39
+		$registrar = resolve(ComponentRegistrar::class);
40
+		$registrar->register();
41
+	}
42
+
43
+	public function registerPublishableConfigs(): void
44
+	{
45
+		$baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..';
46
+		$configs = sprintf('%s%s%s', $baseDir, DIRECTORY_SEPARATOR, 'config');
47
+		$mdpCoreConfig = sprintf(
48
+			'%s%s%s%s%s',
49
+			$configs,
50
+			DIRECTORY_SEPARATOR,
51
+			'mdp',
52
+			DIRECTORY_SEPARATOR,
53
+			'core.php'
54
+		);
55
+
56
+		$mdpMenuConfig = sprintf(
57
+			'%s%s%s%s%s',
58
+			$configs,
59
+			DIRECTORY_SEPARATOR,
60
+			'mdp',
61
+			DIRECTORY_SEPARATOR,
62
+			'menu.php'
63
+		);
64
+
65
+		$this->publishes(
66
+			[
67
+				$mdpCoreConfig => config_path(
68
+					sprintf(
69
+						'%s%s%s',
70
+						'mdp',
71
+						DIRECTORY_SEPARATOR,
72
+						'core.php'
73
+					)
74
+				),
75
+				$mdpMenuConfig => config_path(
76
+					sprintf(
77
+						'%s%s%s',
78
+						'mdp',
79
+						DIRECTORY_SEPARATOR,
80
+						'menu.php'
81
+					)
82
+				),
83
+			]
84
+		);
85
+	}
86
+
87
+	public function registerPublishableAssets(): void
88
+	{
89
+		$packagePublic = __DIR__ . DIRECTORY_SEPARATOR .
90
+			'..' . DIRECTORY_SEPARATOR .
91
+			'resources' . DIRECTORY_SEPARATOR .
92
+			'assets';
93
+
94
+		$this->publishes(
95
+			[
96
+				$packagePublic => public_path('assets/mdp'),
97
+			]
98
+		);
99
+	}
100
+
101
+	public function registerViews(): void
102
+	{
103
+		$this->loadViewsFrom(
104
+			__DIR__ . DIRECTORY_SEPARATOR .
105
+			'..' . DIRECTORY_SEPARATOR .
106
+			'resources' . DIRECTORY_SEPARATOR .
107
+			'views',
108
+			static::VIEWS_NAMESPACE
109
+		);
110
+	}
111
+
112
+	public function registerViewComposers(Factory $view): void
113
+	{
114
+		$view->composer('mdp::layouts.user.auth-v1', MdpViewComposer::class);
115
+		$view->composer('mdp::layouts.main', MdpViewComposer::class);
116
+	}
117
+
118
+	public function registerRoutes(): void
119
+	{
120
+		if (Config::get('mdp.core.module.routes.enabled', false)) {
121
+			$this->loadRoutesFrom(
122
+				__DIR__ . DIRECTORY_SEPARATOR .
123
+				'..' . DIRECTORY_SEPARATOR .
124
+				'routes' . DIRECTORY_SEPARATOR .
125
+				'mdp' . DIRECTORY_SEPARATOR .
126
+				'auth.php'
127
+			);
128
+
129
+			$this->loadRoutesFrom(
130
+				__DIR__ . DIRECTORY_SEPARATOR .
131
+				'..' . DIRECTORY_SEPARATOR .
132
+				'routes' . DIRECTORY_SEPARATOR .
133
+				'mdp' . DIRECTORY_SEPARATOR .
134
+				'dashboard.php'
135
+			);
136
+		}
137
+	}
138
+
139
+	public function registerLocales(): void
140
+	{
141
+		$baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..';
142
+		$locales = sprintf('%s%s%s', $baseDir, DIRECTORY_SEPARATOR, 'lang');
143
+
144
+		$this->publishes([
145
+			sprintf('%s/%s/mdp.php', $locales, 'ua') => lang_path(sprintf('%s/mdp.php', 'ua')),
146
+			sprintf('%s/%s/mdp.php', $locales, 'en') => lang_path(sprintf('%s/mdp.php', 'en')),
147
+			sprintf('%s/%s/mdp.php', $locales, 'kz') => lang_path(sprintf('%s/mdp.php', 'kz')),
148
+		]);
149
+	}
150 150
 }
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function registerPublishableConfigs(): void
44 44
     {
45
-        $baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..';
45
+        $baseDir = __DIR__.DIRECTORY_SEPARATOR.'..';
46 46
         $configs = sprintf('%s%s%s', $baseDir, DIRECTORY_SEPARATOR, 'config');
47 47
         $mdpCoreConfig = sprintf(
48 48
             '%s%s%s%s%s',
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
 
87 87
     public function registerPublishableAssets(): void
88 88
     {
89
-        $packagePublic = __DIR__ . DIRECTORY_SEPARATOR .
90
-            '..' . DIRECTORY_SEPARATOR .
91
-            'resources' . DIRECTORY_SEPARATOR .
89
+        $packagePublic = __DIR__.DIRECTORY_SEPARATOR.
90
+            '..'.DIRECTORY_SEPARATOR.
91
+            'resources'.DIRECTORY_SEPARATOR.
92 92
             'assets';
93 93
 
94 94
         $this->publishes(
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
     public function registerViews(): void
102 102
     {
103 103
         $this->loadViewsFrom(
104
-            __DIR__ . DIRECTORY_SEPARATOR .
105
-            '..' . DIRECTORY_SEPARATOR .
106
-            'resources' . DIRECTORY_SEPARATOR .
104
+            __DIR__.DIRECTORY_SEPARATOR.
105
+            '..'.DIRECTORY_SEPARATOR.
106
+            'resources'.DIRECTORY_SEPARATOR.
107 107
             'views',
108 108
             static::VIEWS_NAMESPACE
109 109
         );
@@ -119,18 +119,18 @@  discard block
 block discarded – undo
119 119
     {
120 120
         if (Config::get('mdp.core.module.routes.enabled', false)) {
121 121
             $this->loadRoutesFrom(
122
-                __DIR__ . DIRECTORY_SEPARATOR .
123
-                '..' . DIRECTORY_SEPARATOR .
124
-                'routes' . DIRECTORY_SEPARATOR .
125
-                'mdp' . DIRECTORY_SEPARATOR .
122
+                __DIR__.DIRECTORY_SEPARATOR.
123
+                '..'.DIRECTORY_SEPARATOR.
124
+                'routes'.DIRECTORY_SEPARATOR.
125
+                'mdp'.DIRECTORY_SEPARATOR.
126 126
                 'auth.php'
127 127
             );
128 128
 
129 129
             $this->loadRoutesFrom(
130
-                __DIR__ . DIRECTORY_SEPARATOR .
131
-                '..' . DIRECTORY_SEPARATOR .
132
-                'routes' . DIRECTORY_SEPARATOR .
133
-                'mdp' . DIRECTORY_SEPARATOR .
130
+                __DIR__.DIRECTORY_SEPARATOR.
131
+                '..'.DIRECTORY_SEPARATOR.
132
+                'routes'.DIRECTORY_SEPARATOR.
133
+                'mdp'.DIRECTORY_SEPARATOR.
134 134
                 'dashboard.php'
135 135
             );
136 136
         }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
     public function registerLocales(): void
140 140
     {
141
-        $baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..';
141
+        $baseDir = __DIR__.DIRECTORY_SEPARATOR.'..';
142 142
         $locales = sprintf('%s%s%s', $baseDir, DIRECTORY_SEPARATOR, 'lang');
143 143
 
144 144
         $this->publishes([
Please login to merge, or discard this patch.
src/View/Components/Widgets/Component.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,10 +6,10 @@
 block discarded – undo
6 6
 
7 7
 abstract class Component extends \Illuminate\View\Component
8 8
 {
9
-    protected static string $name;
9
+	protected static string $name;
10 10
 
11
-    public static function getComponentName(): string
12
-    {
13
-        return self::$name;
14
-    }
11
+	public static function getComponentName(): string
12
+	{
13
+		return self::$name;
14
+	}
15 15
 }
16 16
\ No newline at end of file
Please login to merge, or discard this patch.
src/View/Components/Widgets/CardWidget.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -7,24 +7,24 @@
 block discarded – undo
7 7
 class CardWidget extends Component
8 8
 {
9 9
 
10
-    protected static string $name = 'card-widget';
10
+	protected static string $name = 'card-widget';
11 11
 
12
-    public function __construct(public string $title, public string $description)
13
-    {
14
-    }
12
+	public function __construct(public string $title, public string $description)
13
+	{
14
+	}
15 15
 
16
-    /**
17
-     * @inheritDoc
18
-     */
19
-    public function render(): string
20
-    {
21
-        return view(
22
-            sprintf(
23
-                '%s::%s',
24
-                CoreServiceProvider::VIEWS_NAMESPACE,
25
-                'elements.widgets.simple-card'
26
-            )
27
-        )
28
-            ->render();
29
-    }
16
+	/**
17
+	 * @inheritDoc
18
+	 */
19
+	public function render(): string
20
+	{
21
+		return view(
22
+			sprintf(
23
+				'%s::%s',
24
+				CoreServiceProvider::VIEWS_NAMESPACE,
25
+				'elements.widgets.simple-card'
26
+			)
27
+		)
28
+			->render();
29
+	}
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
src/View/Components/ComponentRegistrar.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -7,20 +7,20 @@
 block discarded – undo
7 7
 
8 8
 final class ComponentRegistrar
9 9
 {
10
-    private array $components = [
11
-        CardWidget::class
12
-    ];
10
+	private array $components = [
11
+		CardWidget::class
12
+	];
13 13
 
14
-    public function register(): void
15
-    {
16
-        array_map(
17
-            fn(string $class) => Blade::component(
18
-                forward_static_call(
19
-                    sprintf('%s::getComponentName', $class)
20
-                ),
21
-                $class
22
-            ),
23
-            $this->components
24
-        );
25
-    }
14
+	public function register(): void
15
+	{
16
+		array_map(
17
+			fn(string $class) => Blade::component(
18
+				forward_static_call(
19
+					sprintf('%s::getComponentName', $class)
20
+				),
21
+				$class
22
+			),
23
+			$this->components
24
+		);
25
+	}
26 26
 }
27 27
\ No newline at end of file
Please login to merge, or discard this patch.