Completed
Branch develop (c79181)
by
unknown
24:25
created
dev/tools/phan/config.php 1 patch
Spacing   +70 added lines, -70 removed lines patch added patch discarded remove patch
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
 	'bom' => 'Bom',
77 77
 	'bookcal' => 'BookCal',
78 78
 	'bookmark' => 'Bookmark',
79
-	'cashdesk' => null,  // TODO: fill in proper class
79
+	'cashdesk' => null, // TODO: fill in proper class
80 80
 	'category' => 'Categorie',
81 81
 	'clicktodial' => 'ClickToDial',
82 82
 	'collab' => 'Collab',
83 83
 	'comptabilite' => 'Comptabilite',
84
-	'contact' => null,  // TODO: fill in proper class
84
+	'contact' => null, // TODO: fill in proper class
85 85
 	'contract' => 'Contrat',
86 86
 	'cron' => 'Cron',
87 87
 	'datapolicy' => 'DataPolicy',
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	'don' => 'Don',
94 94
 	'dynamicprices' => 'DynamicPrices',
95 95
 	'ecm' => 'ECM',
96
-	'ecotax' => null,  // TODO: External module ?
96
+	'ecotax' => null, // TODO: External module ?
97 97
 	'emailcollector' => 'EmailCollector',
98 98
 	'eventorganization' => 'EventOrganization',
99 99
 	'expensereport' => 'ExpenseReport',
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	'fournisseur' => 'Fournisseur',
105 105
 	'ftp' => 'FTP',
106 106
 	'geoipmaxmind' => 'GeoIPMaxmind',
107
-	'google' => null,  // External ?
107
+	'google' => null, // External ?
108 108
 	'gravatar' => 'Gravatar',
109 109
 	'holiday' => 'Holiday',
110 110
 	'hrm' => 'HRM',
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 	'ldap' => 'Ldap',
119 119
 	'loan' => 'Loan',
120 120
 	'mailing' => 'Mailing',
121
-	'mailman' => null,  // Same module as mailmanspip -> MailmanSpip ??
121
+	'mailman' => null, // Same module as mailmanspip -> MailmanSpip ??
122 122
 	'mailmanspip' => 'MailmanSpip',
123 123
 	'margin' => 'Margin',
124 124
 	'member' => 'Adherent',
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	'notification' => 'Notification',
132 132
 	'numberwords' => null, // Not provided by default, no module tests
133 133
 	'oauth' => 'OAuth',
134
-	'openstreetmap' => null,  // External module?
134
+	'openstreetmap' => null, // External module?
135 135
 	'opensurvey' => 'OpenSurvey',
136 136
 	'order' => 'Commande',
137 137
 	'partnership' => 'Partnership',
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 	'stock' => 'Stock',
159 159
 	'stocktransfer' => 'StockTransfer',
160 160
 	'stripe' => 'Stripe',
161
-	'supplier_invoice' => null,  // Special case, uses invoice
162
-	'supplier_order' => null,  // Special case, uses invoice
161
+	'supplier_invoice' => null, // Special case, uses invoice
162
+	'supplier_order' => null, // Special case, uses invoice
163 163
 	'supplier_proposal' => 'SupplierProposal',
164 164
 	'syslog' => 'Syslog',
165 165
 	'takepos' => 'TakePos',
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	//	'processes' => 6,
222 222
 	'backward_compatibility_checks' => false,
223 223
 	'simplify_ast' => true,
224
-	'analyzed_file_extensions' => ['php','inc'],
224
+	'analyzed_file_extensions' => ['php', 'inc'],
225 225
 	'globals_type_map' => [
226 226
 		'_Avery_Labels' => 'array<string,array{name:string,paper-size:string,orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}>',
227 227
 		'action' => 'string',
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 		'shmkeys' => 'array<string,int>', // memory.lib
276 276
 		'shmoffset' => 'int', // memory.lib
277 277
 		'user' => '\User',
278
-		'website' => 'string',  // See discussion https://github.com/Dolibarr/dolibarr/pull/28891#issuecomment-2002268334  // Disable because Phan infers Website type
278
+		'website' => 'string', // See discussion https://github.com/Dolibarr/dolibarr/pull/28891#issuecomment-2002268334  // Disable because Phan infers Website type
279 279
 		'websitepage' => '\WebSitePage',
280 280
 		'websitepagefile' => 'string',
281 281
 		// 'object' => '\CommonObject',  // Deprecated, not enabled because conflicts with $object assignments
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	// your application should be included in this list.
300 300
 	'directory_list' => [
301 301
 		'htdocs',
302
-		PHAN_DIR . '/stubs/',
302
+		PHAN_DIR.'/stubs/',
303 303
 	],
304 304
 
305 305
 	// A directory list that defines files that will be excluded
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		'htdocs/includes/',
318 318
 		'htdocs/install/doctemplates/websites/',
319 319
 		'htdocs/core/class/lessc.class.php', // External library
320
-		PHAN_DIR . '/stubs/',
320
+		PHAN_DIR.'/stubs/',
321 321
 	],
322 322
 	//'exclude_file_regex' => '@^vendor/.*/(tests?|Tests?)/@',
323 323
 	'exclude_file_regex' => '@^('  // @phpstan-ignore-line
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 		.'|htdocs/includes/stripe/.*'  // @phpstan-ignore-line
335 335
 		.'|htdocs/conf/conf.php'  // @phpstan-ignore-line
336 336
 		// .'|htdocs/[^h].*/.*'  // For testing @phpstan-ignore-line
337
-		.')@',  // @phpstan-ignore-line
337
+		.')@', // @phpstan-ignore-line
338 338
 
