Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@aerialls
Copy link
Contributor

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:

@travisbot
Copy link

This pull request passes (merged ebd1a4c6 into f881d28).

@sstok
Copy link
Contributor

sstok commented Jun 16, 2012

Shouldn't it be better to stop on the first failure? as all the others files will be false automatically.

@stof
Copy link
Member

stof commented Jun 16, 2012

indeed. We should avoid unnecessary filesystem IO by returning false as soon as it is known

@aerialls
Copy link
Contributor Author

Indeed it's better this way. fixed!

@travisbot
Copy link

This pull request passes (merged 8d98f417 into 76b2ed4).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be if (!file_exists($file)) to follow the Symfony CS. We use the strict comparison with false only for cases where it is necessary (such as strpos which can return 0 with the opposite meaning)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. Thanks for the feedback

fabpot added a commit that referenced this pull request Jun 16, 2012
Commits
-------

38cad9d [Filesystem] added exists method

Discussion
----------

[Filesystem] added exists method

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:

---------------------------------------------------------------------------

by travisbot at 2012-06-15T16:29:20Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1629204) (merged ebd1a4c6 into f881d28).

---------------------------------------------------------------------------

by sstok at 2012-06-16T09:05:48Z

Shouldn't it be better to stop on the first failure? as all the others files will be false automatically.

---------------------------------------------------------------------------

by stof at 2012-06-16T10:21:49Z

indeed. We should avoid unnecessary filesystem IO by returning false as soon as it is known

---------------------------------------------------------------------------

by aerialls at 2012-06-16T11:55:24Z

Indeed it's better this way. fixed!

---------------------------------------------------------------------------

by travisbot at 2012-06-16T12:01:16Z

This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1634615) (merged 8d98f417 into 76b2ed4).
@fabpot fabpot merged commit 38cad9d into symfony:master Jun 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants