Skip to content

Commit ab14ffb

Browse files
committed
PHP linting
1 parent a8d6efe commit ab14ffb

File tree

3 files changed

+79
-77
lines changed

3 files changed

+79
-77
lines changed

src/MaterializeCSS.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
<?php
22

3-
namespace Skydiver\LaravelMaterializeCSS;
3+
namespace Skydiver\LaravelMaterializeCSS;
44

5-
use Illuminate\Support\Facades\Facade;
5+
use Illuminate\Support\Facades\Facade;
66

7-
class MaterializeCSS extends Facade {
8-
9-
protected static function getFacadeAccessor() { return 'materialize-css'; }
7+
class MaterializeCSS extends Facade {
108

9+
protected static function getFacadeAccessor() {
10+
return 'materialize-css';
1111
}
1212

13+
}
14+
1315
?>

src/MaterializeCSSBuilder.php

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,73 @@
11
<?php
22

3-
namespace Skydiver\LaravelMaterializeCSS;
3+
namespace Skydiver\LaravelMaterializeCSS;
44

5-
class MaterializeCSSBuilder {
5+
class MaterializeCSSBuilder {
66

7-
private static $file_css = '/materialize-css/css/materialize.css';
8-
private static $file_css_min = '/materialize-css/css/materialize.min.css';
9-
private static $file_js = '/materialize-css/js/materialize.js';
10-
private static $file_js_min = '/materialize-css/js/materialize.min.js';
11-
private static $file_jquery = 'jquery-2.1.1.min.js';
7+
private static $file_css = '/materialize-css/css/materialize.css';
8+
private static $file_css_min = '/materialize-css/css/materialize.min.css';
9+
private static $file_js = '/materialize-css/js/materialize.js';
10+
private static $file_js_min = '/materialize-css/js/materialize.min.js';
11+
private static $file_jquery = 'jquery-2.1.1.min.js';
1212

1313

14-
public static function include_full() {
15-
$return = self::include_css();
16-
$return .= self::tag_js('https://code.jquery.com/'.self::$file_jquery);
17-
$return .= self::include_js();
18-
return $return;
19-
}
14+
public static function include_full() {
15+
$return = self::include_css();
16+
$return .= self::tag_js('https://code.jquery.com/'.self::$file_jquery);
17+
$return .= self::include_js();
18+
return $return;
19+
}
2020

21-
public static function include_all() {
22-
$return = self::include_css();
23-
$return .= self::include_js();
24-
return $return;
25-
}
21+
public static function include_all() {
22+
$return = self::include_css();
23+
$return .= self::include_js();
24+
return $return;
25+
}
2626

27-
public static function include_css() {
28-
return self::tag_css(asset(self::$file_css_min));
29-
}
27+
public static function include_css() {
28+
return self::tag_css(asset(self::$file_css_min));
29+
}
3030

31-
public static function include_js() {
32-
return self::tag_js(asset(self::$file_js_min));
33-
}
31+
public static function include_js() {
32+
return self::tag_js(asset(self::$file_js_min));
33+
}
3434

35-
public static function include_secure_css() {
36-
return self::tag_css(secure_asset(self::$file_css_min));
37-
}
35+
public static function include_secure_css() {
36+
return self::tag_css(secure_asset(self::$file_css_min));
37+
}
3838

39-
public static function include_secure_js() {
40-
return self::tag_js(secure_asset(self::$file_js_min));
41-
}
39+
public static function include_secure_js() {
40+
return self::tag_js(secure_asset(self::$file_js_min));
41+
}
4242

43-
public static function get_url_css($full=false, $secure=false) {
44-
if($full == true && $secure == true) {
45-
return secure_asset(self::$file_css_min);
46-
}
47-
if($full == true && $secure == false) {
48-
return asset(self::$file_css_min);
49-
}
50-
return self::$file_css_min;
43+
public static function get_url_css($full=false, $secure=false) {
44+
if($full == true && $secure == true) {
45+
return secure_asset(self::$file_css_min);
5146
}
52-
53-
public static function get_url_js($full=false, $secure=false) {
54-
if($full == true && $secure == true) {
55-
return secure_asset(self::$file_js_min);
56-
}
57-
if($full == true && $secure == false) {
58-
return asset(self::$file_js_min);
59-
}
60-
return self::$file_js_min;
47+
if($full == true && $secure == false) {
48+
return asset(self::$file_css_min);
6149
}
50+
return self::$file_css_min;
51+
}
6252

63-
private static function tag_css($path) {
64-
return '<link rel="stylesheet" charset="utf-8" href="'.$path.'">';
53+
public static function get_url_js($full=false, $secure=false) {
54+
if($full == true && $secure == true) {
55+
return secure_asset(self::$file_js_min);
6556
}
66-
67-
private static function tag_js($path) {
68-
return '<script type="text/javascript" src="'.$path.'"></script>';
57+
if($full == true && $secure == false) {
58+
return asset(self::$file_js_min);
6959
}
60+
return self::$file_js_min;
61+
}
62+
63+
private static function tag_css($path) {
64+
return '<link rel="stylesheet" charset="utf-8" href="'.$path.'">';
65+
}
7066

67+
private static function tag_js($path) {
68+
return '<script type="text/javascript" src="'.$path.'"></script>';
7169
}
7270

71+
}
72+
7373
?>

src/MaterializeCSSServiceProvider.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<?php
22

3-
namespace Skydiver\LaravelMaterializeCSS;
3+
namespace Skydiver\LaravelMaterializeCSS;
44

5-
use Illuminate\Support\ServiceProvider;
5+
use Illuminate\Support\ServiceProvider;
66

7-
class MaterializeCSSServiceProvider extends ServiceProvider {
7+
class MaterializeCSSServiceProvider extends ServiceProvider {
88

9-
protected $defer = true;
9+
protected $defer = true;
1010

11-
public function register() {
12-
$this->publishes([
13-
__DIR__.'/../assets' => public_path('materialize-css'),
14-
], 'materializecss');
15-
$this->registerMaterializeCSSBuilder();
16-
$this->app->alias('materialize-css', 'Skydiver\LaravelMaterializeCSS\MaterializeCSSBuilder');
17-
}
18-
19-
protected function registerMaterializeCSSBuilder() {
20-
$this->app->singleton('materialize-css', function($app) {
21-
return new MaterializeCSSBuilder($app['url']);
22-
});
23-
}
11+
public function register() {
12+
$this->publishes([
13+
__DIR__.'/../assets' => public_path('materialize-css'),
14+
], 'materializecss');
15+
$this->registerMaterializeCSSBuilder();
16+
$this->app->alias('materialize-css', 'Skydiver\LaravelMaterializeCSS\MaterializeCSSBuilder');
17+
}
2418

25-
public function provides() {
26-
return array('materialize-css');
27-
}
19+
protected function registerMaterializeCSSBuilder() {
20+
$this->app->singleton('materialize-css', function ($app) {
21+
return new MaterializeCSSBuilder($app['url']);
22+
});
23+
}
2824

25+
public function provides() {
26+
return array('materialize-css');
2927
}
3028

29+
}
30+
3131
?>

0 commit comments

Comments
 (0)