339 339
 	// A list of plugin files to execute.
340 340
 	// Plugins which are bundled with Phan can be added here by providing their name
@@ -350,14 +350,14 @@  discard block
 block discarded – undo
350 350
 		'/^isModEnabled$/' => [0, $moduleNameRegex, 'UnknownModuleName'],
351 351
 		// Note: trick to have different key for same regex:
352 352
 		'/^isModEnable[d]$/' => [0, $deprecatedModuleNameRegex, "DeprecatedModuleName"],
353
-		'/^sanitizeVal$/' => [1, $sanitizeRegex,"UnknownSanitizeType"],
354
-		'/^checkVal$/' => [1, $sanitizeRegex,"UnknownCheckValSanitizeType"],
355
-		'/^\\\\ExtraFields::addExtraField$/' => [2, $extraFieldTypeRegex,"UnknownExtrafieldTypeBack"],
356
-		'/^dol_now$/' => [0, '{^(?:auto|gmt|tz(?:server|ref|user(?:rel)?))$}',"InvalidDolNowArgument"],
357
-		'/^dol_mktime$/' => [6, '{^(?:|0|1|auto|gmt|tz(?:server|ref|user(?:rel)?|,[+a-zA-Z-/]+))$}',"InvalidDolMktimeArgument"],  // '', 0, 1 match bool and int values
358
-		'/^dol_print_date$/' => [2, '{^(?:|0|1|auto|gmt|tz(?:server|user(?:rel)?))$}',"InvalidDolMktimeArgument"],  // '', 0, 1 match bool and int values
359
-		'/^GETPOSTFLOAT$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}',"InvalidGetPostFloatRounding"],
360
-		'/^price2num$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}',"InvalidPrice2NumRounding"],
353
+		'/^sanitizeVal$/' => [1, $sanitizeRegex, "UnknownSanitizeType"],
354
+		'/^checkVal$/' => [1, $sanitizeRegex, "UnknownCheckValSanitizeType"],
355
+		'/^\\\\ExtraFields::addExtraField$/' => [2, $extraFieldTypeRegex, "UnknownExtrafieldTypeBack"],
356
+		'/^dol_now$/' => [0, '{^(?:auto|gmt|tz(?:server|ref|user(?:rel)?))$}', "InvalidDolNowArgument"],
357
+		'/^dol_mktime$/' => [6, '{^(?:|0|1|auto|gmt|tz(?:server|ref|user(?:rel)?|,[+a-zA-Z-/]+))$}', "InvalidDolMktimeArgument"], // '', 0, 1 match bool and int values
358
+		'/^dol_print_date$/' => [2, '{^(?:|0|1|auto|gmt|tz(?:server|user(?:rel)?))$}', "InvalidDolMktimeArgument"], // '', 0, 1 match bool and int values
359
+		'/^GETPOSTFLOAT$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}', "InvalidGetPostFloatRounding"],
360
+		'/^price2num$/' => [1, '{^(?:|M[UTS]|C[UT]|\d+)$}', "InvalidPrice2NumRounding"],
361 361
 	],
