« first day (1523 days earlier)      last day (3425 days later) » 

10:00 AM
though the question is not suited for SO I still find it interesting and I cannot think of a solution
could somebody here explain how to solve this one logically?
 
@ThomasDavidPlat If I would have been asked that question I would have responded with "can you translate that to english please"
> What is the day for January 5 in a year includes a month which has five Monday?
I mean wtf
 
@ThomasDavidPlat There are only a few months that have 5 mondays IIRC
but I think as a developer, you should not care if you knew this or not
 
@PeeHaa itgovernance.co.uk/blog/… <-- you know what to do :-)
 
I guess you could bruteforce this :P
 
@PeeHaa wed, thur or fri
 
10:04 AM
I'm guessing you could brute force say from year 0 to 3000 and only check for the first month (january)
 
I think the question is about figuring out what day the 5th of january is, in a year whose january has 5 mondays (I looked it up in a calendar, the last time this was in 2012). However I couldn't figure out how to solve it using some kind of strategy.
Yep. Thanks @HamZa that was the first thing that came into my mind, too.
 
@ThomasDavidPlat You have to know which year
 
@DaveRandom Update proxy? Setup a proper torrent indexer?
 
Otherwise the question makes no sense
@PeeHaa Update proxy :-P
Actually it works in the UK atm but I'm sure not for long
 
But am I failing?
What is the new address?
Or do you mean the isohunt backup?
 
10:06 AM
It's in that article, oldpiratebay.org
 
ah I see
 
It's actually better than the actual tpb because it's not covered in pornverts
 
I don't see them either way :P
Is new content being added to the isohunt copy?
 
I like viruses
 
@DaveRandom :D
 
10:08 AM
@PeeHaa Seems to be, I suspect they've just merged the old db into theirs and stuck a "new" UI in front of it
 
> VirtualDJ 8 Pro [PreCracked] [Easy Install]
Download from Other 59 min 75.53 MB 0 0
Yeap seems to be updated
Will update my proxy
 
I just searched for something that aired in the US on Sun and it's there
 
Damn that site is slow btw :(
 
orly? Wasn't too bad for me
 
Wasn't isohunt that fung guy btw?
 
10:10 AM
tbh I don't use specifically tpb at all
 
I've no idea
 
Ah yes it is
isoHunt is an online torrent files index and repository, where visitors can browse, search, download or upload torrents that reference various digital content of mostly entertainment nature. It originated in 2003 as isohunt.com website for IRC files search and reached over 13.7 million torrents in its database and 20 million peers from indexed torrents. With 7.4 million unique visitors as of May 2006, isoHunt was one of the most popular BitTorrent search engines. Thousands of torrents were added to and deleted from it every day. Users of isoHunt perform over 40 million unique searches per month...
 
I'm kind of out of the loop on this stuff tbh, the only thing I ever "pirate" is TV and I don't really consider that piracy because... it's TV, it was free in the first place. It's just a way for me to watch US things before they are screened in the UK
 
Series and movies for me
 
I'm just waiting for TvT to come back up, which it will eventually but they are having some platform issues on the new servers (apparently, was chatting to one of the guys in irc yesterday)
@PeeHaa I'll get movies that I can't find or are an unreasonable price on legit streaming services
I'm not going to pay a tenner to watch a movie once, for that I want a DVD or sth
But as a general rule music/movies/games/software etc I'll pay for if I actually want it
torrents of those are for "try before you buy"
 
10:15 AM
Has anyone tried downloading via IRC/XDCC?
It's awesome :D
 
never heard of it
/me feels like an old man with p2p tech
 
@HamZa Holy shit 1990 called they want their technology back :D
 
@DaveRandom The idea is that there are certain bots that serve files directly. Those bots are connected to certain IRC channels. When you join a channel and send a certain download command, you get to download that file directly from a certain bot. The nice thing is that most bots have a nice internet connection. I tend to download +5 megabyte/s
@PeeHaa hehe
 
10:32 AM
@HamZa Ugh.. A long time ago we created an encrypted IRC Network called SecNet. All was well untill we saw channels popup that traded child ponography on our network, using XDCC transfers... We closed down the entire project because we really really didn't want to support that shit and didn't want to be policing it either.
 
@Gordon I can't unfavourite chat.stackoverflow.com/rooms/34770/php-internals because it's been mod-deleted, can you either unfavourite it for me or if you can't then undelete it temporarily so that I can do it please? Every time I click "rejoin favourite rooms" I join that even though it doesn't exist :-/
I suspect @ircmaxell has the same problem, since he's currently in it as well
 
I'm quite sure irc is still used for that sort of thing..
 
While you are helping @DaveRandom could you please unfreeze chat.stackoverflow.com/rooms/61037 I will keep it alive using a bot this time @Gordon :)
 
