Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Stray/Extra Line Terminators?
01-28-2018, 07:40 AM, (This post was last modified: 01-28-2018, 07:41 AM by VortecCPI.)
#1
Stray/Extra Line Terminators?
While working on MRPPlannedPurchaseOrders.php and MRPPlannedWorkOrders.php I noticed a few cases where we have terminators (";") after closing brackets ("}") for if-then statements.

I did a search and there are other places where we have the same.

Should we tidy this up to be consistent?
https://www.linkedin.com/in/eclipsepaulbecker
Reply
01-28-2018, 08:24 AM, (This post was last modified: 01-28-2018, 08:36 AM by TurboPT.)
#2
RE: Stray/Extra Line Terminators?
Yes, I'll look for those right now.

There are some places where the ; may remain after the }

I show occurrences in about 11 files, not including the 3rd-party areas that I won't touch at the moment.
Reply
01-28-2018, 09:02 AM,
#3
RE: Stray/Extra Line Terminators?
Changes committed to SVN.
Reply
01-28-2018, 09:50 AM, (This post was last modified: 01-28-2018, 09:51 AM by VortecCPI.)
#4
RE: Stray/Extra Line Terminators?
Wow! That was quick! Thank you so much!

Now for another nit-picky thing I just found...

Most scripts (304) use <a href=" (double-quote) but a few (5) use <a href=' (single quote). I just noticed it now when comparing the two MRP planning scrips.

Not too sure what our coding standard says about this but it seems it should be the same...
https://www.linkedin.com/in/eclipsepaulbecker
Reply
01-28-2018, 11:31 AM, (This post was last modified: 01-28-2018, 11:38 AM by TurboPT.)
#5
RE: Stray/Extra Line Terminators?
I believe that some of the single quote ones could be missing a double quote?

For example, in file MRPPlannedPurchaseOrders.php, line 17, this link:
PHP Code:
'<a href='.$RootPath .'/MRP.php>' 

...should look like this with the double quotes applied to complete the href as expected:
PHP Code:
'<a href="'.$RootPath .'/MRP.php">' 

So, in all, it may depend on what quote the string starts with as well as how the concatenation is applied, if any.

But yes, as you have found, there are inconsistencies.
Reply
01-28-2018, 11:38 AM,
#6
RE: Stray/Extra Line Terminators?
Thank you Paul. Bothers me and my OCD...

I have another feature you may want to have a look at here: http://www.weberp.org/forum/showthread.php?tid=8061
https://www.linkedin.com/in/eclipsepaulbecker
Reply
01-28-2018, 12:03 PM,
#7
RE: Stray/Extra Line Terminators?
Yes, I saw that feature, I was first considering another that you posted first now that the pick list is committed:

http://www.weberp.org/forum/showthread.php?tid=8048

Reply
01-28-2018, 10:55 PM,
#8
RE: Stray/Extra Line Terminators?
(01-28-2018, 12:03 PM)TurboPT Wrote: Yes, I saw that feature, I was first considering another that you posted first now that the pick list is committed:

http://www.weberp.org/forum/showthread.php?tid=8048

Thank you Paul. It is very helpful to me and I figured others could also benefit.

PLEASE check my work as PHP is NOT my native coding environment!
https://www.linkedin.com/in/eclipsepaulbecker
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)