362 362
 	'plugins' => [
363 363
 		__DIR__.'/plugins/NoVarDumpPlugin.php',
@@ -418,42 +418,42 @@  discard block
 block discarded – undo
418 418
 		// Dolibarr uses a lot of internal deprecated stuff, not reporting
419 419
 		'PhanDeprecatedProperty',
420 420
 
421
-		'PhanCompatibleNegativeStringOffset',	// return false positive
422
-		'PhanPluginConstantVariableBool',		// a lot of false positive, in most cases, we want to keep the code as it is
421
+		'PhanCompatibleNegativeStringOffset', // return false positive
422
+		'PhanPluginConstantVariableBool', // a lot of false positive, in most cases, we want to keep the code as it is
423 423
 		// 'PhanPluginUnknownArrayPropertyType',	// this option costs more time to be supported than it solves time
424
-		'PhanTypeArraySuspiciousNullable',		// this option costs more time to be supported than it solves time
424
+		'PhanTypeArraySuspiciousNullable', // this option costs more time to be supported than it solves time
425 425
 		// 'PhanTypeInvalidDimOffset',			// Helps identify missing array indexes in types or reference to unset indexes
426 426
 		'PhanTypeObjectUnsetDeclaredProperty',
427
-		'PhanTypePossiblyInvalidDimOffset',			// a lot of false positive, in most cases, we want to keep the code as it is
427
+		'PhanTypePossiblyInvalidDimOffset', // a lot of false positive, in most cases, we want to keep the code as it is
428 428
 		// 'PhanPluginUnknownArrayFunctionReturnType',	// a lot of false positive, in most cases, we want to keep the code as it is
429 429
 
430
-		'PhanPluginWhitespaceTab',		// Dolibarr uses tabs
431
-		'PhanPluginCanUsePHP71Void',	// Dolibarr is maintaining 7.0 compatibility
432
-		'PhanPluginShortArray',			// Dolibarr uses array()
433
-		'PhanPluginShortArrayList',		// Dolibarr uses array()
430
+		'PhanPluginWhitespaceTab', // Dolibarr uses tabs
431
+		'PhanPluginCanUsePHP71Void', // Dolibarr is maintaining 7.0 compatibility
432
+		'PhanPluginShortArray', // Dolibarr uses array()
433
+		'PhanPluginShortArrayList', // Dolibarr uses array()
434 434
 		// Fixers From PHPDocToRealTypesPlugin:
435
-		'PhanPluginCanUseParamType',			// Fixer - Report/Add types in the function definition (function abc(string $var) (adds string)
436
-		'PhanPluginCanUseReturnType',			// Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string)
437
-		'PhanPluginCanUseNullableParamType',	// Fixer - Report/Add nullable parameter types in the function definition
438
-		'PhanPluginCanUseNullableReturnType',	// Fixer - Report/Add nullable return types in the function definition
435
+		'PhanPluginCanUseParamType', // Fixer - Report/Add types in the function definition (function abc(string $var) (adds string)
436
+		'PhanPluginCanUseReturnType', // Fixer - Report/Add return types in the function definition (function abc(string $var) (adds string)
437
+		'PhanPluginCanUseNullableParamType', // Fixer - Report/Add nullable parameter types in the function definition
438
+		'PhanPluginCanUseNullableReturnType', // Fixer - Report/Add nullable return types in the function definition
439 439
 
440
-		'PhanPluginNonBoolBranch',			// Not essential - 31240+ occurrences
441
-		'PhanPluginNumericalComparison',	// Not essential - 19870+ occurrences
442
-		'PhanTypeMismatchArgument',			// Also reported by phpstan < lvl6 - 12300+ occurrences
443
-		'PhanPluginNonBoolInLogicalArith',	// Not essential - 11040+ occurrences
444
-		'PhanPluginConstantVariableScalar',	// Not essential - 5180+ occurrences
440
+		'PhanPluginNonBoolBranch', // Not essential - 31240+ occurrences
441
+		'PhanPluginNumericalComparison', // Not essential - 19870+ occurrences
442
+		'PhanTypeMismatchArgument', // Also reported by phpstan < lvl6 - 12300+ occurrences
443
+		'PhanPluginNonBoolInLogicalArith', // Not essential - 11040+ occurrences
444
+		'PhanPluginConstantVariableScalar', // Not essential - 5180+ occurrences
445 445
 		'PhanPluginDuplicateAdjacentStatement',
446
-		'PhanPluginDuplicateConditionalTernaryDuplication',		// 2750+ occurrences
447
-		'PhanPluginDuplicateConditionalNullCoalescing',	// Not essential - 990+ occurrences
448
-		'PhanPluginRedundantAssignmentInGlobalScope',	// Not essential, a lot of false warning
449
-		'PhanPluginRedundantAssignment',				// Not essential, useless
450
-		'PhanPluginDuplicateCatchStatementBody',  // Requires PHP7.1 - 50+ occurrences
446
+		'PhanPluginDuplicateConditionalTernaryDuplication', // 2750+ occurrences
447
+		'PhanPluginDuplicateConditionalNullCoalescing', // Not essential - 990+ occurrences
448
+		'PhanPluginRedundantAssignmentInGlobalScope', // Not essential, a lot of false warning
449
+		'PhanPluginRedundantAssignment', // Not essential, useless
450
+		'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences
451 451
 
452 452
 		// 'PhanPluginUnknownArrayMethodParamType',	// Too many troubles to manage. Is enabled in config_extended only.
453 453
 		// 'PhanPluginUnknownArrayMethodReturnType',	// Too many troubles to manage. Is enabled in config_extended only.
454 454
 		// 'PhanUndeclaredGlobalVariable',			// Helps identify variables that are not set/defined - add '@phan-var-force TYPE $varname' in tpl or includes to help type the variable
455 455
 		// 'PhanPluginUnknownObjectMethodCall',	// False positive for some class. Is enabled in config_extended only.
456
-		'PhanTypeSuspiciousNonTraversableForeach',  // Reports on `foreach ($object as $key => $value)` which works without php notices, so we ignore it because this is intentional in the code.
456
+		'PhanTypeSuspiciousNonTraversableForeach', // Reports on `foreach ($object as $key => $value)` which works without php notices, so we ignore it because this is intentional in the code.
457 457
 	],
458 458
 	// You can put relative paths to internal stubs in this config option.
459 459
 	// Phan will continue using its detailed type annotations,
@@ -472,31 +472,31 @@  discard block
 block discarded – undo
472 472
 		//'xdebug'	=> 'vendor/phan/phan/.phan/internal_stubs/xdebug.phan_php',
473 473
 		//'memcached'  => PHAN_DIR . '/your_internal_stubs_folder_name/memcached.phan_php',
474 474
 		//'PDO'  => PHAN_DIR . '/stubs/PDO.phan_php',