Holy crap that room basically crashed Chrome
 
@DaveRandom Yeah chrome doesn't like that many gifs
 
10:36 AM
Hey guys, any ideas why this line may be causing some sort of memory leak (using up entire 128mb allocation causing fatal error)?:
	$date = '<span class="date">' . date( 'jS F Y', strtotime( get_field('date') ) ) . '</span>';
get_field() is advanced custom fields plugin for WP
 
Well because WP
 
memory_limit errors are usually because of runaway recursion
 
That's what I was thinking xD
 
xdebug will help you track it down
 
@Billy Is it multilingo?
 
10:38 AM
@DaveRandom I had thought of that but it's not worth the hassle of making a local copy of the server :P
@PeeHaa Nope
 
@PeeHaa unfrozen though I am not sure why we need this room
 
@Billy You mean you are developing live?
 
@DaveRandom please file a bug on MSO for this
 
@Gordon <3
 
@Billy what's the exact error you get?
@Gordon OK cool :-)
 
10:40 AM
@PeeHaa Sort of. I develop in the production environment but just redirect to a holding page if you aren't logged into WP admin
 
Where else do a put those lonely orphaned gifs... They have feelings too you know
 
@Billy ewww... Let me guess, you also don't use version control?
 
@Billy Wow. That is stupid brave :)
 
/me goes to file MSO bug and bug balpha mercilessly and relentlessly
 
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32 bytes) in /home/highlightarts/public_html/wp-includes/cache.php on line 113 - note that the file and line changes every time
@Patrick Yep. Haha
 
10:41 AM
Does memory_limit error trigger a gc_collect_cycles before it errors?
 
All that malarky isn't worth the trouble when I'm developing a shoddy custom WP theme :P
 
I hope so...
 
@Billy Disable the caching plugin
 
@Billy This is extremely unprofessional... Nothing to be proud of.
 
@Patrick Lol. Ok.
Nothing to be ashamed of tbh
@PeeHaa I don't have one (atm) I think that's WP's cache
 
10:42 AM
@Billy WP has a cache?
 
@Billy wrong. you should be ashamed. Also, this site might be better suited for your problems
 
I'm not actually 100% sure but I think it does cache post data and such as to not query the database unnecessarily
 
@Billy Caching post data would be beyond stupid
 
Why is that?
 
Because POST is not idempotent
 
10:45 AM
@PeeHaa I think he is talking about wordpress posts...
 
Ahh, that makes more sense
 
oooh :-)
 
@Patrick Thanks but I'm well aware of WP.SE
 
Morning
 
And, yup, database results. :P
 
10:45 AM
Hey fapoor
 
Guys, according to this article richardmiller.co.uk/2011/07/07/… it is a good idea that when using DIC, creation of objects is pushed upwards to the point that everything which is specific (as instantiation) should be put in config file, which allows people to only change "config" files which used by the DIC and allow the rest of the code to be more abstract. Is that how it works? I am trying to compare the approach there with Auryn
 
@Billy Then go there, it seems like a wordpress specific issue. I don't think many people here torture themselves with wordpress anymore these days
 
I lolled:
register_shutdown_function( array( $this, '__destruct' ) );
 
@ziGi no reason to use an xml or yaml file (ewww...) I do it like this at the moment
 
@Patrick Thanks. I thought it may be something wrong with my php that I wasn't spotting but it does appear to be to do with the WP function.
 
10:48 AM
I lolled again:
public function __destruct() {
    return true;
}
 
@Gordon presumably MSE would be the more appropriate place for this bug? (since it's presumably a network-wide problem)
 
@Patrick yeah, it seems a bit more complicated to me as well. The question is, is it a good idea to push everything in "config" files as the guy calls them which are like 1 level higher than the controllers themselves?
Doesn't that split your code in two basically
 
@PeeHaa Why not return false; or return 'goodbye cruel world';?
 
files that have all the code for actual concrete files used
and classes with abstractions that
work by using the concrete implementations defined in the config file
What you showed me "Dependencies.php" is actually the part which is a "config" and does the concrete creation, right?
 
@ziGi well you need to define your dependencies somewhere. I do it in that file. Some people use config files for that, some even use yaml or xml... It's the same concept, just a different implementation
But you need to store that information somewhere
@ziGi the creation happens in the bootstrap file when dispatching to a route. See the full tutorial or the example if you wanna see more
 
10:56 AM
@Gordon for future reference: meta.stackexchange.com/questions/196853/… <-- same question, with a solution
 
@Patrick yes I have done your tutorial
I was just wondering what the benefits of putting all dependencies like this in one place is
 
@ziGi where else would you put them?
 
@Ja͢ck return 'kthxbai';
 
:)
 
11:02 AM
@Patrick so in this case is Auryn the DIC or is the Dependencies files the DIC
 
@Ja͢ck I'm guessing you're sort of busy atm since you've not been around much, but what are you working on in terms of FOSS at the moment and do you have time to take on anything else?
 
It's a trap @Ja͢ck!
 
:-P
 
@ziGi that's the auryn provider. See wiki. "The injector object may also be referred to as an assembler, provider, container, factory, or spring"
 
11:09 AM
"spring"? Never heard that one
 
yeah
I was gonna ask the same
 
Makes me think of java
 
@DaveRandom FOSS is on the back burner; my evenings are now spent writing prose in objective c :)
 
sadist
No worries :-)
 
@DamienOvereem damn, sad man sad
 
11:12 AM
0
A: LESS differences between mixin and extend

AchromeBefore the differences, it is important to delve into what mixins and extend are Mixins Mixins are common rule-sets you define and can use them in any other rule-sets, eg. .highlighted-text { color: #CCCCCC; } .normal-text:hover { .highlighted-text; font-size: 14px; } .another-text { ....

 
self-flagellation actually
 
Can I add something to the answer?
 
@DaveRandom the more you know
 
God you actually mean that java thing
Boooooooooooooooo
 
:D
 
11:14 AM
ping @Jimbo
 
@PeeHaa it's wikis fault :D
 
Well in that case you don't call DICs "spring"
It's the name of the framework
 
Spring is a DIC dick
 
@DaveRandom It is waaaay moar than that
 
humongous throbbing DIC
 
11:16 AM
 
@Fabor I didn't realise WP was Russian
 
It's always the Russians, isn't it
 
It certainly is mysterious malware though
 
@DaveRandom heh
@ziGi I dunno, the Turkish are always up to something too.
 
11:17 AM
yeah, true
 
Even though I don't buy Petrol having it be <$2 per gallon in the US must make the UK feel pretty bad.
That's about 4.5 litres for £1.20
 
Yeh, especially since the USD is worth about 4p these days
Although the prices in this country have come down by like 10p/l in the last month or two
I am suspicious
 
Well, I'm happy I don't pay anything for petrol.
 
Stealing red diesel instead?
 
heh. No vehicle owned.
 
11:22 AM
Someone (who is not completely untrustworthy) once told me that you can mix diesel with medical ethanol at a ratio of about 100/1 and a petrol engine with run on it just fine and gets much better mileage. Have always wanted to by a £50 scrapper and try it out, but I'm still very dubious.
 
@DaveRandom I've always wondered how many refuels it would take to make the diesel clean again
 
@PeeHaa "clean"?
 
As in no traces of the red diesel anymore
 
oic
probably not many if you ran the tank till the engine stopped every time
that would be a huge pita though, since you'd have to bleed the system every time you refueled...
Probably not worth it
 
@DaveRandom I've done that soo many times by nopw that I always have a spare can of fuel on my car :)
 
11:25 AM
I'm probably going to have to get a diseasel engine next time a buy a car, need something bigger and petrol will become financially unviable I suspect :-(
@PeeHaa Found out recently that's illegal in the UK, although I doubt you'd ever get done for it
It's also illegal to run out of fuel on the motorway
You probably would get done for that
 
> Diesel fuel, or marked gas oil is dyed green in the Republic of Ireland and ....
lol
 
@DaveRandom remember the discussion we had about git? I learned that you can reorder commits in rebase...
 
orly?
Not that useful tbh, but interesting nonetheless :-)
 
@DaveRandom well, it means you can make a commit, reorder it, and squash it
if you want to fix an older commit
without going through the hassle of branch + reset + commit + cherry-picks
 
