@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | function includeFile($file) |
161 | 161 | { |
162 | 162 | // @todo constant should be removed |
163 | - $file = PATH_INCLUDE_MODULE . $this->module_name . '/' . $file; |
|
163 | + $file = PATH_INCLUDE_MODULE.$this->module_name.'/'.$file; |
|
164 | 164 | if (!file_exists($file)) { |
165 | 165 | return false; |
166 | 166 | } |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | // @todo global should be removed |
220 | 220 | global $_setting; // globalized other places also |
221 | 221 | |
222 | - include(dirname(__FILE__). '/modules/' .$this->module_name.'/'.$file); |
|
222 | + include(dirname(__FILE__).'/modules/'.$this->module_name.'/'.$file); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | */ |
230 | 230 | public function getPath() |
231 | 231 | { |
232 | - return PATH_WWW . 'restricted/module/' . $this->module_name . '/'; |
|
232 | + return PATH_WWW.'restricted/module/'.$this->module_name.'/'; |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | if (is_int($value)) { |
105 | 105 | $this->value['x'] = $this->get('margin_left') + $value; |
106 | 106 | } elseif (is_string($value) && substr($value, 0, 1) == "+") { |
107 | - $this->value['x'] += intval(substr($value, 1)); |
|
107 | + $this->value['x'] += intval(substr($value, 1)); |
|
108 | 108 | } elseif (is_string($value) && substr($value, 0, 1) == "-") { |
109 | 109 | $this->value['x'] -= intval(substr($value, 1)); |
110 | 110 | } else { |
@@ -150,11 +150,11 @@ discard block |
||
150 | 150 | |
151 | 151 | $height = $this->get('header_height'); |
152 | 152 | ; |
153 | - $width = $size[0] * ($height/$size[1]); |
|
153 | + $width = $size[0]*($height/$size[1]); |
|
154 | 154 | |
155 | 155 | if ($width > $this->get('content_width')) { |
156 | 156 | $width = $this->get('content_width'); |
157 | - $height = $size[1] * ($width/$size[0]); |
|
157 | + $height = $size[1]*($width/$size[0]); |
|
158 | 158 | } |
159 | 159 | parent::addJpegFromFile($headerImg, $this->get('right_margin_position') - $width, $this->page_height - $this->get('header_margin_top') - $height, $width, $height); // , ($this->value["page_width"] - $this->value["margin_left"])/10 |
160 | 160 | parent::closeObject(); |
@@ -177,15 +177,15 @@ discard block |
||
177 | 177 | public function roundRectangle($x, $y, $width, $height, $round) |
178 | 178 | { |
179 | 179 | parent::setLineStyle(1); |
180 | - parent::line($x, $y+$round, $x, $y+$height-$round); |
|
181 | - parent::line($x+$round, $y+$height, $x+$width-$round, $y+$height); |
|
182 | - parent::line($x+$width, $y+$height-$round, $x+$width, $y+$round-1); |
|
183 | - parent::line($x+$width-$round, $y, $x+$round, $y); |
|
184 | - |
|
185 | - parent::partEllipse($x+$round, $y+$round, 180, 270, $round); |
|
186 | - parent::partEllipse($x+$round, $y+$height-$round, 90, 180, $round); |
|
187 | - parent::partEllipse($x+$width-$round, $y+$height-$round, 0, 90, $round); |
|
188 | - parent::partEllipse($x+$width-$round, $y+$round, 270, 360, $round); |
|
180 | + parent::line($x, $y + $round, $x, $y + $height - $round); |
|
181 | + parent::line($x + $round, $y + $height, $x + $width - $round, $y + $height); |
|
182 | + parent::line($x + $width, $y + $height - $round, $x + $width, $y + $round - 1); |
|
183 | + parent::line($x + $width - $round, $y, $x + $round, $y); |
|
184 | + |
|
185 | + parent::partEllipse($x + $round, $y + $round, 180, 270, $round); |
|
186 | + parent::partEllipse($x + $round, $y + $height - $round, 90, 180, $round); |
|
187 | + parent::partEllipse($x + $width - $round, $y + $height - $round, 0, 90, $round); |
|
188 | + parent::partEllipse($x + $width - $round, $y + $round, 270, 360, $round); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | /** |
@@ -26,13 +26,13 @@ discard block |
||
26 | 26 | |
27 | 27 | function dropDatabase() |
28 | 28 | { |
29 | - $result = $this->db->query("SHOW TABLES FROM " . DB_NAME); |
|
29 | + $result = $this->db->query("SHOW TABLES FROM ".DB_NAME); |
|
30 | 30 | if (PEAR::isError($result)) { |
31 | 31 | throw new Exception($result->getUserInfo()); |
32 | 32 | } |
33 | 33 | |
34 | 34 | while ($line = $result->fetchRow(MDB2_FETCHMODE_ASSOC)) { |
35 | - $drop = $this->db->exec('DROP TABLE ' . $line['tables_in_' . DB_NAME]); |
|
35 | + $drop = $this->db->exec('DROP TABLE '.$line['tables_in_'.DB_NAME]); |
|
36 | 36 | if (PEAR::IsError($drop)) { |
37 | 37 | throw new Exception($drop->getUserInfo()); |
38 | 38 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | |
43 | 43 | function createDatabaseSchema() |
44 | 44 | { |
45 | - $sql_structure = file_get_contents(dirname(__FILE__) . '/database-structure.sql'); |
|
45 | + $sql_structure = file_get_contents(dirname(__FILE__).'/database-structure.sql'); |
|
46 | 46 | $sql_arr = Intraface_Install::splitSql($sql_structure); |
47 | 47 | |
48 | 48 | foreach ($sql_arr as $sql) { |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | } |
54 | 54 | } |
55 | 55 | |
56 | - $sql_structure = file_get_contents(dirname(__FILE__) . '/database-update.sql'); |
|
56 | + $sql_structure = file_get_contents(dirname(__FILE__).'/database-update.sql'); |
|
57 | 57 | $sql_arr = Intraface_Install::splitSql($sql_structure); |
58 | 58 | |
59 | 59 | foreach ($sql_arr as $sql) { |
@@ -68,12 +68,12 @@ discard block |
||
68 | 68 | |
69 | 69 | function emptyDatabase() |
70 | 70 | { |
71 | - $result = $this->db->query("SHOW TABLES FROM " . DB_NAME); |
|
71 | + $result = $this->db->query("SHOW TABLES FROM ".DB_NAME); |
|
72 | 72 | if (PEAR::isError($result)) { |
73 | 73 | throw new Exception($result->getUserInfo()); |
74 | 74 | } |
75 | 75 | while ($line = $result->fetchRow(MDB2_FETCHMODE_ASSOC)) { |
76 | - $truncate = $this->db->exec('TRUNCATE TABLE ' . $line['Tables_in_'.DB_NAME]); |
|
76 | + $truncate = $this->db->exec('TRUNCATE TABLE '.$line['Tables_in_'.DB_NAME]); |
|
77 | 77 | if (PEAR::IsError($truncate)) { |
78 | 78 | throw new Exception($truncate->getUserInfo()); |
79 | 79 | } |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | function createStartingValues() |
86 | 86 | { |
87 | - $sql_values = file_get_contents(dirname(__FILE__) . '/database-values.sql'); |
|
87 | + $sql_values = file_get_contents(dirname(__FILE__).'/database-values.sql'); |
|
88 | 88 | $sql_arr = Intraface_Install::splitSql($sql_values); |
89 | 89 | |
90 | 90 | foreach ($sql_arr as $sql) { |
@@ -128,15 +128,15 @@ discard block |
||
128 | 128 | |
129 | 129 | function deleteUploadDirectory($f) |
130 | 130 | { |
131 | - if ( is_dir( $f ) ){ |
|
132 | - foreach ( scandir( $f ) as $item ){ |
|
133 | - if ( !strcmp( $item, '.' ) || !strcmp( $item, '..' ) ) |
|
131 | + if (is_dir($f)) { |
|
132 | + foreach (scandir($f) as $item) { |
|
133 | + if (!strcmp($item, '.') || !strcmp($item, '..')) |
|
134 | 134 | continue; |
135 | - $this->deleteUploadDirectory( $f . "/" . $item ); |
|
135 | + $this->deleteUploadDirectory($f."/".$item); |
|
136 | 136 | } |
137 | - rmdir( $f ); |
|
138 | - } else{ |
|
139 | - @unlink( $f ); |
|
137 | + rmdir($f); |
|
138 | + } else { |
|
139 | + @unlink($f); |
|
140 | 140 | } |
141 | 141 | } |
142 | 142 | |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $object_method[0] = str_replace('/', '', $object_method[0]); |
216 | 216 | $object_method[0] = str_replace('\\', '', $object_method[0]); |
217 | 217 | |
218 | - require_once dirname(__FILE__) . '/Helper/'.$object_method[0].'.php'; |
|
218 | + require_once dirname(__FILE__).'/Helper/'.$object_method[0].'.php'; |
|
219 | 219 | $object_name = 'Install_Helper_'.$object_method[0]; |
220 | 220 | $object = new $object_name($kernel, $this->db); |
221 | 221 | $object->$object_method[1](); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once dirname(__FILE__) . '/../unit/config.test.php'; |
|
2 | +require_once dirname(__FILE__).'/../unit/config.test.php'; |
|
3 | 3 | |
4 | 4 | require_once 'konstrukt/konstrukt.inc.php'; |
5 | 5 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | |
40 | 40 | function createProductWithVariations() |
41 | 41 | { |
42 | - require_once dirname(__FILE__) .'/../../../install/Helper/Product.php'; |
|
42 | + require_once dirname(__FILE__).'/../../../install/Helper/Product.php'; |
|
43 | 43 | $helper = new Install_Helper_Product($this->kernel, MDB2::singleton(DB_DSN)); |
44 | 44 | $helper->createWithVariations(); |
45 | 45 | } |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | require_once 'Intraface/modules/filemanager/FileManager.php'; |
4 | 4 | require_once 'Intraface/modules/filemanager/ImageRandomizer.php'; |
5 | 5 | require_once 'Intraface/shared/keyword/Keyword.php'; |
6 | -require_once dirname(__FILE__) . '/../Filehandler/file_functions.php'; |
|
6 | +require_once dirname(__FILE__).'/../Filehandler/file_functions.php'; |
|
7 | 7 | |
8 | 8 | class ImageRandomizerTest extends PHPUnit_Framework_TestCase |
9 | 9 | { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | { |
35 | 35 | for ($i = 1; $i < 11; $i++) { |
36 | 36 | $filemanager = new Intraface_modules_filemanager_FileManager($this->createKernel()); |
37 | - copy(dirname(__FILE__) . '/'.$this->file_name, PATH_UPLOAD.$this->file_name); |
|
37 | + copy(dirname(__FILE__).'/'.$this->file_name, PATH_UPLOAD.$this->file_name); |
|
38 | 38 | $filemanager->save(PATH_UPLOAD.$this->file_name, 'file'.$i.'.jpg'); |
39 | 39 | $appender = $filemanager->getKeywordAppender(); |
40 | 40 |
@@ -78,7 +78,7 @@ |
||
78 | 78 | function testALotOfSaveEmails() |
79 | 79 | { |
80 | 80 | $number = 200; |
81 | - for ($i = 0; $i<$number; $i++) { |
|
81 | + for ($i = 0; $i < $number; $i++) { |
|
82 | 82 | $belong_to_id = rand(1, 100000); |
83 | 83 | $type_id = rand(1, 5); |
84 | 84 | $contact_id = rand(1, 100000); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | function useShared($shared) |
44 | 44 | { |
45 | - switch($shared) { |
|
45 | + switch ($shared) { |
|
46 | 46 | case 'email': |
47 | 47 | require_once 'Intraface/shared/email/Email.php'; |
48 | 48 | break; |
@@ -26,6 +26,6 @@ |
||
26 | 26 | function testPostPhoneUntil() |
27 | 27 | { |
28 | 28 | $reminder = new ContactReminder($this->getContact()); |
29 | - $this->assertTrue($reminder->postponeUntil(date('Y-') . date('m') + 1 . date('-d'))); |
|
29 | + $this->assertTrue($reminder->postponeUntil(date('Y-').date('m') + 1.date('-d'))); |
|
30 | 30 | } |
31 | 31 | } |