475
-		'brotli'  => PHAN_DIR . '/stubs/brotli.phan_php',
476
-		'curl'  => PHAN_DIR . '/stubs/curl.phan_php',
477
-		'calendar'  => PHAN_DIR . '/stubs/calendar.phan_php',
478
-		'fileinfo'  => PHAN_DIR . '/stubs/fileinfo.phan_php',
479
-		'ftp'  => PHAN_DIR . '/stubs/ftp.phan_php',
480
-		'gd'  => PHAN_DIR . '/stubs/gd.phan_php',
481
-		'geoip'  => PHAN_DIR . '/stubs/geoip.phan_php',
482
-		'imagick'  => PHAN_DIR . '/stubs/imagick.phan_php',
483
-		'imap'  => PHAN_DIR . '/stubs/imap.phan_php',
484
-		'intl'  => PHAN_DIR . '/stubs/intl.phan_php',
485
-		'ldap'  => PHAN_DIR . '/stubs/ldap.phan_php',
486
-		'mcrypt'  => PHAN_DIR . '/stubs/mcrypt.phan_php',
487
-		'memcache'  => PHAN_DIR . '/stubs/memcache.phan_php',
488
-		'memcached' => PHAN_DIR . '/stubs/memcached.phan_php',
489
-		'mysqli'  => PHAN_DIR . '/stubs/mysqli.phan_php',
490
-		'pdo_cubrid'  => PHAN_DIR . '/stubs/pdo_cubrid.phan_php',
491
-		'pdo_mysql'  => PHAN_DIR . '/stubs/pdo_mysql.phan_php',
492
-		'pdo_pgsql'  => PHAN_DIR . '/stubs/pdo_pgsql.phan_php',
493
-		'pdo_sqlite'  => PHAN_DIR . '/stubs/pdo_sqlite.phan_php',
494
-		'pgsql'  => PHAN_DIR . '/stubs/pgsql.phan_php',
495
-		'session'  => PHAN_DIR . '/stubs/session.phan_php',
496
-		'simplexml'  => PHAN_DIR . '/stubs/SimpleXML.phan_php',
497
-		'soap'  => PHAN_DIR . '/stubs/soap.phan_php',
498
-		'sockets'  => PHAN_DIR . '/stubs/sockets.phan_php',
499
-		'tidy'  => PHAN_DIR . '/stubs/tidy.phan_php',
500
-		'zip'  => PHAN_DIR . '/stubs/zip.phan_php',
475
+		'brotli'  => PHAN_DIR.'/stubs/brotli.phan_php',
476
+		'curl'  => PHAN_DIR.'/stubs/curl.phan_php',
477
+		'calendar'  => PHAN_DIR.'/stubs/calendar.phan_php',
478
+		'fileinfo'  => PHAN_DIR.'/stubs/fileinfo.phan_php',
479
+		'ftp'  => PHAN_DIR.'/stubs/ftp.phan_php',
480
+		'gd'  => PHAN_DIR.'/stubs/gd.phan_php',
481
+		'geoip'  => PHAN_DIR.'/stubs/geoip.phan_php',
482
+		'imagick'  => PHAN_DIR.'/stubs/imagick.phan_php',
483
+		'imap'  => PHAN_DIR.'/stubs/imap.phan_php',
484
+		'intl'  => PHAN_DIR.'/stubs/intl.phan_php',
485
+		'ldap'  => PHAN_DIR.'/stubs/ldap.phan_php',
486
+		'mcrypt'  => PHAN_DIR.'/stubs/mcrypt.phan_php',
487
+		'memcache'  => PHAN_DIR.'/stubs/memcache.phan_php',
488
+		'memcached' => PHAN_DIR.'/stubs/memcached.phan_php',
489
+		'mysqli'  => PHAN_DIR.'/stubs/mysqli.phan_php',
490
+		'pdo_cubrid'  => PHAN_DIR.'/stubs/pdo_cubrid.phan_php',
491
+		'pdo_mysql'  => PHAN_DIR.'/stubs/pdo_mysql.phan_php',
492
+		'pdo_pgsql'  => PHAN_DIR.'/stubs/pdo_pgsql.phan_php',
493
+		'pdo_sqlite'  => PHAN_DIR.'/stubs/pdo_sqlite.phan_php',
494
+		'pgsql'  => PHAN_DIR.'/stubs/pgsql.phan_php',
495
+		'session'  => PHAN_DIR.'/stubs/session.phan_php',
496
+		'simplexml'  => PHAN_DIR.'/stubs/SimpleXML.phan_php',
497
+		'soap'  => PHAN_DIR.'/stubs/soap.phan_php',
498
+		'sockets'  => PHAN_DIR.'/stubs/sockets.phan_php',
499
+		'tidy'  => PHAN_DIR.'/stubs/tidy.phan_php',
500
+		'zip'  => PHAN_DIR.'/stubs/zip.phan_php',
501 501
 	],
502 502
 ];
Please login to merge, or discard this patch.
htdocs/compta/facture/class/facture-rec.class.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 				$this->titre                  = $obj->title; // deprecated
646 646
 				$this->title                  = $obj->title;
647 647
 				$this->ref                    = $obj->title;
648
-				$this->subtype				  = $obj->subtype;
648
+				$this->subtype = $obj->subtype;
649 649
 				$this->suspended              = $obj->suspended;
650 650
 				$this->total_ht               = $obj->total_ht;
651 651
 				$this->total_tva              = $obj->total_tva;
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 				$this->fk_account             = $obj->fk_account;
666 666
 				$this->note_private           = $obj->note_private;
667 667
 				$this->note_public            = $obj->note_public;
668
-				$this->user_author            = $obj->fk_user_author;	// deprecated
668
+				$this->user_author            = $obj->fk_user_author; // deprecated
669 669
 				$this->user_creation_id       = $obj->fk_user_author;
670 670
 				$this->model_pdf              = $obj->model_pdf;
671 671
 				//$this->special_code = $obj->special_code;
@@ -764,35 +764,35 @@  discard block
 block discarded – undo
764 764
 				$objp = $this->db->fetch_object($result);
765 765
 				$line = new FactureLigneRec($this->db);
766 766
 
767
-				$line->id				= $objp->rowid;
767
+				$line->id = $objp->rowid;
768 768
 				$line->rowid			= $objp->rowid;
769
-				$line->fk_facture		= $objp->fk_facture;
770
-				$line->fk_parent_line	= $objp->fk_parent_line;
769
+				$line->fk_facture = $objp->fk_facture;
770
+				$line->fk_parent_line = $objp->fk_parent_line;
771 771
 				$line->desc				= $objp->description; // Description line
772 772
 				$line->description		= $objp->description; // Description line