@DaveRandom (y)
 
11:37 AM
@FlorianMargaine Oh yeh that makes sense, cool. Do you have to do it as two separate steps (reorder and then squash) or can you do it in one go?
 
@DaveRandom one go I think, haven't tried it. I should do it tonight.
 
rebase -i only seems to give me the option of "squash into previous commit" so I guess it's some insane set of arguments?
 
no no
move the line of the commit where you want it to be
 
holy crap
that is awesome
 
if you delete the line, it deletes the commit. And the changes that were made with it.
 
11:39 AM
/me goes to intentionally fuck up some commits so I can try it
:-P
 
@FlorianMargaine yeh I knew that
but didn't realise you could re-order stuff you were keeping
 
If I want a elephpant, is get-elephpant.com the right place?
 
Who's doing that?
That's new, not sure if legit
Suspciously no name associated with the site
@Ocramius (relaying question from friend): I have an Entity with an associated Collection. I want, under certain circumstances, that Collection to be ordered in a very specific way. Is the best route to do this by having a repository method do the fetch and collection hydration for me?
if you have a moment please thankyou kind sir thankyou please
1 message moved to bin
 
@RonniSkansing no
those are fakes
 
11:51 AM
@PeeHaa where do I get the real ones
 
Anywhere but there
@RonniSkansing Moment
 
Thanks man.. =]
 
lol searching for elephpant resulted in youtube.com/watch?v=3VEm84E6JR4
@ThW ^
 
lol
 
@RonniSkansing Cannot find a dealer right now. But once in a while something pops up in my twitter feed. Will keep you in the loop
 
11:56 AM
heh, dealer
 
Well in all honesty it is easier to get a ounce of coke than an elephpant :)
 
@PeeHaa =] Thanks man, I will fill up my paypal for then..
Yea (and you must have guessed, I am not looking for a laravelphant)
 
:)
My pink one is still my favorite <3 @Gordon
 
I will not get one until I can have an original small blue one
 
Has any one of you guys bought the Cards against humanity bullshit pack
 
12:12 PM
@PeeHaa :)
 
Started checking out doc-en 15 mins ago. Still going :-/
 
ThW
@PeeHaa :-)
 
Finally got time to play around with Auryn. Looks promising at first glance :)
 
It starts that way, then you get "Auryn" tattooed across the small of your back by the end.
 
I hate subversion with every fibre of my being.
 
12:24 PM
sorry... had to star that...
 
heh. SVN is good for simple use. Well it has been.
 
I'm sorry, but no. It is fucking retarded, and cannot be accurately described using any other combination of words
 
@Fabor you mean for "one developer, one branch"
that's not really adequate
 
When you're used to git it's like getting out of your Ferrari into a Lada
 
@tereško :D
 
12:29 PM
@DaveRandom novelty of experience can help only so much ...
 
has anyone ever used Mercurial?
 
+1 DaveRandom
 
I agree with sir DaveRandom
 
Also, only very tangentially related, does anyone know how to block history rewrites server-side in git? Would like an ACL.
 
Have to use it currently after using git for a couple of years after using svn for two years. It's really bad.
 
12:32 PM
@DaveRandom I have a little bit
on surface level it is similar to git
 
@DaveRandom yes, or simply map the collection with @OrderBy
Though @OrderBy can't be ensured when hydration happens via complex queries
 
We are using SVN here. Untill sofar it worked like it should (and every now and then conflicts to break the routine). Reading this chat would indicate that we must change to something else (like GIT?).
 
In which case is GIT/Mercurial much better than SVN :) ?
 
@Benz I'd say so, but they are also of an order of magnitude more complicated to understand
 
12:35 PM
but git's API makes much more sense
 
ya
plus everyone can still work, even when without a connection or when the central repository is slow/broken
and you automatically have a backup, since every developer machine is pretty much a backup :P
 
So.. it is a little bit more complicated, but that shouldn't be the thing that holds you back.. So repository is local, and you commit to the GIT server? What about conflict solving? Better to deal with?
 
Is there anybody who fully understood philosophy behind hg?
 
@Benz you commit locally
 
@nikita2206 from my experience it is designed to easily use/deploy different application environments / easy continuous integration
but i'm not sure that is also the philosophy behind it :-)
 
12:42 PM
@Ocramius Thx for the information, we have people around that continously tell us that we need to update to something else than SVN. But untill sofar we didn't look further into it. I will look at the benefits and from there start a discussion with our team ;)
 
