Skip to content

Commit 50c58be

Browse files
committed
PSR-2 Coding Style
1 parent 68c5d4f commit 50c58be

File tree

2 files changed

+360
-450
lines changed

2 files changed

+360
-450
lines changed

samples/sample.php

Lines changed: 91 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,101 @@
11
<?php
22

3-
/**
4-
* Copyright tureki.org [tureki11@gmail.com]
5-
*
6-
* Licensed under the Apache License, Version 2.0 (the "License");
7-
* you may not use this file except in compliance with the License.
8-
* You may obtain a copy of the License at
9-
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
11-
*
12-
* Unless required by applicable law or agreed to in writing, software
13-
* distributed under the License is distributed on an "AS IS" BASIS,
14-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
* See the License for the specific language governing permissions and
16-
* limitations under the License.
17-
*/
3+
/**
4+
*include library.
5+
*/
6+
require '../src/tureki/phpcc.php';
187

19-
/**
20-
*include library
21-
*/
22-
require '../src/tureki/phpcc.php';
8+
/*
9+
* java_file
10+
*
11+
* Linux "/usr/lib/jvm/jre-1.6.0/bin/java"
12+
* Window7 "C:\Program Files (x86)\Java\jre6\bin\java"
13+
*/
2314

24-
/**
25-
* java_file
26-
*
27-
* Linux "/usr/lib/jvm/jre-1.6.0/bin/java"
28-
* Window7 "C:\Program Files (x86)\Java\jre6\bin\java"
29-
*/
15+
/*
16+
* jar_file
17+
*
18+
* You can download source from http://code.google.com/p/closure-compiler/wiki/BinaryDownloads
19+
*/
3020

31-
/**
32-
* jar_file
33-
*
34-
* You can download source from http://code.google.com/p/closure-compiler/wiki/BinaryDownloads
35-
*/
36-
37-
/**
38-
* output_path
39-
*
40-
* Output path of compress file when success
41-
*/
42-
43-
/**
44-
* phpcc config
45-
* @var phpcc
46-
*/
47-
$phpcc = new tureki\PhpCc(array(
48-
'java_file' => 'YOUR_JAVA_FILE_PATH',
49-
'output_path' => './output/',
50-
'optimization' => 'SIMPLE_OPTIMIZATIONS',
51-
'charset' => 'utf-8'
52-
));
21+
/*
22+
* output_path
23+
*
24+
* Output path of compress file when success
25+
*/
5326

54-
/**
55-
* Test your phpcc setting.
56-
*/
57-
print_r($phpcc->help());
27+
/*
28+
* phpcc config
29+
* @var phpcc
30+
*/
31+
$phpcc = new tureki\PhpCc(array(
32+
'java_file' => 'YOUR_JAVA_FILE_PATH',
33+
'output_path' => './output/',
34+
'optimization' => 'SIMPLE_OPTIMIZATIONS',
35+
'charset' => 'utf-8',
36+
));
5837

59-
/**
60-
* Add jQuery file and combined compression
61-
*/
62-
// $ary_result = $phpcc
63-
// ->add("js/jquery-1.10.2.js")
64-
// ->add("js/1.9/jquery-1.9.1.js")
65-
// ->exec("all.js");
66-
// print_r($ary_result);
38+
/*
39+
* Test your phpcc setting.
40+
*/
41+
print_r($phpcc->help());
6742

68-
/**
69-
* Add jQuery file and individual compression
70-
*/
71-
// $phpcc->reset();
72-
// $ary_result = $phpcc
73-
// ->add("js/jquery-1.10.2.js")
74-
// ->add("js/1.9/jquery-1.9.1.js")
75-
// ->single()
76-
// ->exec();
77-
// print_r($ary_result);
43+
/*
44+
* Add jQuery file and combined compression
45+
*/
46+
// $ary_result = $phpcc
47+
// ->add("js/jquery-1.10.2.js")
48+
// ->add("js/1.9/jquery-1.9.1.js")
49+
// ->exec("all.js");
50+
// print_r($ary_result);
7851

79-
/**
80-
* Set Directory path find .js file and combined compression to one file.
81-
*/
82-
// $phpcc->reset();
83-
// $ary_result = $phpcc
84-
// ->setDir("js")
85-
// ->exec("all.js");
86-
// print_r($ary_result);
52+
/*
53+
* Add jQuery file and individual compression
54+
*/
55+
// $phpcc->reset();
56+
// $ary_result = $phpcc
57+
// ->add("js/jquery-1.10.2.js")
58+
// ->add("js/1.9/jquery-1.9.1.js")
59+
// ->single()
60+
// ->exec();
61+
// print_r($ary_result);
8762

88-
/**
89-
* Set Directory path . Auto find js file and individual compression
90-
*/
91-
// $phpcc->reset();
92-
// $ary_result = $phpcc
93-
// ->setDir("js")
94-
// ->single()
95-
// ->exec();
96-
// print_r($ary_result);
97-
98-
/**
99-
* Mixed
100-
*/
101-
// $phpcc->reset();
102-
// $ary_result = $phpcc
103-
// ->setDir("js")
104-
// ->add("js/1.9/jquery-1.9.1.js")
105-
// ->exec();
106-
// print_r($ary_result);
107-
108-
/**
109-
* You can use param() add Closure Compiler command param.
110-
*/
111-
// $phpcc->reset();
112-
// $ary_result = $phpcc
113-
// ->add("js/jquery-1.10.2.js")
114-
// ->param("--angular_pass")
115-
// ->param("--formatting","PRETTY_PRINT")
116-
// ->exec("all.js");
117-
// print_r($ary_result);
118-
?>
63+
/*
64+
* Set Directory path find .js file and combined compression to one file.
65+
*/
66+
// $phpcc->reset();
67+
// $ary_result = $phpcc
68+
// ->setDir("js")
69+
// ->exec("all.js");
70+
// print_r($ary_result);
71+
72+
/*
73+
* Set Directory path . Auto find js file and individual compression
74+
*/
75+
// $phpcc->reset();
76+
// $ary_result = $phpcc
77+
// ->setDir("js")
78+
// ->single()
79+
// ->exec();
80+
// print_r($ary_result);
81+
82+
/*
83+
* Mixed
84+
*/
85+
// $phpcc->reset();
86+
// $ary_result = $phpcc
87+
// ->setDir("js")
88+
// ->add("js/1.9/jquery-1.9.1.js")
89+
// ->exec();
90+
// print_r($ary_result);
91+
92+
/*
93+
* You can use param() add Closure Compiler command param.
94+
*/
95+
// $phpcc->reset();
96+
// $ary_result = $phpcc
97+
// ->add("js/jquery-1.10.2.js")
98+
// ->param("--angular_pass")
99+
// ->param("--formatting","PRETTY_PRINT")
100+
// ->exec("all.js");
101+
// print_r($ary_result);

0 commit comments

Comments
 (0)