773
-				$line->ref				= $objp->product_ref; // Ref product
773
+				$line->ref = $objp->product_ref; // Ref product
774 774
 				$line->product_ref		= $objp->product_ref; // Ref product
775
-				$line->libelle			= $objp->product_label; // deprecated
775
+				$line->libelle = $objp->product_label; // deprecated
776 776
 				$line->product_label	= $objp->product_label; // Label product
777 777
 				$line->product_desc		= $objp->product_desc; // Description product
778 778
 				$line->product_type		= $objp->product_type; // Type of line
779
-				$line->fk_product_type	= $objp->fk_product_type; // Type of product
779
+				$line->fk_product_type = $objp->fk_product_type; // Type of product
780 780
 				$line->qty 				= $objp->qty;
781
-				$line->subprice			= $objp->subprice;
781
+				$line->subprice = $objp->subprice;
782 782
 
783 783
 				$line->label			= $objp->custom_label; // @deprecated
784 784
 
785 785
 				$line->vat_src_code		= $objp->vat_src_code;
786
-				$line->tva_tx			= $objp->tva_tx;
786
+				$line->tva_tx = $objp->tva_tx;
787 787
 				$line->localtax1_tx		= $objp->localtax1_tx;
788 788
 				$line->localtax2_tx		= $objp->localtax2_tx;
789 789
 				$line->localtax1_type	= $objp->localtax1_type;
790 790
 				$line->localtax2_type	= $objp->localtax2_type;
791 791
 				$line->remise_percent	= $objp->remise_percent;
792 792
 				//$line->fk_remise_except = $objp->fk_remise_except;
793
-				$line->fk_product		= $objp->fk_product;
794
-				$line->date_start_fill	= $objp->date_start_fill;
795
-				$line->date_end_fill	= $objp->date_end_fill;
793
+				$line->fk_product = $objp->fk_product;
794
+				$line->date_start_fill = $objp->date_start_fill;
795
+				$line->date_end_fill = $objp->date_end_fill;
796 796
 				$line->info_bits		= $objp->info_bits;
797 797
 				$line->total_ht			= $objp->total_ht;
798 798
 				$line->total_tva		= $objp->total_tva;
@@ -808,13 +808,13 @@  discard block
 block discarded – undo
808 808
 				$line->marge_tx			= (string) $marginInfos[1];
809 809
 				$line->marque_tx		= (string) $marginInfos[2];
810 810
 				$line->rang				= $objp->rang;
811
-				$line->special_code		= $objp->special_code;
812
-				$line->fk_unit			= $objp->fk_unit;
813
-				$line->fk_contract_line	= $objp->fk_contract_line;
811
+				$line->special_code = $objp->special_code;
812
+				$line->fk_unit = $objp->fk_unit;
813
+				$line->fk_contract_line = $objp->fk_contract_line;
814 814
 
815 815
 				// Ne plus utiliser
816
-				$line->price			= $objp->price;
817
-				$line->remise			= $objp->remise;
816
+				$line->price = $objp->price;
817
+				$line->remise = $objp->remise;
818 818
 
819 819
 				$line->fetch_optionals();
820 820
 
@@ -1407,7 +1407,7 @@  discard block
 block discarded – undo
1407 1407
 
1408 1408
 					$facture->type = self::TYPE_STANDARD;
1409 1409
 					$facture->subtype = $facturerec->subtype;
1410
-					$facture->statut = self::STATUS_DRAFT;	// deprecated
1410
+					$facture->statut = self::STATUS_DRAFT; // deprecated
1411 1411
 					$facture->status = self::STATUS_DRAFT;
1412 1412
 					$facture->date = (empty($facturerec->date_when) ? $now : $facturerec->date_when); // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
1413 1413
 					$facture->socid = $facturerec->socid;
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
 		}
1558 1558
 		$result .= $linkend;
1559 1559
 		global $action;
1560
-		$hookmanager->initHooks(array($this->element . 'dao'));
1560
+		$hookmanager->initHooks(array($this->element.'dao'));
1561 1561
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
1562 1562
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1563 1563
 		if ($reshook > 0) {
@@ -2008,7 +2008,7 @@  discard block
 block discarded – undo
2008 2008
 					$resSuspend = $this->setValueFrom('suspended', 1);
2009 2009
 
2010 2010
 					if ($resSuspend <= 0) {
2011
-						dol_syslog(__METHOD__ . '::setValueFrom Error : ' . $this->error, LOG_ERR);
2011
+						dol_syslog(__METHOD__.'::setValueFrom Error : '.$this->error, LOG_ERR);
2012 2012
 						return -1;
2013 2013
 					}
2014 2014
 				}
@@ -2348,9 +2348,9 @@  discard block
 block discarded – undo
2348 2348
 		if ($result) {
2349 2349
 			$objp = $this->db->fetch_object($result);
2350 2350
 
2351
-			$this->id				= $objp->rowid;
2352
-			$this->fk_facture		= $objp->fk_facture;
2353
-			$this->fk_parent_line	= $objp->fk_parent_line;
2351
+			$this->id = $objp->rowid;
2352
+			$this->fk_facture = $objp->fk_facture;
2353
+			$this->fk_parent_line = $objp->fk_parent_line;
2354 2354
 			$this->label            = $objp->custom_label; // Label line
2355 2355
 			$this->desc             = $objp->description; // Description line
2356 2356
 			$this->description      = $objp->description; // Description line
Please login to merge, or discard this patch.
htdocs/webportal/controllers/document.controller.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 * \brief       This file is a controller for documents
24 24
 */
25 25
 
26
-require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
26
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
27 27
 
28 28
 
29 29
 /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		}
153 153
 