@Benz go for it ;-)
 
@Benz I can tell you that I cry every time that I have to connect to a VPN to commit to some kind of remote SVN server
:P
 
I also cry, but that's only when I have merge conflicts and don't know how to resolve them ;) .
 
Hey guys so I was backing up my WP site and it got stuck whilst compressing some stuff into .zip, now the server won't respond to my requests and I'm locked out! What can I do?
 
you mean tree conflicts when a directory was added twice ? yeah makes me cry too
 
12:45 PM
@Billy maybe your server is busy compressing ?
 
@RonniSkansing For twenty minutes?
I have been backing up this site a few times and it had never taken more than a couple of minutes at most
 
@ErikBaan Well.. two adds at the same time shouldn't be a problem.
 
@Ocramius tnx
 
Is there anyway I can just stop my server
 
windows: reboot -r -t 0
 
12:50 PM
@tereško worth playing around with? or just stick with git?
 
linux: sudo reboot
 
The catch: it's a shared server, no CL
 
something like that?
 
@Billy Unlikely to be your fault or anything you can do about then
@Benz reboot requires a time argument iirc
 
@Billy =[ reboot
 
12:51 PM
@Ocramius just a suggestion - I keep svn projects under git repo as well so I can have history git and I can switch easily, and when I need to deliver something to svn I just switch to needed branch and commit it. The only problem is keeping up with upstream. Anyway I need to convince everyone here to move to git
 
@nikita2206 Doesn't that screw up the SVN branching though?
They are fundamentally different in the way they operate
 
@DaveRandom Also in Ubuntu?
 
@DaveRandom "svn branching"? This sounds like something already completely screwed up
But tbh it's just not used here. For good or bad I don't know
It's not really needed cause deployments are almost daily
 
@nikita2206 What happens if someone checks in a bug just before the deployment?
 
@nikita2206 I simply avoid working for that particular client: why would I hurt myself?
 
12:58 PM
Your best bet for persuading people is to concentrate on what Git allows that SVN doesn't e.g. better workflows: nvie.com/posts/a-successful-git-branching-model
 
@nikita2206 Well yeh, in svn "branches" are just directories in the tree.
Related:
36 mins ago, by DaveRandom
I hate subversion with every fibre of my being.
@Benz No idea, I use real operating systems :-P
 
How do you guys handle your logging, do you inject it as a dependency?
I have seen that some people make decorator classes that do the logging
 
@Danack pretty bad things happen. I mean, they encourage me to test my code on prod database so you can guess and extrapolate...
 
"Git, it stops bad things happening"
 
But right now there's only three devs incl me in one room who make changes so it can be managed pretty quickly. Still shit
 
1:09 PM
@ziGi Yeah, I prefer to do that
Logging is typically not a core-domain concept, so it shouldn't be a direct dependency imo
 
My colleague uses the Registry in Zend Framework and in the bootstrap creates the logger and sets it in the registry, and then he gets it from the registry whenever he needs it, but I find that a bit obscure
 
@ziGi I stopped reading after registry
 
@Ocramius well in cases when you have an exception (lets say from the DB) and you have to give a general message to the user and log the problem so you can inspect it, do you make a decorator class again? Doesn't that overcomplicate things
@PeeHaa lol, I know Registry is bad because it is static, but why such a big company as Zend decided to include it as a pattern in their framework if they know so much
 
@Ocramius I always found that to be directly at odds with debug logging, though. Sometimes I want to log what this var is on line n and line n+1, you can't really do that with a decorator
 
er ... zend wrote php, there is endless precedent for them doing stupid things ...
 
1:18 PM
I though Rasmus Lerdorf did
 
@ziGi Who said they know that much?
WHO!?
 
'they' ?
 
zend writes the zend engine, the zend engine is what powers modern versions of php ...
 
:)
 
THEY did!
 