154 154
 		// Security: Delete string ../ or ..\ into $original_file
155
-		$original_file = preg_replace('/\.\.+/', '..', $original_file);    // Replace '... or more' with '..'
155
+		$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..'
156 156
 		$original_file = str_replace('../', '/', $original_file);
157 157
 		$original_file = str_replace('..\\', '/', $original_file);
158 158
 
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
 		// check config access
170 170
 		// and file mime type (only PDF)
171 171
 		// and check login access
172
-		if (getDolGlobalInt('WEBPORTAL_' . $moduleNameUpperEn . '_LIST_ACCESS')
172
+		if (getDolGlobalInt('WEBPORTAL_'.$moduleNameUpperEn.'_LIST_ACCESS')
173 173
 			&& in_array($type, array('application/pdf'))
174 174
 			&& ($context->logged_thirdparty && $context->logged_thirdparty->id > 0)
175 175
 			&& $context->logged_thirdparty->id == $socId
176 176
 		) {
177 177
 			if (isModEnabled($moduleName) && isset($conf->{$moduleName}->multidir_output[$entity])) {
178
-				$original_file = $conf->{$moduleName}->multidir_output[$entity] . '/' . $original_file;
178
+				$original_file = $conf->{$moduleName}->multidir_output[$entity].'/'.$original_file;
179 179
 				$accessallowed = 1;
180 180
 			}
181 181
 		}
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
 		// Security:
191 191
 		// We refuse directory transversal change and pipes in file names
192 192
 		if (preg_match('/\.\./', $fullpath_original_file) || preg_match('/[<>|]/', $fullpath_original_file)) {
193
-			dol_syslog("Refused to deliver file " . $fullpath_original_file);
194
-			print "ErrorFileNameInvalid: " . dol_escape_htmltag($original_file);
193
+			dol_syslog("Refused to deliver file ".$fullpath_original_file);
194
+			print "ErrorFileNameInvalid: ".dol_escape_htmltag($original_file);
195 195
 			exit;
196 196
 		}
197 197
 
198 198
 		// Find the subdirectory name as the reference
199
-		$refname = basename(dirname($original_file) . "/");
199
+		$refname = basename(dirname($original_file)."/");
200 200
 
201 201
 		$filename = basename($fullpath_original_file);
202 202
 		$filename = preg_replace('/\.noexe$/i', '', $filename);
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
 		// This test if file exists should be useless. We keep it to find bug more easily
209 209
 		if (!file_exists($fullpath_original_file_osencoded)) {
210
-			dol_syslog("ErrorFileDoesNotExists: " . $fullpath_original_file);
211
-			print "ErrorFileDoesNotExists: " . $original_file;
210
+			dol_syslog("ErrorFileDoesNotExists: ".$fullpath_original_file);
211
+			print "ErrorFileDoesNotExists: ".$original_file;
212 212
 			exit;
213 213
 		}
214 214
 
@@ -216,8 +216,8 @@  discard block
 block discarded – undo
216 216
 		$fileSizeMaxDefault = 20 * 1024; // 20 Mo by default
217 217
 		$fileSizeMax = getDolGlobalInt('MAIN_SECURITY_MAXFILESIZE_DOWNLOADED', $fileSizeMaxDefault);
218 218
 		if ($fileSize > $fileSizeMax) {
219
-			dol_syslog('ErrorFileSizeTooLarge: ' . $fileSize);
220
-			print 'ErrorFileSizeTooLarge: ' . $fileSize . ' (max ' . $fileSizeMax . ')';
219
+			dol_syslog('ErrorFileSizeTooLarge: '.$fileSize);
220
+			print 'ErrorFileSizeTooLarge: '.$fileSize.' (max '.$fileSizeMax.')';
221 221
 			exit;
222 222
 		}
223 223
 
@@ -229,9 +229,9 @@  discard block
 block discarded – undo
229 229
 		$object = new stdClass();
230 230
 		$reshook = $hookmanager->executeHooks('downloadDocument', $parameters, $object, $action); // Note that $action and $object may have been
231 231
 		if ($reshook < 0) {
232
-			$errors = $hookmanager->error . (is_array($hookmanager->errors) ? (!empty($hookmanager->error) ? ', ' : '') . implode(', ', $hookmanager->errors) : '');
233
-			dol_syslog("document.php - Errors when executing the hook 'downloadDocument' : " . $errors);
234
-			print "ErrorDownloadDocumentHooks: " . $errors;
232
+			$errors = $hookmanager->error.(is_array($hookmanager->errors) ? (!empty($hookmanager->error) ? ', ' : '').implode(', ', $hookmanager->errors) : '');
233
+			dol_syslog("document.php - Errors when executing the hook 'downloadDocument' : ".$errors);
234
+			print "ErrorDownloadDocumentHooks: ".$errors;
235 235
 			exit;
236 236
 		}
237 237
 
@@ -309,19 +309,19 @@  discard block
 block discarded – undo
309 309
 		top_httphead($type);
310 310
 		header('Content-Description: File Transfer');
311 311
 		if ($encoding) {
312
-			header('Content-Encoding: ' . $encoding);
312
+			header('Content-Encoding: '.$encoding);
313 313
 		}
314 314
 		// Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open)
315 315
 		if ($attachment) {
316
-			header('Content-Disposition: attachment; filename="' . $filename . '"');
316
+			header('Content-Disposition: attachment; filename="'.$filename.'"');
317 317
 		} else {
318
-			header('Content-Disposition: inline; filename="' . $filename . '"');
318
+			header('Content-Disposition: inline; filename="'.$filename.'"');
319 319
 		}
320 320
 		header('Cache-Control: Public, must-revalidate');
321 321
 		header('Pragma: public');
322 322
 
323 323
 		// Send file now
324
-		header('Content-Length: ' . dol_filesize($fullpath_original_file));
324
+		header('Content-Length: '.dol_filesize($fullpath_original_file));
325 325
 		readfileLowMemory($fullpath_original_file_osencoded);
326 326
 	}
327 327
 }
Please login to merge, or discard this patch.
htdocs/ftp/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -489,7 +489,7 @@
 block discarded – undo
489 489
 				$buff = ftp_rawlist($conn_id, $newsectioniso);
490 490
 				$contents = ftp_nlist($conn_id, $newsectioniso); // Sometimes rawlist fails but never nlist
491 491
 			} else {
492
-				dol_syslog(__FILE__ . ": Unexpected state for ftp connection", LOG_ERR);
492
+				dol_syslog(__FILE__.": Unexpected state for ftp connection", LOG_ERR);
493 493
 				$buff = array();
494 494
 				$contents = array();
495 495
 			}
Please login to merge, or discard this patch.
htdocs/core/lib/customreports.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
 				'parent', 'photo', 'socialnetworks', 'webservices_url', 'webservices_key'))) {
228 228
 				continue;
229 229
 			}
230
-			if (isset($val['enabled']) && ! (int) dol_eval($val['enabled'], 1, 1, '1')) {
230
+			if (isset($val['enabled']) && !(int) dol_eval($val['enabled'], 1, 1, '1')) {
231 231
 				continue;
232 232
 			}
233
-			if (isset($val['visible']) && ! (int) dol_eval($val['visible'], 1, 1, '1')) {
233
+			if (isset($val['visible']) && !(int) dol_eval($val['visible'], 1, 1, '1')) {
234 234
 				continue;
235 235
 			}
236 236
 			if (preg_match('/^fk_/', $key) && !preg_match('/^fk_statu/', $key)) {
@@ -392,10 +392,10 @@  discard block
 block discarded – undo
392 392
 				'parent', 'photo', 'socialnetworks', 'webservices_url', 'webservices_key'))) {
393 393
 				continue;
394 394
 			}
395
-			if (isset($val['enabled']) && ! (int) dol_eval($val['enabled'], 1, 1, '1')) {
395
+			if (isset($val['enabled']) && !(int) dol_eval($val['enabled'], 1, 1, '1')) {
396 396
 				continue;
397 397
 			}
398
-			if (isset($val['visible']) && ! (int) dol_eval($val['visible'], 1, 1, '1')) {
398
+			if (isset($val['visible']) && !(int) dol_eval($val['visible'], 1, 1, '1')) {
399 399
 				continue;
400 400
 			}
401 401
 			if (preg_match('/^fk_/', $key) && !preg_match('/^fk_statu/', $key)) {
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 					'tablefromt' => $tablepath
471 471
 				);
472 472
 				$arrayofgroupby[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-day'] = array(
473
-					'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val).' <span class="opacitymedium">('.$YYYY.'-'.$MM.'-'.$DD.')</span>',  // @phan-suppress-current-line PhanUndeclaredProperty
473
+					'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val).' <span class="opacitymedium">('.$YYYY.'-'.$MM.'-'.$DD.')</span>', // @phan-suppress-current-line PhanUndeclaredProperty
474 474
 					'labelnohtml' => $labelofobject.': '.$langs->trans($val),
475 475
 					'position' => ($position + ($count * 100000)).'.3',
476 476
 					'table' => $object->table_element,
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 				);
479 479
 			} else {
480 480
 				$arrayofgroupby[preg_replace('/^t/', 'te', $tablealias).'.'.$key] = array(
481
-					'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val),  // @phan-suppress-current-line PhanUndeclaredProperty
481
+					'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val), // @phan-suppress-current-line PhanUndeclaredProperty
482 482
 					'labelnohtml' => $labelofobject.': '.$langs->trans($val),
483 483
 					'position' => 1000 + (int) $extrafields->attributes[$object->table_element]['pos'][$key] + ($count * 100000),
484 484
 					'table' => $object->table_element,
@@ -550,10 +550,10 @@  discard block
 block discarded – undo
550 550
 				'parent', 'photo', 'socialnetworks', 'webservices_url', 'webservices_key'))) {
551 551
 				continue;
552 552
 			}