1:23 PM
That moment you have to fall back to find to find files :(
 
locate ?
it's a bit easier
 
if ($foo instanceof callable) {}
 
@ziGi easier, faster, sane
And most importantly: not installed :(
Idiots. Idiots everywhere
I think that it is related to programming, because without it I will need to PROGRAM my own firewall on windows. But I do not want to start flaming war, just tell me where to ask and I will delete it and write somewhere else. — kulatamicuda 2 mins ago
 
haha
 
@ziGi I'd still use a decorator if it's for the user: DB-specific exceptions and user-specific exceptions are in different domains
@DaveRandom agree, you cannot, but then you'd use a debugger instead, no?
 
1:38 PM
question with 163k views! That's huge...
 
urgh, need to prepare another class -.-
/me finding "merge" buttons, /me pressing those buttons
 
All your rebase are belong to us
 
hi all
 
@Ocramius how do you usually understand when something belongs not in the same domain of logic?
 
anybody tell me how to optimize below query
SELECT
mem.mem_id,
mem.fname,
mem.lname,
mem.email,
mem.profilenam,
mem.birthday,
mem.phone,
mem.sn_flag,
(SELECT
stat
FROM invite
WHERE email = mem.email
AND mem_id = '48') AS stat,
(SELECT
inv_id
FROM invite
WHERE email = mem.email
AND mem_id = '48') AS invid
FROM `c_update_info` AS mem
JOIN `network` AS tmem
ON (mem.mem_id = tmem.frd_id)
WHERE tmem.mem_id = '48'
AND mem.verified = 'y'
AND mem.deleted = 'N'
AND profile_type != 'C'
AND mem.updated_by = '48'
I want to remove this query and adjust the same in where clause
(SELECT
stat
FROM invite
WHERE email = mem.email
AND mem_id = '48') AS stat,
(SELECT
inv_id
FROM invite
WHERE email = mem.email
AND mem_id = '48') AS invid
 
ThW
1:45 PM
@John use EXPLAIN, EXPLAIN SELECT ...
 
E_SPAM
 
that is a gem
 
no hats yet? :/
 
I did have my hat here immediately
when I put it in SO options it asked me if I want to see it everywhere
and I agreed and I had it instantly in the SO chat
 
@ThW please wait
 
ThW
1:48 PM
 
Bas
Hey guys.
 
@ziGi that is a good question. I try keeping it out of programming terms, abstracting the ideas away
 
Bas
Whats u.
 
it's really about drawing venn diagrams around things :P
 
table type possible_keys key key_len ref rows Extra
mem ALL (NULL) (NULL) (NULL) (NULL) 12622 Using where
tmem ref mem_id,frd_id,mem_id_3,mem_id_2 frd_id 8 database.mem.mem_id 1 Using where
invite ALL (NULL) (NULL) (NULL) (NULL) 640 Using where
invite ALL (NULL) (NULL) (NULL) (NULL) 640 Using where
 
1:50 PM
Household calculus .. create depreciation and cost model of a rainbow vacuum cleaner :)
 
@Ocramius hah, how do you draw ven diagrams with domain logic
 
@ziGi I have a whiteboard? O_o
 
haha, ok fine, I was more looking for an simple example you can give me
 
@Ocramius Not always possible, when you have "but it works in dev!!!111" issues and/or sporadic failures in background processes like cron jobs
I agree that the decorator approach is generally better, and that most of the time you actually want a debugger. But those cannot cover every use case. Leaky abstraction is leaky.
 
Well, but that's still temporary debug code
it's still not part of your domain ;-)
unless you are writing a debugger yourself...
 
Bas
1:55 PM
@DaveRandom Hey man.
 
@Ocramius Indeed, it is. That's not a concrete solution though, you can't just litter a live codebase with file_put_contents (well, you can, but...)
 
Yo can, trust me...
you can... :|
 
Bas
@DaveRandom I wrote a car class, and i want to calculate the montly taxes of a car (the road tax, the insurance, gas). Is it good practice to make a class called "CarTaxes" and inside the getRoadTax() method calculations on the $car which is being injected in the constructor of that class?
 
Make it a separate class and pass the car to it
not the opposite
 
And don't forget about third argument FILE_APPEND :P
 
Bas
1:58 PM
Yeah i did that right? :P
class CarTaxes
{
/**
* @var Car $car The car
*/
private $car;

/**
* @var float $roadTax The monthly price of road tax based on what car you have
*/
private $roadTax;

public function __construct (Car $car) {
$this->car = $car;
}

public function getRoadTax () {
//return a massive calculation based on the cars properties
}
}
 
What's the point in injecting the car into the ctor? That limits the instance to a single Car instance. Why not just pass it as an argument to getRoadTax()?
 
Bas
Yeah true, could do that.
 

« first day (1523 days earlier)      last day (3425 days later) »