553
-			if (isset($val['enabled']) && ! (int) dol_eval($val['enabled'], 1, 1, '1')) {
553
+			if (isset($val['enabled']) && !(int) dol_eval($val['enabled'], 1, 1, '1')) {
554 554
 				continue;
555 555
 			}
556
-			if (isset($val['visible']) && ! (int) dol_eval($val['visible'], 1, 1, '1')) {
556
+			if (isset($val['visible']) && !(int) dol_eval($val['visible'], 1, 1, '1')) {
557 557
 				continue;
558 558
 			}
559 559
 			if (preg_match('/^fk_/', $key) && !preg_match('/^fk_statu/', $key)) {
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 			}
590 590
 
591 591
 			$arrayoffields[preg_replace('/^t/', 'te', $tablealias).'.'.$key] = array(
592
-				'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val),  // @phan-suppress-current-line PhanUndeclaredProperty
592
+				'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val), // @phan-suppress-current-line PhanUndeclaredProperty
593 593
 				'labelnohtml' => $labelofobject.': '.$langs->trans($val),
594 594
 				'position' => 1000 + (int) $extrafields->attributes[$object->table_element]['pos'][$key] + ($count * 100000),
595 595
 				'table' => $object->table_element,
Please login to merge, or discard this patch.
htdocs/core/lib/images.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 
214 214
 	$filetoread = realpath(dol_osencode($file)); // Chemin canonique absolu de l'image
215 215
 
216
-	$infoImg = getimagesize($filetoread); 			// Get data about src image
216
+	$infoImg = getimagesize($filetoread); // Get data about src image
217 217
 	$imgWidth = $infoImg[0]; // Largeur de l'image
218 218
 	$imgHeight = $infoImg[1]; // Hauteur de l'image
219 219
 
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 	}
335 335
 
336 336
 	// Set transparent color according to image extension
337
-	$trans_colour = -1;	// By default, undefined
337
+	$trans_colour = -1; // By default, undefined
338 338
 	switch ($newExt) {
339 339
 		case 'gif':	// Gif
340 340
 			$trans_colour = imagecolorallocate($imgTarget, 255, 255, 255); // The method is different for the GIF format
@@ -801,7 +801,7 @@  discard block
 block discarded – undo
801 801
 			imagejpeg($imgThumb, $imgThumbName, $newquality); // @phan-suppress-current-line PhanTypeMismatchArgumentNullableInternal,PhanPossiblyUndeclaredVariable
802 802
 			break;
803 803
 		case IMAGETYPE_PNG:	    // 3
804
-			imagepng($imgThumb, $imgThumbName, $newquality);  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
804
+			imagepng($imgThumb, $imgThumbName, $newquality); // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
805 805
 			break;
806 806
 		case IMAGETYPE_BMP:	    // 6
807 807
 			// Not supported by PHP GD
Please login to merge, or discard this patch.
htdocs/core/lib/functionsnumtoword.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
 	// Get 2 decimals to cents, another functions round or truncate
173 173
 	$strnumber = number_format($numero, 10);
174 174
 	$len = strlen($strnumber);
175
-	$parte_decimal = '00';  // For static analysis, strnumber should contain '.'
175
+	$parte_decimal = '00'; // For static analysis, strnumber should contain '.'
176 176
 	for ($i = 0; $i < $len; $i++) {
177 177
 		if ($strnumber[$i] == '.') {
178 178
 			$parte_decimal = $strnumber[$i + 1].$strnumber[$i + 2];
Please login to merge, or discard this patch.
htdocs/core/lib/price.lib.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 	// Now we search localtaxes information ourself (rates and types).
143 143
 	$localtax1_type = 0;
144 144
 	$localtax2_type = 0;
145
-	$localtax1_rate = 1000;  // For static analysis, exaggerated value to help detect bugs
146
-	$localtax2_rate = 1000;  // For static analysis, exaggerated value to help detect bugs
145
+	$localtax1_rate = 1000; // For static analysis, exaggerated value to help detect bugs
146
+	$localtax2_rate = 1000; // For static analysis, exaggerated value to help detect bugs
147 147
 
148 148
 	if (is_array($localtaxes_array) && count($localtaxes_array)) {
149 149
 		$localtax1_type = $localtaxes_array[0];
@@ -412,13 +412,13 @@  discard block
 block discarded – undo
412 412
 		}
413 413
 
414 414
 		// Recall function using the multicurrency price as reference price. We must set param $multicurrency_tx to 1 to avoid infinite loop.
415
-		$newresult = calcul_price_total($qty, $pu_devise, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller, $localtaxes_array, $progress, 1, 0, '');  // pu_devise is normally arg#15, here as arg#2 @phan-suppress-current-line PhanPluginSuspiciousParamPosition
415
+		$newresult = calcul_price_total($qty, $pu_devise, $remise_percent_ligne, $txtva, $uselocaltax1_rate, $uselocaltax2_rate, $remise_percent_global, $price_base_type, $info_bits, $type, $seller, $localtaxes_array, $progress, 1, 0, ''); // pu_devise is normally arg#15, here as arg#2 @phan-suppress-current-line PhanPluginSuspiciousParamPosition
416 416
 
417 417
 		if ($multicurrency_code) {
418 418
 			// Restore setup of currency accurency
419
-			$conf->global->MAIN_MAX_DECIMALS_UNIT = $savMAIN_MAX_DECIMALS_UNIT;  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
420
-			$conf->global->MAIN_MAX_DECIMALS_TOT = $savMAIN_MAX_DECIMALS_TOT;  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
421
-			$conf->global->MAIN_ROUNDING_RULE_TOT = $savMAIN_ROUNDING_RULE_TOT;  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
419
+			$conf->global->MAIN_MAX_DECIMALS_UNIT = $savMAIN_MAX_DECIMALS_UNIT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
420
+			$conf->global->MAIN_MAX_DECIMALS_TOT = $savMAIN_MAX_DECIMALS_TOT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
421
+			$conf->global->MAIN_ROUNDING_RULE_TOT = $savMAIN_ROUNDING_RULE_TOT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
422 422
 		}
423 423
 
424 424
 		$result[16] = $newresult[0];
Please login to merge, or discard this patch.
htdocs/core/lib/agenda.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -164,7 +164,7 @@
 block discarded – undo
164 164
 
165 165
 	// Hooks
166 166
 	$parameters = array('canedit' => $canedit, 'pid' => $pid, 'socid' => $socid);
167
-	$object = null;  // Null on purpose: @phan-suppress-next-line PhanPluginConstantVariableNull
167
+	$object = null; // Null on purpose: @phan-suppress-next-line PhanPluginConstantVariableNull
168 168
 	$reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been
169 169
 
170 170
 	print '<div class="clearboth"></div>';
Please login to merge, or discard this patch.